mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +03:00
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
This commit is contained in:
@ -62,6 +62,7 @@ ignore: random
|
||||
test: select_into select_distinct select_distinct_on select_implicit select_having subselect union case join aggregates transactions random portals arrays btree_index hash_index
|
||||
|
||||
test: privileges
|
||||
test: has_table_priv
|
||||
test: misc
|
||||
|
||||
# ----------
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Header: /cvsroot/pgsql/src/test/regress/serial_schedule,v 1.4 2001/05/27 09:59:30 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/test/regress/serial_schedule,v 1.5 2001/06/12 15:58:34 momjian Exp $
|
||||
# This should probably be in an order similar to parallel_schedule.
|
||||
test: boolean
|
||||
test: char
|
||||
@ -69,6 +69,7 @@ test: arrays
|
||||
test: btree_index
|
||||
test: hash_index
|
||||
test: privileges
|
||||
test: has_table_priv
|
||||
test: misc
|
||||
test: select_views
|
||||
test: alter_table
|
||||
|
Reference in New Issue
Block a user