Re: has_column_privilege behavior (was Re: Assert failed in snprintf.c)

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Jaime Casanova <jaime.casanova@2ndquadrant.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-10-02T16:45:04Z
Lists: pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> One might reasonably expect NULL there, but column_privilege_check
>> observes that you have table-level select privilege so it doesn't
>> bother to look up the column number.  Not sure if this is worth
>> doing something about.

> Yeah, I'm on the fence about if it makes sense to do anything here or
> not.  Hard to see how getting a NULL back is really more useful in this
> case.

Yeah, I'm not terribly excited about changing it either.  I just
thought it'd be a good idea to point it out in case somebody else
feels differently.

			regards, tom lane


Commits

  1. Fix corner-case failures in has_foo_privilege() family of functions.