In PostgreSQL, when granting sequences, can I grant only USAGE instead of both SELECT, USAGE? -


i read answers granting sequences in postgresql. generally, grant both select, usage. wonder if can grant usage. 1 best practice in granting sequences , why?

quote manual

select privilege

for sequences, privilege allows use of currval function.

usage privilege

for sequences, privilege allows use of currval and nextval functions.

(emphasis mine)

so answer is: if want allow usage of nextval() have grant usage privilege. if grant usage, select privilege not needed.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -