Re: pl/pgSQL & transaction

Поиск
Список
Период
Сортировка
От Tibor Laszlo
Тема Re: pl/pgSQL & transaction
Дата
Msg-id 01011911292000.01181@tir
обсуждение исходный текст
Ответ на pl/pgSQL & transaction  ("Zolof" <zolof@club-internet.fr>)
Ответы Re: pl/pgSQL & transaction  (Kovacs Zoltan Sandor <tip@pc10.radnoti-szeged.sulinet.hu>)
Список pgsql-interfaces
> This code doesn't work. I use Begin Work to start a transaction but BEGIN is
> a PL/pgSQL command so I have a parse error when executing it.
> 
> CREATE FUNCTION a () RETURNS int4 AS '
> BEGIN
>    BEGIN WORK;
>    COMMIT WORK;
>     return 1;
>     END;
> ' LANGUAGE 'plpgsql';
> 
> What's wrong ????

Is it possible to use transactions in PL/pgSQL functions? AFAIK these functions
always(?) in a transaction (eg as triggers or as stored pprocs) and PostgreSQL
doesn't support nested transactions.

-- 
Tibor Laszlo
ltibor@mail.tiszanet.hu


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

Предыдущее
От: Peter T Mount
Дата:
Сообщение: Re: [PATCHES] Re: Fixes and enhancements to JDBC driver (take 2)
Следующее
От: Mindaugas Idzelis
Дата:
Сообщение: bug in ODBC driver (and fix)