Re: [GENERAL] Functions in CHECK constraint not getting dumped before

2004-02-05 Thread Tom Lane
Rajesh Kumar Mallah <[EMAIL PROTECTED]> writes: > The only issue that i noticed now with pg_dump version 7.5dev > is that create schemas are not dumped before user definations. > which have their search_path set by ALTER USER command. "dev" how far back? I thought we fixed that a little while ag

[GENERAL] Analyze not doing anything?

2004-02-05 Thread Jim C. Nasby
I build a table to test the theory that PGSQL wouldn't use an index to satisfy 'SELECT * FROM table WHERE field IS NOT NULL'. Sure enough it wasn't using the index, but it seems that's because there's no stats to be had. What am I doing wrong? This is version 7.3.4. stats=# \t Showing only tuples.

Re: [GENERAL] pg_restore and large files

2004-02-05 Thread Tom Lane
Mike Charnoky <[EMAIL PROTECTED]> writes: > So, it does look like a pg_restore bug and that dataPos is > being treated as an integer somewhere. After digging in the CVS log I bet this is the same bug just noted a month ago: 2004-01-03 23:02 tgl * src/bin/pg_dump/: pg_backup_archiver.c

Re: [GENERAL] Functions in CHECK constraint not getting dumped before

2004-02-05 Thread Rajesh Kumar Mallah
Greetings! The only issue that i noticed now with pg_dump version 7.5dev is that create schemas are not dumped before user definations. which have their search_path set by ALTER USER command. eg ALTER USER arvind SET search_path TO 'erp'; ERROR: schema "erp" does not exist This is relatively ha

Re: [GENERAL] dblink - custom datatypes don't work

2004-02-05 Thread Joe Conway
Mark Gibson wrote: [custom datatype oid mismatch between local and remote side of dblink ] Is this a limitation of PostgreSQL or dblink? Could dblink use type names instead of oid's? If not, could dblink be adapted to use some kind of remote oid -> local oid mapping table for datatypes? I would be

Re: [GENERAL] dblink: rollback transaction

2004-02-05 Thread Joe Conway
Oleg Lebedev wrote: Agreed. I wonder if I should simulate local Xactions by using local dblink calls? What do you think, Joe? It is an interesting thought. Withing a single plpgsql function, open one local and one remote persistent, named dblink connection. Start a transaction in each. Go into yo

Re: [GENERAL] pg_restore and large files

2004-02-05 Thread Mike Charnoky
Whoops, forget that last post. Here's the real data from gdb at the point prior to failure of pg_restore: Breakpoint 1, _PrintTocData (AH=0x8058fc0, te=0x80867e0, ropt=0x8058ee8) at pg_backup_custom.c:471 471 if (fseeko(AH->FH, tctx->dataPos, SEEK_SET) != 0) 1: tctx->data

Re: [GENERAL] dblink: rollback transaction

2004-02-05 Thread Oleg Lebedev
>>I think that is a main take-away here. You should not try to depend on >>dblink as a robust replication solution. Perhaps if postgres had >>two-phase commit and nested transactions, but not at the moment. Agreed. I wonder if I should simulate local Xactions by using local dblink calls? What do

Re: [GENERAL] pg_restore and large files

2004-02-05 Thread Mike Charnoky
OK, I ran with gdb and here's what I got: Breakpoint 1, _PrintTocData (AH=0x8058fc0, te=0x8086548, ropt=0x8058ee8) at pg_backup_custom.c:471 471 if (fseeko(AH->FH, tctx->dataPos, SEEK_SET) != 0) (gdb) backtrace #0 _PrintTocData (AH=0x8058fc0, te=0x8086548, ropt=0x8058ee8)

Re: [GENERAL] performance difference: multiple db vs single db

2004-02-05 Thread John Sidney-Woollett
Instead of having to deal with issues of splitting data across multiple servers and all the associated pain, why not take a look at the Linux Virtual Server project, http://www.linuxvirtualserver.org/ I don't know for sure that Postgres will run on it, but the beauty if it did is that you can keep

Re: [GENERAL] dblink: rollback transaction

2004-02-05 Thread Joe Conway
John Sidney-Woollett wrote: I think PG badly needs nested transaction support... ;) I think that is a main take-away here. You should not try to depend on dblink as a robust replication solution. Perhaps if postgres had two-phase commit and nested transactions, but not at the moment. That said,

Re: [GENERAL] Proper tool to display graphics?

