Re: NULLs in ecpg

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: NULLs in ecpg
Дата
Msg-id 200407221951.39787.peter_e@gmx.net
обсуждение исходный текст
Ответ на Re: NULLs in ecpg  (<wespvp@syntegra.com>)
Список pgsql-interfaces
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/



В списке pgsql-interfaces по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: NULLs in ecpg
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: libpq: usage of PQoidValue to obtain serial primary key after insert