OK -- here's take #5.
It "make"s and "make check"s clean against current cvs tip. There are now both Text and Name variants, and the regression test support is rolled into the patch. Note that to be complete wrt Name based variants, there are now 12 user visible versions of has_table_privilege: has_table_privilege(Text usename, Text relname, Text priv_type) has_table_privilege(Text usename, Name relname, Text priv_type) has_table_privilege(Name usename, Text relname, Text priv_type) has_table_privilege(Name usename, Name relname, Text priv_type) has_table_privilege(Text relname, Text priv_type) /* assumes current_user */ has_table_privilege(Name relname, Text priv_type) /* assumes current_user */ has_table_privilege(Text usename, Oid reloid, Text priv_type) has_table_privilege(Name usename, Oid reloid, Text priv_type) has_table_privilege(Oid reloid, Text priv_type) /* assumes current_user */ has_table_privilege(Oid usesysid, Text relname, Text priv_type) has_table_privilege(Oid usesysid, Name relname, Text priv_type) has_table_privilege(Oid usesysid, Oid reloid, Text priv_type) For the Text based inputs, a new internal function, get_Name is used (shamelessly copied from get_seq_name in sequence.c) to downcase if not quoted, or remove quotes if quoted, and truncate. I also added a few test cases for the downcasing, quote removal, and Name based variants to the regression test. Joe Conway
Showing
Please register or sign in to comment