Re: [GENERAL] Recursive row level security policy

2016-12-17 Thread Simon Charette
Ahh makes sense, thanks for the explanation! I was assuming USING() clauses were executed in the context of the owner of the policy, by passing RLS. 2016-12-17 13:18 GMT-05:00 Joe Conway : > On 12/17/2016 01:01 PM, Simon Charette wrote: >> Thanks a lot Joe, that seems to work! > &g

Re: [GENERAL] Recursive row level security policy

2016-12-17 Thread Simon Charette
On 12/16/2016 01:02 AM, Simon Charette wrote: >> Unfortunately this will only return accounts matching the current_user's >> name. >> >> I would expect "SET ROLE foo; SELECT name FROM accounts" to return "foo" and >> &qu

Re: [GENERAL] Recursive row level security policy

2016-12-15 Thread Simon Charette
16-12-16 0:57 GMT-05:00 Charles Clavadetscher : > Hello > >> -Original Message- >> From: pgsql-general-ow...@postgresql.org >> [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Simon Charette >> Sent: Freitag, 16. Dezember 2016 06:15 >> To: pgsql

[GENERAL] Recursive row level security policy

2016-12-15 Thread Simon Charette
Hello there, I'm not sure I'm posting to the appropriate mailing list so don't hesitate to redirect me to the appropriate one. I've been trying to setup a policy that allows "accounts" table rows to only be seen by their owner by using the current_user to compare them by name. Unfortunately it l