Re: Row security violation error is misleading

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: Row security violation error is misleading
Date: 2015-04-08 14:07:41
Message-ID: 1043278572.1890469.1428502061756.JavaMail.yahoo@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:

>> Re-using the SQLSTATE 44000 is a bit iffy too. We should
>> probably define something to differentiate this, like:
>>
>> 44P01 ROW SECURITY WRITE POLICY VIOLATION
>
> Yes, that sounds sensible.

I would be more inclined to use:

42501 ERRCODE_INSUFFICIENT_PRIVILEGE

I know this is used 173 other places where a user attempts to do
something they are not authorized to do, so you would not be able
to differentiate the specific cause based on SQLSTATE if this is
used -- but why don't we feel that way about the other 173 causes?
Why does this security violation require a separate SQLSTATE?

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2015-04-08 14:28:55 Re: Sloppy SSPI error reporting code
Previous Message Tom Lane 2015-04-08 14:02:35 Re: Tuple visibility within a single XID