Search Postgresql Archives

Re: trigger help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux