RE: [SQL] Help creating rules/triggers/functions

2001-03-06 Thread Sondaar Roelof
aise Carrupt [SMTP:[EMAIL PROTECTED]] > Sent: 02 March 2001 16:29 > To: [EMAIL PROTECTED] > Subject: RE: [SQL] Help creating rules/triggers/functions > > Hi Roelof ! > > I thank you for your answer. It allowed me to find a way to resolve my > problems. > What is mi

Re: [SQL] Help creating rules/triggers/functions

2001-03-03 Thread Jan Wieck
Blaise Carrupt wrote: > Hi all ! > > I use PostgreSQL 7.0.2 on a HP-UX system. > > I would like to create a simple function and a simple trigger (or rule) that > deny a delete from a table if the row is referenced in another table. > > I though it should look like this (from my Ingres experience..

Re: [SQL] Help creating rules/triggers/functions

2001-03-02 Thread Stephan Szabo
If you're only doing a simple check for reference, why not use foreign keys? In general however, you probably want to use plpgsql to define the trigger. And trigger functions don't take parameters in the normal sense, the function should be created taking no args and returning opaque; the para

RE: [SQL] Help creating rules/triggers/functions

2001-03-02 Thread Sondaar Roelof
February 2001 17:43 > To: [EMAIL PROTECTED] > Subject: [SQL] Help creating rules/triggers/functions > > Hi all ! > > I use PostgreSQL 7.0.2 on a HP-UX system. > > I would like to create a simple function and a simple trigger (or rule) > that > deny a delete f

[SQL] Help creating rules/triggers/functions

2001-03-02 Thread Blaise Carrupt
Hi all ! I use PostgreSQL 7.0.2 on a HP-UX system. I would like to create a simple function and a simple trigger (or rule) that deny a delete from a table if the row is referenced in another table. I though it should look like this (from my Ingres experience... :) : create function A_del(int4