From: | Bill Moran <wmoran(at)collaborativefusion(dot)com> |
---|---|
To: | Peter Billen <peter(at)clueless(dot)be> |
Cc: | PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: disallow updates on column or whole table |
Date: | 2008-12-10 14:14:04 |
Message-ID: | 20081210091404.5c8acebb.wmoran@collaborativefusion.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Don't change thread subjects, it confuses people. Start a new thread
if you have a new topic.
In response to Peter Billen <peter(at)clueless(dot)be>:
>
> What is the best way to disallow updates on a column of a table, or even
> on a whole table itself?
>
> I can write a BEFORE UPDATE trigger which compares old.column_name(s) to
> new.column_name(s) and raise an exception if these values are different.
>
> Are there better ways?
You can use the GRANT system to enforce table-wide restrictions. See
the docs on GRANT and REVOKE and associated doc sections.
--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/
wmoran(at)collaborativefusion(dot)com
Phone: 412-422-3463x4023
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Morgan Lloyd | 2008-12-10 14:20:59 | Re: Favorite Tom Lane quotes |
Previous Message | Grzegorz Jaśkiewicz | 2008-12-10 13:54:39 | Re: 8.2.6 -> 8.1.11: syntax error at or near "OWNED BY" |