0

I am using postgresql. I have created a user and grant access on db. I want user can only see granted schema objects and rest database/schema objects can't watchable. Please guide me.

  • http://stackoverflow.com/questions/760210/how-do-you-create-a-read-only-user-in-postgresql?rq=1 –  Sep 02 '15 at 12:41

1 Answers1

0

You need to alter the user and set the search path.

ALTER USER foo SET search_path TO '$newschema,pg_catalog';

Note that in order to get a proper backup of globals such as this you have to use pg_dumpall -g, not pg_dump. Obviously a base backup will have them as well.

Joshua D. Drake
  • 1,026
  • 5
  • 6