Re: [GENERAL] Make check fails on 8.3.7

2009-08-07 Thread Alban Hertroys
On 7 Aug 2009, at 4:02, Christine Desmuke wrote: If so, isn't it just the output of stderr getting lost here? What shell are you using? Yes, it looks like stderr is lost. I'm running bash, and there is nothing odd in .bash_profile Any ideas? I have to admit I'm running out, this

[GENERAL] batch inserts in python libpq

2009-08-07 Thread Scara Maccai
Hi all, using Java I'm able to get a 1 inserts/sec on our server using batch updates (using preparedStatement.addBatch()). Using Python I can't get past 2000 inserts/sec, which is roughly the same performance of Java without addBatch. Is there a Python driver that uses the same protocol

[GENERAL] using the schema in postbooks

2009-08-07 Thread John
Hi, There is an accounting system called postbooks that uses Postgres for the backend. I just downloaded the program yesterday. What is interesting is within one database there are two schemas (api and public). The 'api' schema is a bunch of views. The interesting part is if you update a

Re: [GENERAL] using the schema in postbooks

2009-08-07 Thread Adrian Klaver
On Friday 07 August 2009 6:42:07 am John wrote: Hi, There is an accounting system called postbooks that uses Postgres for the backend. I just downloaded the program yesterday. What is interesting is within one database there are two schemas (api and public). The 'api' schema is a bunch of

Re: [GENERAL] batch inserts in python libpq

