Re: AutoCommit GUC breaks CLI tools...

Lists: pgsql-hackers
From: Sean Chittenden <sean(at)chittenden(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: AutoCommit GUC breaks CLI tools...
Date: 2002-08-31 20:26:18
Message-ID: 20020831202618.GT99083@ninja1.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

This is pretty chump and easy to get around, but it took me a sec to
figure this out. Anyway, the short and skinny being that with the new
AutoCommit GUC turned off, create(lang|db) won't work until you bail
out of the transaction. A quick hack would be to insert an "ABORT;"
in each of the CLI tools. Anyone have any thoughts on the best way to
solve this? -sc

--
Sean Chittenden


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: AutoCommit GUC breaks CLI tools...
Date: 2002-09-02 05:36:18
Message-ID: 6871.1030944978@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Sean Chittenden <sean(at)chittenden(dot)org> writes:
> This is pretty chump and easy to get around, but it took me a sec to
> figure this out. Anyway, the short and skinny being that with the new
> AutoCommit GUC turned off, create(lang|db) won't work until you bail
> out of the transaction. A quick hack would be to insert an "ABORT;"
> in each of the CLI tools. Anyone have any thoughts on the best way to
> solve this? -sc

Well, like I was saying earlier, I think there is a *lot* of client-side
code that is not ready for this. I would not have thrown in the
autocommit backend feature at all, except that we need it to run the
NIST SQL-spec-compliance tests.

The answer for createlang is probably to throw a BEGIN and a COMMIT
around each command --- that should make it work in either autocommit
on or off modes. We'll have to see how well that scales to other stuff.

regards, tom lane


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: AutoCommit GUC breaks CLI tools...
Date: 2002-09-02 05:37:23
Message-ID: 200209020537.g825bNG13519@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


How about adding 'set autocommit=on' to the top of each script?

---------------------------------------------------------------------------

Sean Chittenden wrote:
-- Start of PGP signed section.
> This is pretty chump and easy to get around, but it took me a sec to
> figure this out. Anyway, the short and skinny being that with the new
> AutoCommit GUC turned off, create(lang|db) won't work until you bail
> out of the transaction. A quick hack would be to insert an "ABORT;"
> in each of the CLI tools. Anyone have any thoughts on the best way to
> solve this? -sc
>
> --
> Sean Chittenden
-- End of PGP section, PGP failed!

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073