开发者

PostgreSql : Disallow the update of a column : how?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