2004-02-05 Thread Carlos Ojea Castro
I want to display graphics from my postgresql database, but I must choose the proper tool first Wanting to "display graphics" is rather vague. Are you talking Entity-Relationship Diagrams? Directed trees? Pie/Bar/Line charts? Thank you for your response, Steve. I want to display Pie/Bar/Lin

[GENERAL] functional index "real world" uses

2004-02-05 Thread David Garamond
I want to know how functional indexes are used "in the real world". Here are the common uses: * non-unique index on the first parts of a longish text field (SUBSTRING(field)) to save disk space, while still allowing faster searches than a sequential scan. * indexing on LOWER(field)/UPPER(field

[GENERAL] functional index "real world" uses

2004-02-05 Thread David Garamond
I want to know how functional indexes are used "in the real world". Here are the common uses: * non-unique index on the first parts of a longish text field (SUBSTRING(field)) to save disk space, while still allowing faster searches than a sequential scan. * indexing on LOWER(field)/UPPER(field

Re: [GENERAL] Proper tool to display graphics?

2004-02-05 Thread Steve Crawford
On Thursday 05 February 2004 1:48 am, Carlos Ojea Castro wrote: > Hello: > > I want to display graphics from my postgresql database, but I must > choose the proper tool first Wanting to "display graphics" is rather vague. Are you talking Entity-Relationship Diagrams? Directed trees? Pie/Bar/L

Re: [GENERAL] size of mailing lists?

2004-02-05 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > ... > pgsql-docs 0 out of 449 > pgsql-fr-generale 0 out of 30 > pgsql-general 1 out of 1927 > pgsql-hackers 1 out of 1093 > pgsql-hackers-pitr 0 out of 0 > ... Uh, what do the "0 out of", "1 out of" number

Re: [GENERAL] performance difference: multiple db vs single db

2004-02-05 Thread John Liu
Here're two cases - 1. 20 tables in one huge database A on one machine 2. 10 tables in each database if they can functionally separated, so two databases A1 and A2 on one machine What's the estimated performance difference on queries from A2 and A1 comparing the same querying from A in general us

Re: [GENERAL] Proper tool to display graphics?

2004-02-05 Thread scott.marlowe
On Thu, 5 Feb 2004, Carlos Ojea Castro wrote: > > Hello: > > I want to display graphics from my postgresql database, but I must > choose the proper tool first. > Which one is more suitable?: > perl? > php? > pg_autodoc? > another one? php and the gdlib work pretty well. It's not as simple as

Re: [GENERAL] dblink: rollback transaction

2004-02-05 Thread John Sidney-Woollett
Oleg Lebedev said: > The example I provided was for illustrational purposes only :) I figured! > Is there any way to roll back a remote dblink Xaction? Does anyone have > a better solution for my problem? Don't know enough to say or guess, sorry! I think PG badly needs nested transaction suppor

Re: [GENERAL] Functions in CHECK constraint not getting dumped before

2004-02-05 Thread Rajesh Kumar Mallah
Rajesh Kumar Mallah wrote: Tom Lane wrote: It is found that pg_dump does not dump function referred in CHECK constraint definations before dumping the table defination . As a result the tables do not get restored due to lack of defined functions. Is it something that will be worked upon

Re: [GENERAL] size of mailing lists?

2004-02-05 Thread Marc G. Fournier
On Thu, 5 Feb 2004, David Garamond wrote: > Would someone mind divulging the size (= number of members) of the > @postgreql.org mailing lists (particularly pgsql-general and > pgsql-hackers)? To tell you the truth, I've always got good responses > from this list. Apparently most other question pos

Re: [GENERAL] ERROR: column 'xxx' does not exist (under v. 7.4.1)

2004-02-05 Thread Mark Gibson
Mark Gibson wrote: You need to quote the table name if it contains upper case or strange characters: SELECT "companyID" FROM app; Obviously I meant column name, but it applies to any object identifier ;) -- Mark Gibson <[EMAIL PROTECTED]> Web Developer & Database Admin Cromwell Tools Ltd. Leic

Re: [GENERAL] dblink: rollback transaction

2004-02-05 Thread Oleg Lebedev
John, The example I provided was for illustrational purposes only :) The problem that I am trying to solve is more complex. Basically, I am trying to propagate remote data from remote tables and install it in the local tables. I do this operation in a loop as follows: For j IN all_tables LOOP

Re: [GENERAL] pg_restore and large files

2004-02-05 Thread Tom Lane
Mike Charnoky <[EMAIL PROTECTED]> writes: > I am currently using PostgreSQL v7.3.4 on a RedHat 8.0 system (2.4.23 kernel) > using the ext3 filesystem. I am experiencing problems when performing a > pg_restore using a file which is 2.3G in size. The dump, which seemed to run > smoothly, was cre

