pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@postgresql.org
Cc: Michael Monnerie <michael.monnerie@is.it-management.at>
Subject: Re: Question on rule
Date: Mon, 23 Feb 2009 15:58:51 +0200
Message-ID: <200902231558.52381.achill@matrix.gatewaynet.com> (raw)
In-Reply-To: <200902210943.35832@zmi.at>
References: <200902210943.35832@zmi.at>

Óôéò 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



view thread (2+ messages)

Message-ID: <200902231558.52381.achill@matrix.gatewaynet.com>
Permalink:  ../200902231558.52381.achill@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/200902231558.52381.achill@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: achill@matrix.gatewaynet.com, michael.monnerie@is.it-management.at
  Subject: Re: Question on rule
  In-Reply-To: <200902231558.52381.achill@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox