Re: trigger help

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: trigger help
Дата
Msg-id 20060822135934.GA56791@winnie.fuhr.org
обсуждение исходный текст
Ответ на trigger help  (marcelo Cortez <jmdc_marcelo@yahoo.com.ar>)
Ответы Re: trigger help  (marcelo Cortez <jmdc_marcelo@yahoo.com.ar>)
Список pgsql-general
On Tue, Aug 22, 2006 at 10:38:31AM -0300, marcelo Cortez wrote:
>  I think my trigger need transaction ,but the pgsql
> compiler refuse to compile 'begin .. commit ' sequence
> I use the perform , to do the works

Functions can't start or end transactions because they're already
being executed in the context of a transaction; you'll have to do
the BEGIN and COMMIT outside the function.  However, there is a way
around that restriction: the function could use dblink to connect
to the database as a client and then execute statements over that
connection.

>  CREATE OR REPLACE FUNCTION xxxx_create_cache(text)
>   RETURNS text AS

This isn't a trigger function.  Are you sure "trigger" is the
word you meant?

--
Michael Fuhr

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Queries joining views
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Queries joining views