Re: preventing deletion of a row - Mailing list pgsql-sql

From Kenneth Gonsalves
Subject Re: preventing deletion of a row
Date
Msg-id 200506071213.37155.lawgon@thenilgiris.com
Whole thread Raw
In response to Re: preventing deletion of a row  (Nick Johnson <arachnid@notdot.net>)
List pgsql-sql
On Tuesday 07 Jun 2005 11:29 am, Nick Johnson wrote:
> >if the value of 'fixed' is TRUE, then this row cannot be deleted.
> > How do i enforce this condition?
> >  
>
> Try this:
> CREATE RULE tablename_delete AS ON DELETE TO tablename WHERE
> OLD.fixed = TRUE DO INSTEAD NOTHING;

cool - thanks

--
regards
kg

http://www.livejournal.com/users/lawgon
tally ho! http://avsap.sourceforge.net
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!


pgsql-sql by date:

Previous
From: Volkan YAZICI
Date:
Subject: Re: large object support in PostGres 7.4
Next
From: Achilleus Mantzios
Date:
Subject: Re: What is faster?