Create objects(table etc) to be stored in specific schema

From: Sam Turnbull <samturnbull73(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Create objects(table etc) to be stored in specific schema
Date: 2015-10-15 12:10:15
Message-ID: CAD_MY-z4tkDE99oKRzD4LeoghJJ=gf1UAECEvyciXZ7L4mAh=A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Gurus,

I am still picking up skill on postgres and have received a specific
requirement.

Create database : DB
Create user: USERA
Schema : SCHEMAC
User USERA should have all the access to create objects/execute in its own
schema.

1. I have created database DB with owner as DB(created one user as DB).
2. created user USERA using $createuser command, with role as USERA, no
create database/super users etc are not given
3. Created Schema as - command -"Create schema SCHEMAC authorization USERA"

But objects are getting created in public,
I understand by default its the feature and is looking for assistance in
how can I redirect to SCHEMAC.

Any other better way of doing is also welcome.

Thanks
Naresh

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Geo P.C. 2015-10-15 13:58:32 Accessing Extension with out Superuser privilege
Previous Message David Osborne 2015-10-15 11:25:59 Accessing query fingerprinting used by pg_stat_statements