From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: trigger question |
Date: | 2007-01-19 06:52:35 |
Message-ID: | 20070119065235.GC26274@a-kretschmer.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
am Tue, dem 16.01.2007, um 18:35:56 +0100 mailte Furesz Peter folgendes:
> Hello,
>
> I have a table named foobar and I don't want to allow from DELETE or
> UPDATE its rows.
>
> I have a table as described below:
> foobar(foobar_id, value, is_deleted);
>
> I don't want to allow directly delete or modify the table's rows. I plan to
> make an on before update or delete trigger and
> on delete action I update the actual row is_deleted flag, on UPDATE action
I think, you should better use a RULE for this:
http://www.postgresql.org/docs/8.2/interactive/rules.html
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
From | Date | Subject | |
---|---|---|---|
Next Message | Devrim GUNDUZ | 2007-01-19 06:59:42 | Re: uninstalling postgre sql on Fedora core 5 |
Previous Message | Chris | 2007-01-19 06:18:58 | Re: help me to solve the problem |