Re: Limiting DB access by role after initial connection?

From: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Limiting DB access by role after initial connection?
Date: 2017-06-09 07:07:38
Message-ID: CAD3a31XQkdeE+Rs_v0DR7UcyJMs=owtmgKkctJjJbujKXDhb+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

As a follow up to this, a couple more questions from my wishful thinking
list:

1) Any way, whether kosher or hacky, to set an arbitrary yet immutable (for
the lifetime of the session) variable within a session? Something akin to
DEFINE, which wouldn't allow redefinition? A temp table that couldn't be
dropped?

2) Same as above, but set by the app before making the connection? I'd
settle for this even if it meant two connections per page.

Either of those would facilitate more fine-grained, per-user access, which
would ultimately be better and maybe allow me to skip the creation and
management of roles. Having discovered that the RLS will not apply to all
my existing views and I'll need to rewrite them anyway, this seems like a
better thing to wish for!

Cheers,
Ken

--
AGENCY Software
A Free Software data system
By and for non-profits
*http://agency-software.org/ <http://agency-software.org/>*
*https://agency-software.org/demo/client
<https://agency-software.org/demo/client>*
ken(dot)tanzer(at)agency-software(dot)org
(253) 245-3801

Subscribe to the mailing list
<agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe> to
learn more about AGENCY or
follow the discussion.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arnaud L. 2017-06-09 10:00:56 pg_upgrade --link on Windows
Previous Message Ken Tanzer 2017-06-09 05:37:34 Limiting DB access by role after initial connection?