Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8ABD5476083 for ; Thu, 26 Sep 2002 15:01:29 -0400 (EDT) Received: from amer-mta01.csc.com (amer-mta01.csc.com [20.137.2.247]) by postgresql.org (Postfix) with ESMTP id 55808475EC7 for ; Thu, 26 Sep 2002 15:01:28 -0400 (EDT) Received: from csc.com (va-fch31.csc.com [20.6.39.231]) by amer-mta01.csc.com (Switch-2.2.2/Switch-2.2.0) with ESMTP id g8QJ1RS15323 for ; Thu, 26 Sep 2002 15:01:27 -0400 (EDT) Subject: ECPG - Clarfication of '-t', 'autocommit', BEGIN? To: pgsql-interfaces@postgresql.org X-Mailer: Lotus Notes Release 5.0.6a January 17, 2001 Message-ID: From: "William West" Date: Thu, 26 Sep 2002 13:57:40 -0400 X-MIMETrack: Serialize by Router on VA-FCH31/SRV/CSC(Release 5.0.8 |June 18, 2001) at 09/26/2002 03:08:07 PM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/85 X-Sequence-Number: 3146 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.