Re: [GENERAL] Limiting DB access by role after initial connection? - Mailing list pgsql-general

From Ken Tanzer
Subject Re: [GENERAL] Limiting DB access by role after initial connection?
Date
Msg-id CAD3a31XQkdeE+Rs_v0DR7UcyJMs=owtmgKkctJjJbujKXDhb+Q@mail.gmail.com
Whole thread Raw
In response to [GENERAL] Limiting DB access by role after initial connection?  (Ken Tanzer <ken.tanzer@gmail.com>)
List 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
(253) 245-3801

learn more about AGENCY or
follow the discussion.

pgsql-general by date:

Previous
From: Ken Tanzer
Date:
Subject: [GENERAL] Limiting DB access by role after initial connection?
Next
From: "Arnaud L."
Date:
Subject: [GENERAL] pg_upgrade --link on Windows