From: | "Francois TETE" <francois(dot)tete(at)supranets(dot)com> |
---|---|
To: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Rule "Delete" |
Date: | 1998-06-16 09:02:39 |
Message-ID: | 01bd9905$833337a0$0700a8c0@ft.asnieres.supranets.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Has anybody tried to use delete-rules with PostgreSQL 6.3 ?
I have a table named "ifTable" with columns "id" and "ifType" with an index
on "id".
and a table named "profilTable" with column "id" and some other columns.
Each time I insert a row in profilTable I want to insert a row in ifTable,
so
I created a rule :
create rule r1 as on insert to profilTable do insert into ifTable values
(new.id, 'profil');
I would like to automatically remove this entry in iftable when I delete the
corresponding row in profilTable, but my rule does not work (nothings
happens and/or
the backend crashes after displaying : "copyObject : don't know how to copy
XXX" ) :
create rule r2 as on delete to profilTable do delete from ifTable where
id=current.id;
Could anybody help me ?
---
François TETE
SupraNETS
25 rue des Bas - 92600 Asnières - FRANCE
Mail : francois(dot)tete(at)supranets(dot)com
Phone: +33 1 46 88 09 69
Fax : +33 1 47 90 65 56
From | Date | Subject | |
---|---|---|---|
Next Message | Marcio Macedo | 1998-06-16 09:07:23 | handle the MONEY type |
Previous Message | Richard Lynch | 1998-06-16 08:14:56 | cast text as date |