Triggers | rules for column updates - Mailing list pgsql-novice

From Szentpali Janos
Subject Triggers | rules for column updates
Date
Msg-id 47CC018E.7030409@easynet.ro
Whole thread Raw
Responses Re: Triggers | rules for column updates  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-novice
Hi!

I want to prevent any changes to a tuple if a field of the tuple has a
certain value. Let's say I have a table with column col_1, col_2, col_3.
I want to create something that will prevent updating col_2 and col_3 if
and only if col_1 is say "1".
Can I use a rule to do that. Can I somehow detect in a trigger function
the name of the columns that are updated? If I could do that, it would
be easy to create a trigger that would do the job.
I am also opened to other kind of solutions that you might know of.
Any help will be appreciated ;)

--
Szentpáli János


pgsql-novice by date:

Previous
From: Ennio-Sr
Date:
Subject: Re: pidof not working for postgresql-8.3 ?
Next
From: "A. Kretschmer"
Date:
Subject: Re: Triggers | rules for column updates