This is a discussion on Triggers | rules for column updates within the pgsql Novice forums, part of the PostgreSQL category; --> Hi! I want to prevent any changes to a tuple if a field of the tuple has a certain ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 -- Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org) To make changes to your Subscription: http://mail.postgresql.org/mj/mj_www...a=pgsql-novice |