Search Postgresql Archives

Re: disallow updates on column or whole table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't change thread subjects, it confuses people.  Start a new thread
if you have a new topic.

In response to Peter Billen <peter@xxxxxxxxxxx>:
> 
> 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@xxxxxxxxxxxxxxxxxxxxxxx
Phone: 412-422-3463x4023

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux