开发者

PostgreSql : Disallow the update of a column : how?

开发者 https://www.devze.com 2023-01-07 17:48 出处:网络
Is is possible with PostgreSql without a trigger to not allow the update of开发者_StackOverflow中文版 a column, just the insertion is allowed.Completely untested but as Postgres SQL supports column le

Is is possible with PostgreSql without a trigger to not allow the update of开发者_StackOverflow中文版 a column, just the insertion is allowed.


Completely untested but as Postgres SQL supports column level permissions it looks like it might be. http://www.postgresql.org/docs/current/static/sql-grant.html

Does this work?

GRANT SELECT (col1, col2), INSERT(col1, col2), UPDATE (col1) ON mytable TO userX;
0

精彩评论

暂无评论...
验证码 换一张
取 消