Re: Question on rule

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Cc: Michael Monnerie <michael(dot)monnerie(at)is(dot)it-management(dot)at>
Subject: Re: Question on rule
Date: 2009-02-23 13:58:51
Message-ID: 200902231558.52381.achill@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Στις Saturday 21 February 2009 10:43:35 ο/η Michael Monnerie έγραψε:
> $$ LANGUAGE plpgSQL;

do smth like:

CREATE or REPLACE function foofunc() RETURNS TRIGGER as $$
BEGIN
insert into test2(descr) values(new.descr);
INSERT into test2(descr) values(new.descr||'FOOBAR');
RETURN NEW;
END
$$ LANGUAGE plpgSQL;

CREATE TRIGGER foofunc_trig AFTER INSERT ON test1 FOR EACH ROW EXECUTE PROCEDURE foofunc();

--
Achilleas Mantzios

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Nicola Mauri 2009-02-23 16:49:35 Re: Crash with data corruption under Windows
Previous Message Pawel Socha 2009-02-23 11:24:26 Re: Problem With using PERL::DBI in plperlu function