Re: managing multiple db developers

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Mark Phillips <mark(dot)phillips(at)mophilly(dot)com>, "S(dot) Bob" <sbob(at)quadratum-braccas(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: managing multiple db developers
Date: 2019-01-17 09:58:16
Message-ID: 327b6f1800e3a3d0ee69afc9edb08f163fcad3ae.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Mark Phillips wrote:
> On Jan 15, 2019, at 10:14 AM, S. Bob <sbob(at)quadratum-braccas(dot)com> wrote:
> > PostgreSQL supports schema's as well, a schema in PostgreSQL is a simple namespace,
> > which is a different concept from Oracle but you can accomplish the same thing
> > with a schema, in particular via the "CREATE SCHEMA AUTHORIZATION" approach
>
> Thank you for the suggestion.
>
> My only concern about using pg schemas is the level of separation. Also, I have
> toyed with create schema but, to my ignorant mind, I don’t see the tables and such
> in the “dev schema”.

To emulate Oracle's behavior, create user x and his schema with

CREATE ROLE x LOGIN;
CREATE SCHEMA x AUTHORIZATION x;

You don't have to mess with the search_path, because by default
the schema with the same name as the user is the first on the search_path anyway.

There are no "system privileges" to grant.

To be secure, remove the CREATE privilege on the schema "public":

REVOKE CREATE ON SCHEMA public FROM PUBLIC;

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message malli 2019-01-17 10:04:52 RE: archive command failed with exit code 1
Previous Message Shreeyansh Dba 2019-01-17 08:59:27 Re: Copying Data from Oracle to PostgreSQL