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-01T19:46:34Z
Lists: pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes: > * Tom Lane (tgl@sss.pgh.pa.us) wrote: >> You can't have it both ways. Either you throw an error if the name's >> not there, or you don't. > I'm not following why we couldn't handle a dropped column differently. Different from what? A name-based lookup isn't going to find a dropped column, because its attname has been replaced with "........pg.dropped.N........" > Dropped tables don't hang around in the catalog long after they've been > dropped. If you are talking about the case where a lookup by attnum finds a dropped column, that does return null already, cf column_privilege_check(). But I don't see a way for a name-based lookup to do the same without losing all semblance of error detection. regards, tom lane
Commits
-
Fix corner-case failures in has_foo_privilege() family of functions.
- fd81fae67fa0 9.4.20 landed
- dad4df0fc8a1 9.5.15 landed
- 01c7a87df98c 9.3.25 landed
- 7eed72333731 10.6 landed
- 6d73983be61a 9.6.11 landed
- 419cc8add5fb 11.0 landed
- 3d0f68dd3061 12.0 landed