From: | "Emils Klotins" <emils(at)mail(dot)usis(dot)bkc(dot)lv> |
---|---|
To: | Sbastien BOUTELOUP <Sebastien(dot)Bouteloup(at)upmf-grenoble(dot)fr> |
Cc: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | Re: [SQL] Problem with postgreSQL triggers |
Date: | 1999-08-12 15:20:00 |
Message-ID: | 199908121222.PAA12119@www.usis.bkc.lv |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> to use the traditionnal structure:
> create trigger <trigger name>
> before delete on <table name>
> for each row
> BEGIN
> query;
> END; ?
> Otherwise, how can I deal with the "execute procedure <procedure
> name>" statement? Thanks
As from postgresql.org website:
CREATE TRIGGER name { BEFORE | AFTER } { event [OR
...] } ON table FOR EACH { ROW | STATEMENT }
EXECUTE PROCEDURE ( arguments )
you should apparently create a procedure/function much of the same
as with:
CREATE FUNCTION name ( [ ftype [, ...] ] ) RETURNS rtype
AS definition LANGUAGE 'langname'
BEGIN/END I think would be restricted to transactions. And therefore
would be considered reserved words?
Just my idea. Haven't used triggers in Pg yet myself. You might see
under contributed things / refint (referential integrity) package
somewhere, there should be lots of triggers I assume.
Emils Klotins e-mail: emils(at)mail(dot)usis(dot)bkc(dot)lv
Systems Manager URL: http://www.usis.bkc.lv/
USIS Riga 7 Smilsu Str., Riga LV1050, LATVIA
From | Date | Subject | |
---|---|---|---|
Next Message | Bart Ogryczak | 1999-08-12 15:24:05 | Re: [SQL] Searching Text Fields - Case Sensitive? |
Previous Message | Mike Field | 1999-08-12 14:59:20 | Searching Text Fields - Case Sensitive? |