Re: COMMIT in PostgreSQL - Mailing list pgsql-general

From Adrian 'Dagurashibanipal' von Bidder
Subject Re: COMMIT in PostgreSQL
Date
Msg-id 1027090843.8993.34.camel@atlas
Whole thread Raw
In response to Re: COMMIT in PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: COMMIT in PostgreSQL
List pgsql-general
On Fri, 2002-07-19 at 15:48, Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
> > On Sat, Jul 20, 2002 at 03:03:02PM +0300, stefan@extum.com wrote:
> >> thanks a lot all for comments. So in PostgreSQL each query is a
> >> transaction ?
>
> > If you want them that way. If you want to combine them into one transaction,
> > you use BEGIN.
>
> Right; otherwise you get the sort of behavior that some other databases
> call auto-commit.
>
> While we can't change this without breaking huge amounts of client code,
> there has been talk of offering a parameter setting that could be
> changed to support the SQL-standard behavior (which could be thought of
> as auto-BEGIN in Postgres terms: any statement implicitly causes a
> BEGIN, and then you stay in that transaction until you explicitly say
> COMMIT).

How much client code would break if pg would start-up in 'autocommit',
and revert to standard SQL after receiving the first 'COMMIT'?
(Supposing - I don't know that - that standard SQL but an implicit BEGIN
at statements issued after a COMMIT).

Benefits: adapting SQL code that excepts standard behaviour would be
easy to fix by just requiring to enter a BEGIN upon opening the
connection.

Just a thought.

cheers
-- vbi

--
secure email with gpg                         http://fortytwo.ch/gpg

Attachment

pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Looking for types: phone number, email addresses
Next
From: Stephane Bortzmeyer
Date:
Subject: Re: Looking for types: phone number, email addresses