pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: wespvp@syntegra.com
To: pgsql-interfaces@postgresql.org
Subject: Re: NULLs in ecpg
Date: Thu, 22 Jul 2004 19:51:39 +0200
Message-ID: <200407221951.39787.peter_e@gmx.net> (raw)
In-Reply-To: <BD25638F.F5C3%wespvp@syntegra.com>
References: <BD25638F.F5C3%wespvp@syntegra.com>

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/




view thread (6+ messages)

Message-ID: <200407221951.39787.peter_e@gmx.net>
Permalink:  ../200407221951.39787.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200407221951.39787.peter_e@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: peter_e@gmx.net, wespvp@syntegra.com
  Subject: Re: NULLs in ecpg
  In-Reply-To: <200407221951.39787.peter_e@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox