trigger sub-functions

From: "Thomas F(dot) O'Connell" <tfo(at)monsterlabs(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: trigger sub-functions
Date: 2001-05-10 18:11:33
Message-ID: 3AFAD9D5.4070006@monsterlabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

is there any way to get access to the new and old records created by a
trigger in the function it calls?

i.e., if i have

create trigger after_insert after insert on foo
execute procedure trigger_after_insert_foo();

is there any way to do something like the following...

create function trigger_after_insert_foo() returns opaque as '
begin
/*
* have some function like sub_foo() that accesses new and * returns it
somehow.
*/
return new;
end
' language 'plpgsql';

-tfo

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-05-10 18:13:46 Re: Query not using index
Previous Message newsreader 2001-05-10 18:08:56 very odd behavior