2009-08-07 Thread Sam Mason
On Fri, Aug 07, 2009 at 01:37:08PM +, Scara Maccai wrote: using Java I'm able to get a 1 inserts/sec on our server using batch updates (using preparedStatement.addBatch()). I'd probably generate SQL that looks somewhat like the following: UPDATE foo f SET v = x.v FROM (VALUES

Re: [GENERAL] using the schema in postbooks

2009-08-07 Thread Scott Mead
On Fri, Aug 7, 2009 at 9:52 AM, Adrian Klaver akla...@comcast.net wrote: On Friday 07 August 2009 6:42:07 am John wrote: Hi, There is an accounting system called postbooks that uses Postgres for the backend. I just downloaded the program yesterday. What is interesting is within one

Re: [GENERAL] using the schema in postbooks

2009-08-07 Thread John
On Friday 07 August 2009 06:56:22 am Scott Mead wrote: On Fri, Aug 7, 2009 at 9:52 AM, Adrian Klaver akla...@comcast.net wrote: On Friday 07 August 2009 6:42:07 am John wrote: Hi, There is an accounting system called postbooks that uses Postgres for the backend. I just downloaded the

[GENERAL] \copy: unexpected response (4)

2009-08-07 Thread Neil Best
I have set up a batch job that pipes a couple hundred of \copy commands to psql. It starts out well enough, sprinkled with a few error messages that I intend to circle back and clean up after batching all of the ALTER commands that I need, but then: \copy gm1 from export/month1-88/13m/GM1.dat

Re: [GENERAL] using the schema in postbooks

2009-08-07 Thread John
On Friday 07 August 2009 07:27:28 am John wrote: On Friday 07 August 2009 06:56:22 am Scott Mead wrote: On Fri, Aug 7, 2009 at 9:52 AM, Adrian Klaver akla...@comcast.net wrote: On Friday 07 August 2009 6:42:07 am John wrote: Hi, There is an accounting system called postbooks that

Re: [GENERAL] \copy: unexpected response (4)

2009-08-07 Thread Tom Lane
Neil Best nb...@ci.uchicago.edu writes: psql:copy.sql:8059525: \copy: unexpected response (4) psql:copy.sql:8059525: \copy: unexpected response (4) psql:copy.sql:8059525: \copy: unexpected response (4) psql:copy.sql:8059525: \copy: unexpected response (4) psql:copy.sql:8059525: \copy:

Re: [GENERAL] \copy: unexpected response (4)

2009-08-07 Thread Neil Best
Tom Lane-2 wrote: Hmm. It looks like psql could get into an infinite loop if the server failed to exit COPY IN mode for some reason, but it's not at all clear how that could happen (or what to do about it). What server version and what psql version is this? What does the server's log

[GENERAL] psql and Emacs on Windows

2009-08-07 Thread Wenjian Yang
Hi, I'm trying to get more users to use PostgreSQL more often. Some of them are familiar using the sql-mode in Emacs to access MS-SQL and Oracle from Windows Desktops, but it doesn't work for PostgreSQL. We currently installed emacs 23.1 and PostgreSQL 8.4.0 for Windows on a windows desktop.

Re: [GENERAL] \copy: unexpected response (4)

2009-08-07 Thread Tom Lane
Neil Best nb...@ci.uchicago.edu writes: Tom Lane-2 wrote: Hmm. It looks like psql could get into an infinite loop if the server failed to exit COPY IN mode for some reason, but it's not at all clear how that could happen (or what to do about it). What server version and what psql version is

Re: [GENERAL] psql and Emacs on Windows

2009-08-07 Thread Sam Mason
On Fri, Aug 07, 2009 at 11:11:10AM -0500, Wenjian Yang wrote: We currently installed emacs 23.1 and PostgreSQL 8.4.0 for Windows on a windows desktop. When issue sql-postgres in emacs, after providing User/Password/Database/Server, nothing happens. There is no prompt from emacs. Checking the

Re: [GENERAL] psql and Emacs on Windows

2009-08-07 Thread Joshua D. Drake
On Fri, 2009-08-07 at 17:36 +0100, Sam Mason wrote: On Fri, Aug 07, 2009 at 11:11:10AM -0500, Wenjian Yang wrote: We currently installed emacs 23.1 and PostgreSQL 8.4.0 for Windows on a windows desktop. When issue sql-postgres in emacs, after providing User/Password/Database/Server, nothing

[GENERAL] 2nd call for papers (PostgreSQL West)

2009-08-07 Thread Joshua D. Drake
Hey folks, West is upon us shortly. Get those talks in: http://www.postgresqlconference.org/2009/west Joshua D. Drake -- PostgreSQL - XMPP: jdr...@jabber.postgresql.org Consulting, Development, Support, Training 503-667-4564 - http://www.commandprompt.com/ The PostgreSQL Company,

Re: [GENERAL] \copy: unexpected response (4)

2009-08-07 Thread Tom Lane
I wrote: Hmm, so it looks like the connection dropped and libpq failed to recognize that, or maybe libpq was okay but psql needs to check a bit more carefully here. I'll take a look. I could not reproduce this problem in testing, but after eyeballing the code awhile I have a theory. It looks

Re: [GENERAL] psql and Emacs on Windows

2009-08-07 Thread Bill Bartlett
On Friday, August 07, 2009 12:44 PM, Joshua D. Drake wrote: On Fri, 2009-08-07 at 17:36 +0100, Sam Mason wrote: On Fri, Aug 07, 2009 at 11:11:10AM -0500, Wenjian Yang wrote: We currently installed emacs 23.1 and PostgreSQL 8.4.0 for Windows on a windows desktop. When issue sql-postgres in

[GENERAL] Getting linux $USER (and perhaps other env vars) in PL/pg-sql?

2009-08-07 Thread Gauthier, Dave
Hi: Running 8.3.4 on Linux. From inside a stored procedure, is there a way to capture the linux user (environment var = $USER) that is attached to the DB? A simplistic (though meaningless) example would be echo $USER from something like select get_linux_user(). Thanks -dave

Re: [GENERAL] Getting linux $USER (and perhaps other env vars) in PL/pg-sql?

2009-08-07 Thread Sam Mason
On Fri, Aug 07, 2009 at 12:08:45PM -0700, Gauthier, Dave wrote: Running 8.3.4 on Linux. From inside a stored procedure, is there a way to capture the linux user (environment var = $USER) that is attached to the DB? Not really, what if they were connecting over the network from a device that

Re: [GENERAL] Postgresql Backups

2009-08-07 Thread Scott Marlowe
On Thu, Aug 6, 2009 at 6:42 AM, sub_woofertqzeli...@yahoo.co.uk wrote: Hello all To backup my postgresql data I use the pg_dumpall command which dumps all my databases to a .sql file. If I would like to restore a single database from this file how would I do this? Is it possible using

Re: [GENERAL] Postgresql Backups

2009-08-07 Thread Ray Stell
On Fri, Aug 07, 2009 at 01:54:47PM -0600, Scott Marlowe wrote: You're probably better off switching to explicitly backing up databases in the custom format and using a single pg_dumpall --globals to backup the users accounts and such. -g --globals-only Dump only global objects (roles

[GENERAL] Changing referenced primary key column type

2009-08-07 Thread Andrus Moor
8.x Db contains tables create table ametikoh ( ametikoht numeric(7) NOT NULL DEFAULT nextval('firma1.ametikoh_ametikoht_seq'::regclass) primary key ); create table iandmed ( ametikoht numeric(7) references ametikoh); I created conversion script which normalizes column types: alter table

Re: [GENERAL] \copy: unexpected response (4)

2009-08-07 Thread Neil Best
On Fri, Aug 7, 2009 at 12:33 PM, Tom Lanet...@sss.pgh.pa.us wrote: BTW, the SSL renegotiation failure bit suggests that it could have been an OpenSSL bug not a real network lossage, so you might want to see how up-to-date your openssl libraries are. Thanks for your comments, Tom. The

Re: [GENERAL] Changing referenced primary key column type

2009-08-07 Thread Tom Lane
Andrus Moor kobrule...@hot.ee writes: 8.x Db contains tables create table ametikoh ( ametikoht numeric(7) NOT NULL DEFAULT nextval('firma1.ametikoh_ametikoht_seq'::regclass) primary key ); create table iandmed ( ametikoht numeric(7) references ametikoh); I created conversion script which

Re: [HACKERS] [GENERAL] \copy: unexpected response (4)

2009-08-07 Thread Tom Lane
Neil Best nb...@ci.uchicago.edu writes: On Fri, Aug 7, 2009 at 12:33 PM, Tom Lanet...@sss.pgh.pa.us wrote: BTW, the SSL renegotiation failure bit suggests that it could have been an OpenSSL bug not a real network lossage, so you might want to see how up-to-date your openssl libraries are.

Re: [GENERAL] Make check fails on 8.3.7

2009-08-07 Thread Christine Desmuke
Alban Hertroys wrote: On 7 Aug 2009, at 4:02, Christine Desmuke wrote: If so, isn't it just the output of stderr getting lost here? What shell are you using? Yes, it looks like stderr is lost. I'm running bash, and there is nothing odd in .bash_profile Any ideas? I have to admit I'm

Re: [GENERAL] Make check fails on 8.3.7

2009-08-07 Thread Tom Lane
Christine Desmuke cdesm...@kshs.org writes: [postg...@zu ~]$ /usr/local/pgsql/bin/psql -U nobody psql: [postg...@zu ~]$ [That is, the expected error from psql about the nonexistent user is swallowed.] Try the above under strace, and see what it shows happening to the writes to stderr (they

Re: [GENERAL] Make check fails on 8.3.7

2009-08-07 Thread Tom Lane
Christine Desmuke cdesm...@kshs.org writes: [postg...@zu ~]$ /usr/local/pgsql/bin/psql -U nobody psql: [postg...@zu ~]$ Wait a minute ... I just looked closer at your sample there. That shows that psql *is* able to output to stderr, because it was able to print its own name. So we've been

[GENERAL] smart or dumb partition?

2009-08-07 Thread Bob Gobeille
I gather from rtfm that it is typical to set up partitions so that the master table has no records. But from my understanding of partitions and doing some tests, I don't see any reason that has to be. So I'm wondering if I'm missing some subtle (or not so subtle) point about partitions?

Re: [GENERAL] smart or dumb partition?

2009-08-07 Thread Greg Stark
On Sat, Aug 8, 2009 at 12:27 AM, Bob Gobeillebob.gobei...@hp.com wrote: I gather from rtfm that it is typical to set up partitions so that the master table has no records.  But from my understanding of partitions and doing some tests, I don't see any reason that has to be.  So I'm wondering if

Re: [GENERAL] Make check fails on 8.3.7

2009-08-07 Thread Tom Lane
I wrote: (I seem to recall seeing a similar report once before, but I can't find it in the archives right now.) I found what I think is the bug I was remembering: http://archives.postgresql.org/pgsql-bugs/2007-05/msg00074.php but unfortunately it's not much help since we never did resolve what

[GENERAL] Adding ACL notion to existing tables

2009-08-07 Thread Bruno Baguette
Hello ! I would like known your appreciation, and to get some advices and tips about a design issue about adding ACL notion. I have several *existing* tables that manages some user's items which are quite different (postal adresses, photos, climbing_skills,...). Please note that Users are

Re: [GENERAL] smart or dumb partition?

2009-08-07 Thread Bob Gobeille
On Aug 7, 2009, at 5:44 PM, Greg Stark wrote: On Sat, Aug 8, 2009 at 12:27 AM, Bob Gobeillebob.gobei...@hp.com wrote: I gather from rtfm that it is typical to set up partitions so that the master table has no records. But from my understanding of partitions and doing some tests, I don't