Re: [GENERAL] ERROR: column 'xxx' does not exist (under v. 7.4.1)

2004-02-05 Thread Karsten Hilbert
> the one I'm interested in, which is "companyID". ^^^ >SELECT companyID FROM app; ^ >ERROR: column "companyid" does not exist ^^^ Look closely at the capitalization and quoting. -- GPG key ID E407

[GENERAL]: Proper tool to display graphics?

2004-02-05 Thread Carlos Ojea Castro
Hello: I want to display graphics from my postgresql database, but I must choose the proper tool first. Which one is more suitable?: perl? php? pg_autodoc? another one? Thank you in advance, Carlos ---(end of broadcast)--- TIP 2: you can get off al

Re: [GENERAL] ERROR: column 'xxx' does not exist (under v. 7.4.1)

2004-02-05 Thread Mark Gibson
Iker Arizmendi wrote: Using psql and running as the owner of the table "app" I try to access the columns of the table like so: SELECT * FROM app; which returns all the columns in the table including the one I'm interested in, which is "companyID". If instead I use something like: SELECT com

[GENERAL] ERROR: column 'xxx' does not exist (under v. 7.4.1)

2004-02-05 Thread Iker Arizmendi
Using psql and running as the owner of the table "app" I try to access the columns of the table like so: SELECT * FROM app; which returns all the columns in the table including the one I'm interested in, which is "companyID". If instead I use something like: SELECT companyID FROM app; I get

[GENERAL] dblink - custom datatypes don't work

2004-02-05 Thread Mark Gibson
Hello, I've been experimenting with dblink recently, and have encountered some limitations I'd like to discuss. I've been trying to create views of remote tables, like so: CREATE VIEW stuff AS SELECT * FROM dblink(' ... remote connection info ... ', 'SELECT id, title, title_idx FROM stuff') AS

[GENERAL] pg_restore and large files

2004-02-05 Thread Mike Charnoky
Hello, I am currently using PostgreSQL v7.3.4 on a RedHat 8.0 system (2.4.23 kernel) using the ext3 filesystem. I am experiencing problems when performing a pg_restore using a file which is 2.3G in size. The dump, which seemed to run smoothly, was created using the -Fc option. When I perform

Re: [GENERAL] size of mailing lists?

2004-02-05 Thread Karsten Hilbert
> Better than most paid-for support, cheaper, friendlier... The PG community is > probably prettier too and makes a better cup of tea ;-) Or coffee, if you want to come over one day or another :-) Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

Re: [GENERAL] Predictive or scoring solution for PostgreSQL ?

2004-02-05 Thread Marc A. Leith
On Thu, 05 Feb 2004 07:45:41 -0500, Mike Mascari wrote: >Marc A. Leith wrote: > >>Quoting Mike Mascari <[EMAIL PROTECTED]>: >> >> >>>Would Joe Conway's PL/R procedural language be any help here? I'd guess >>>there's an R package to fit the bill, but then again I'm only on page 30 >

Re: [GENERAL] Anyone has nls activated on Mac OS X?

2004-02-05 Thread Francois Suter
Could you run through the make with -k and see what else might be missing the reference? OK. I ran through it again, doing a make clean beforehand (thanks John). The make -k and it still stalls at the same place: make -C ecpglib all gcc -no-cpp-precomp -O2 -fno-strict-aliasing -Wall -Wmissing-pro

Re: [GENERAL] Predictive or scoring solution for PostgreSQL ?

2004-02-05 Thread Mike Mascari
Marc A. Leith wrote: Quoting Mike Mascari <[EMAIL PROTECTED]>: Would Joe Conway's PL/R procedural language be any help here? I'd guess there's an R package to fit the bill, but then again I'm only on page 30 of Modern Applied Statistics in S-Plus. ;-) For a turnkey modeling solution, you nee

Re: [GENERAL] size of mailing lists?

2004-02-05 Thread David Garamond
Richard Huxton wrote: On Thursday 05 February 2004 10:28, David Garamond wrote: Would someone mind divulging the size (= number of members) of the @postgreql.org mailing lists (particularly pgsql-general and pgsql-hackers)? Dunn, but Marc posted a message to -general recently which mentioned traf

Re: [GENERAL] Can LIKE use indexes or not?

2004-02-05 Thread David Garamond
Richard Huxton wrote: On Thursday 05 February 2004 10:25, David Garamond wrote: Glad to see your problem is solved. Your locale/charset settings look a bit odd though: # These settings are initialized by initdb -- they may be changed lc_messages = 'en_US.iso885915' #locale for system error messa

