Re: WITH CHECK and Column-Level Privileges

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WITH CHECK and Column-Level Privileges
Date: 2015-01-12 22:16:40
Message-ID: 20150112221640.GM3062@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dean, Robert,

* Dean Rasheed (dean(dot)a(dot)rasheed(at)gmail(dot)com) wrote:
> On 29 October 2014 13:04, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> > * Robert Haas (robertmhaas(at)gmail(dot)com) wrote:
> >> On Wed, Oct 29, 2014 at 8:16 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> >> > suggestions. If the user does not have table-level SELECT rights,
> >> > they'll see for the "Failing row contains" case, they'll get:
> >> >
> >> > Failing row contains (col1, col2, col3) = (1, 2, 3).
> >> >
> >> > Or, if they have no access to any columns:
> >> >
> >> > Failing row contains () = ()
> >>
> >> I haven't looked at the code, but that sounds nice, except that if
> >> they have no access to any columns, I'd leave the message out
> >> altogether instead of emitting it with no useful content.
> >
> > Alright, I can change things around to make that happen without too much
> > trouble.
>
> Yes, skim-reading the patch, it looks like a good approach to me, and
> also +1 for not emitting anything if no values are visible.

Alright, here's an updated patch which doesn't return any detail if no
values are visible or if only a partial key is visible.

Please take a look. I'm not thrilled with simply returning an empty
string and then checking that for BuildIndexValueDescription and
ExecBuildSlotValueDescription, but I figured we might have other users
of BuildIndexValueDescription and I wasn't seeing a particularly better
solution. Suggestions welcome, of course.

Thanks!

Stephen

Attachment Content-Type Size
fix-leak94.patch text/x-diff 23.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2015-01-12 22:29:46 Re: Removing INNER JOINs
Previous Message Jim Nasby 2015-01-12 22:08:46 Re: Hash Function