In database server Postgres 9.x or Postgres 10.x can I share the same sequence from 2 user?
For example in the same database dbTest there are 2 schemas
- userA is schema owner schemaA with a sequenceA
- userB is schema owner schemaB
Can userB use sequenceA sequence? What are the permits to be given?
After solution there is the situation:
userA: select nextval('sequenceA');
userB: select nextval('schemaA.sequenceA');
If I also want for the userB: select nextval('sequenceA');
Is there a solution?