Stephan Szabo wrote:
> On Wed, 18 Sep 2002, Bruce Momjian wrote:
> 
> > Sean Chittenden wrote:
> > > > But it seems so illogical that SET doesn't start a transaction, but
> > > > if it is in a transaction, it is rolled back, and this doesn't help
> > > > our statement_timeout example except to require that they do BEGIN
> > > > to start the transaction even when autocommit is off.
> > >
> > > Really?  To me that makes perfect sense.  Logic:
> > >
> > > *) Only BEGIN starts a transaction
> >
> > I think the above item is the issue.  Everything is clear with
> > autocommit on.  With autocommit off, COMMIT/ROLLBACK starts a
> > transaction, not BEGIN.  BEGIN _can_ start a transaction, but it isn't
> > required:
> 
> AFAICT, according to spec, commit/rollback does not start a transaction,
> the transcation is started with the first transaction initiating statement
> when there isn't a current transaction.  And, most of the SQL92 commands
> that start with SET fall into the category of commands that do not
> initiate transactions.

OK, I am ready to say I was wrong.  Most people like that behavior so
let's do it.  Thanks for listening to me.

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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to