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?
select privilege
for sequences, privilege allows use of
currval
function.
usage privilege
for sequences, privilege allows use of
currval
andnextval
functions.
(emphasis mine)
so answer is: if want allow usage of nextval()
have grant usage
privilege. if grant usage, select privilege not needed.
Comments
Post a Comment