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
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..
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
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
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