I have an Postgres database with two users: dev
and junit
. Junit and dev objects are dropped and created regularly.
They both have the same objects unshared for tables, however, sequences are shared, and dev
is the owner. I just use normal create
statements.
I want to grant all
to junit
for the sequence but this fails with:
dev=> grant all on sequence serial to junit;
WARNING: no privileges were granted for "serial"
GRANT
After this junit
has no select rights on the sequence, how can I fix this?
I also would like to know whether there are recipes for this kind of setups, where I can use the same DDL for the two different users without modifying the script? I've been looking into schemas but I haven't found the solution so far.