Fix column privilege checking for cases where parent and child have different
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 5 Mar 2009 17:30:29 +0000 (17:30 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 5 Mar 2009 17:30:29 +0000 (17:30 +0000)
commitc2ac14c0b403b2772778445e9244aa0df2ae65d1
treefdf7bd6d5a04632bd204926a716ff6e28ec7c0db
parent3b0614d01166c6acb106641de235a27bccf7b1af
Fix column privilege checking for cases where parent and child have different
attribute numbering.  Also, a parent whole-row reference should not require
select privilege on child columns that aren't inherited from the parent.
Problem diagnosed by KaiGai Kohei, though this isn't exactly his patch.
src/backend/optimizer/prep/prepunion.c
src/test/regress/expected/privileges.out
src/test/regress/sql/privileges.sql