X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4EC01D1B199 for ; Thu, 22 Jul 2004 14:51:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 68204-03 for ; Thu, 22 Jul 2004 17:51:44 +0000 (GMT) Received: from mail.gmx.net (imap.gmx.net [213.165.64.20]) by svr1.postgresql.org (Postfix) with SMTP id 8A40FD1B1D1 for ; Thu, 22 Jul 2004 14:51:41 -0300 (ADT) Received: (qmail 24059 invoked by uid 65534); 22 Jul 2004 17:51:40 -0000 Received: from dsl-213-023-255-061.arcor-ip.net (EHLO colt.pezone.net) (213.23.255.61) by mail.gmx.net (mp008) with SMTP; 22 Jul 2004 19:51:40 +0200 X-Authenticated: #495269 From: Peter Eisentraut To: , Subject: Re: NULLs in ecpg Date: Thu, 22 Jul 2004 19:51:39 +0200 User-Agent: KMail/1.5.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200407221951.39787.peter_e@gmx.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/39 X-Sequence-Number: 5045 wespvp@syntegra.com wrote: > What is the scope of a BEGIN or an implicit transaction in ECPG? Is > it a physical subroutine, or can it span functions containing EXEC > SQL statements? It is independent of the control flow of your C program. Only the order of the actually executed SQL statements matters. > For example, if I have: > > > void a (xxx) > { > EXEC SQL SELECT ... for UPDATE; > EXEC SQL UPDATE ... > } > > void b (xxx) > { > EXEC SQL begin; > > a(xxxx); > > a(yyyy); > > EXEC SQL COMMIT; > } > > > Do the multiple calls to 'a' remain in the same transaction? Indeed -- Peter Eisentraut http://developer.postgresql.org/~petere/