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

From: Payal Singh <payal(at)omniti(dot)com>
To: Sam Turnbull <samturnbull73(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Create objects(table etc) to be stored in specific schema
Date: 2015-10-15 15:39:52
Message-ID: CANUg7LD7czxjGMucUCMaXUsJHcdM1Qf7Zzq4RX9UvNr_h6HkHA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

you can either alter the default search path -
http://www.postgresql.org/docs/9.3/static/runtime-config-client.html

or you can schema qualify your table/objects each time. For instance
SCHEMAC.OBJECT

Payal Singh,
Database Administrator,
OmniTI Computer Consulting Inc.
Phone: 240.646.0770 x 253

On Thu, Oct 15, 2015 at 8:10 AM, Sam Turnbull <samturnbull73(at)gmail(dot)com>
wrote:

> 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
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mark Steben 2015-10-16 14:09:05 method of encrypting backups
Previous Message Tom Lane 2015-10-15 14:23:26 Re: Accessing Extension with out Superuser privilege