Skip site navigation (1) Skip section navigation (2)

ECPG - Clarfication of '-t', 'autocommit', BEGIN?

From: "William West" <wwest(at)csc(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: ECPG - Clarfication of '-t', 'autocommit', BEGIN?
Date: 2002-09-26 17:57:40
Message-ID: OF1567F4D5.8BDE1A20-ON85256C40.005F08F9@com (view raw or flat)
Thread:
Lists: pgsql-interfaces
The ecpg man page says that '-t' will turn autocommit 'on', that
the default is that otherwise a 'commit' statement is needed to
cause a 'commit'.

In a posting from December of 2001, there was a complaint
that issuing EXEC SQL BEGIN; immediately following
CONNECT returned "BEGIN: already a transaction in progress",
to which Michael Meskes replied that it is necessary to run ecpg
*with* the '-t' switch (or, as someone else said, issue 'exec sql set
autocommit to on') if you want to BEGIN your own transactions.

Am I wrong in thinking that BEGIN-(set of commands)
-COMMIT should be equivalent to 'start transaction
-perform sequence of commands-commit result of
sequence of commands'? Or does BEGIN become
superfluous when running *without* -t? Could someone
please clarify?

Thanks.



Responses

pgsql-interfaces by date

Next:From: PaulDate: 2002-09-26 18:25:59
Subject: Is there Pg PPM module (perl, win32) ?
Previous:From: Constantin TeodorescuDate: 2002-09-26 15:29:42
Subject: Has someone compiled PostgreSQL JDBC with gcj ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group