From: Francois TETE <francois.tete@supranets.com>
To: pgsql-sql@postgresql.org
Subject: Rule "Delete"
Date: Tue, 16 Jun 1998 11:02:39 +0200
Message-ID: <01bd9905$833337a0$0700a8c0@ft.asnieres.supranets.com> (raw)
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.tete@supranets.com
Phone: +33 1 46 88 09 69
Fax : +33 1 47 90 65 56
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: francois.tete@supranets.com
Subject: Re: Rule "Delete"
In-Reply-To: <01bd9905$833337a0$0700a8c0@ft.asnieres.supranets.com>
References: <01bd9905$833337a0$0700a8c0@ft.asnieres.supranets.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