Re: Additional role attributes && superuser review

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Additional role attributes && superuser review
Date: 2015-05-08 04:35:50
Message-ID: 20150508043550.GQ30322@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gavin,

* Gavin Flower (GavinFlower(at)archidevsys(dot)co(dot)nz) wrote:
> What if I had a company with several subsidiaries using the same
> database, and want to prefix roles and other things with the
> subsidiary's initials? (I am not saying this would be a good
> architecture!!!)

If you admit that it's not a good solution then I'm not quite sure how
much we really want to worry about it. :)

> For example if one subsidiary was called 'Perfect Gentleman', so I
> would want roles prefixed by 'pg_' and would be annoyed if I
> couldn't!

You might try creating a schema for that user.. You'll hopefully find
it difficult to do. :)

In consideration of the fact that you can't create schemas which start
with "pg_" and therefore the default search_path wouldn't work for that
user, and that we also reserve "pg_" for tablespaces, I'm not inclined
to worry too much about this case. Further, if we accept this argument,
then we simply can't ever provide additional default or system roles,
ever. That'd be a pretty narrow corner to have painted ourselves into.

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2015-05-08 06:00:51 Remove obsolete mention of src/tools/backend
Previous Message Stephen Frost 2015-05-08 04:29:28 Default Roles (was: Additional role attributes)