From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Row security violation error is misleading |
Date: | 2015-04-09 06:56:44 |
Message-ID: | CAEZATCV_tn6BKeNU7_6UB7bLpCYi8Cpg5KgTMxO5EpdaSoCMWQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 8 April 2015 at 16:27, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> * Dean Rasheed (dean(dot)a(dot)rasheed(at)gmail(dot)com) wrote:
>> I actually re-used the sql status code 42501 -
>> ERRCODE_INSUFFICIENT_PRIVILEGE for a RLS check failure because of the
>> parallel with permissions checks, but I quite like Craig's idea of
>> inventing a new status code for this, so that it can be more easily
>> distinguished from a lack of GRANTed privileges.
>
> As I mentioned to Kevin, I'm not sure that this is really a useful
> distinction. I'm quite curious if other systems provide that
> distinction between grant violations and policy violations. If they do
> then that would certainly bolster the argument to provide the
> distinction in PG.
>
OK, on further reflection I think that's probably right.
ERRCODE_INSUFFICIENT_PRIVILEGE is certainly more appropriate than
anything based on a WCO violation, because it reflects the fact that
the current user isn't allowed to perform the insert/update, but
another user might be allowed, so this is a privilege problem, not a
data error.
Regards,
Dean
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2015-04-09 07:01:41 | Re: GUC context information in the document. |
Previous Message | Craig Ringer | 2015-04-09 06:52:40 | Re: Row security violation error is misleading |