Re: [GENERAL] size of mailing lists?

2004-02-05 Thread Richard Huxton
On Thursday 05 February 2004 10:28, David Garamond wrote: > Would someone mind divulging the size (= number of members) of the > @postgreql.org mailing lists (particularly pgsql-general and > pgsql-hackers)? Dunn, but Marc posted a message to -general recently which mentioned traffic volume. Try

Re: [GENERAL] Can LIKE use indexes or not?

2004-02-05 Thread Richard Huxton
On Thursday 05 February 2004 10:25, David Garamond wrote: Glad to see your problem is solved. Your locale/charset settings look a bit odd though: > # These settings are initialized by initdb -- they may be changed > lc_messages = 'en_US.iso885915' #locale for system error message strings > lc_mo

[GENERAL] size of mailing lists?

2004-02-05 Thread David Garamond
Would someone mind divulging the size (= number of members) of the @postgreql.org mailing lists (particularly pgsql-general and pgsql-hackers)? To tell you the truth, I've always got good responses from this list. Apparently most other question posts do too. There seems to be always someone kno

Re: [GENERAL] Can LIKE use indexes or not?

2004-02-05 Thread David Garamond
Lincoln Yeoh wrote: If you use an exact = does it use the index? > e.g. explain select ... where lower(f)='' Yes it does. If so it could be your locale setting. On some versions of Postgresql like is disabled on non-C locales. I'm using 7.4.1. These are the lines in postgresql.conf (it'

[GENERAL] Proper tool to display graphics?

2004-02-05 Thread Carlos Ojea Castro
Hello: I want to display graphics from my postgresql database, but I must choose the proper tool first. Which one is more suitable?: perl? php? pg_autodoc? another one? Thank you in advance, Carlos ---(end of broadcast)--- TIP 5: Have you checked

Re: [GENERAL] Can LIKE use indexes or not?

2004-02-05 Thread Lincoln Yeoh
If you use an exact = does it use the index? e.g. explain select ... where lower(f)='' If so it could be your locale setting. On some versions of Postgresql like is disabled on non-C locales. On some versions of Postgresql on some platforms the default is a non-C locale. With version 7.4

Re: [GENERAL] Can LIKE use indexes or not?

2004-02-05 Thread John Sidney-Woollett
John Sidney-Woollett said: > select * from t where new_upper_f like upper('MMM%'); I think I meant select * from t where new_upper_f like 'MMM%'; or select * from t where new_upper_f like upper('mmm%'); John ---(end of broadcast)--- TIP 8: exp

Re: [GENERAL] Can LIKE use indexes or not?

2004-02-05 Thread Jan Poslusny
try this: CREATE [ UNIQUE ] INDEX my_index ON t ( lower(f)); John Sidney-Woollett wrote: David Garamond said: Would using an index potentially help the performance of this query, and if yes, how do I force Postgres to use the index? db1=> select * from t where lower(f) like 'mmm%'; I sus

Re: [GENERAL] Can LIKE use indexes or not?

2004-02-05 Thread John Sidney-Woollett
David Garamond said: > Would using an index potentially help the performance of this query, and > if yes, how do I force Postgres to use the index? > > db1=> select * from t where lower(f) like 'mmm%'; I suspect the fact that you're specifying the lower function on the column data, ie lower(f), im

Re: [GENERAL] Improving performance with a Function instead of a

2004-02-05 Thread Kris Jurka
On Thu, 5 Feb 2004, Hadley Willan wrote: > Thanks, but I don't believe this to be a problem because my JDBC layer > when I construct the query is using setObject( parameter, getId, > Types.BIGINT ) > > so by the time it arrives at the database that cast should have already > occured? > The JDBC

[GENERAL] Can LIKE use indexes or not?

2004-02-05 Thread David Garamond
Reading the archives and the FAQ, it seems to be implied that LIKE can use index (and ILIKE can't; so to do case-insensitive search you need to create a functional index on LOWER(field) and say: LOWER(field) LIKE 'foo%'). However, EXPLAIN always says seq scan for the test data I'm using. I've

Re: [GENERAL] dblink: rollback transaction

2004-02-05 Thread John Sidney-Woollett
Oleg Lebedev said: > Is there a way to rollback a dblink transaction? > Say, I delete some data from the remote database, but I don't want this > to be visible untill the data is inserted in the current database. And > if the insertion of data in the current database throws an error, I want > to ro