Re: autocommit vs TRUNCATE et al - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: autocommit vs TRUNCATE et al
Date
Msg-id 200210212311.g9LNBqo21724@candle.pha.pa.us
Whole thread Raw
In response to Re: autocommit vs TRUNCATE et al  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: autocommit vs TRUNCATE et al  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > One particularly nasty problem is issuing a VACUUM or TRUNCATE in cases
> > where you don't know the autocommit mode.  You could set autocommit to
> > 'on', and issue the command, but how do you know if you need to turn
> > autocommit back off again?
> 
> Perhaps RESET AUTOCOMMIT is a good enough answer?

I was unclear on that.  RESET sets it back to the postgresql.conf value,
right?  Do we know that the session didn't change it earlier in the
script?  That's where it gets tricky.

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: autocommit vs TRUNCATE et al
Next
From: Bruce Momjian
Date:
Subject: One 7.3 item left