| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Stephen Frost <sfrost(at)snowman(dot)net> |
| Cc: | Craig Ringer <craig(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: CREATE POLICY and RETURNING |
| Date: | 2014-10-16 18:49:37 |
| Message-ID: | CA+TgmoZvuNf3TNGAT49+1PkpwzFWPT4=Qb5wxTy9MYpeSRoDGg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
>> That's an argument in favour of only applying a read-filtering policy
>> where a RETURNING clause is present, but that introduces the "surprise!
>> the effects of your DELETE changed based on an unrelated clause!" issue.
>
> No- if we were going to do this, I wouldn't want to change the existing
> structure but rather provide either:
>
> a) a way to simply disable RETURNING if the policy is in effect and the
> policy creator doesn't wish to allow it
> b) allow the user to define another clause which would be applied to the
> rows in the RETURNING set
I think you could probably make the DELETE policy control what can get
deleted, but then have the SELECT policy further filter what gets
returned.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephen Frost | 2014-10-16 18:59:35 | Re: Additional role attributes && superuser review |
| Previous Message | Robert Haas | 2014-10-16 18:44:36 | Re: Review of GetUserId() Usage |