Thread: pgsql/src backend/utils/adt/acl.c include/cata ...

pgsql/src backend/utils/adt/acl.c include/cata ...

From
Bruce Momjian - CVS
Date:
CVSROOT:    /home/projects/pgsql/cvsroot
Module name:    pgsql
Changes by:    momjian@hub.org    01/06/12 11:58:34

Modified files:
    src/backend/utils/adt: acl.c
    src/include/catalog: pg_proc.h
    src/include/utils: acl.h builtins.h
    src/test/regress: parallel_schedule serial_schedule

Log message:
    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


Re: pgsql/src backend/utils/adt/acl.c include/cata ...

From
Tom Lane
Date:
Bruce Momjian - CVS <momjian@hub.org> writes:
>     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:

Peter is still objecting vocally to this patch.  Wasn't it a tad
premature to apply it?

            regards, tom lane

Re: pgsql/src backend/utils/adt/acl.c include/cata ...

From
Bruce Momjian
Date:
> Bruce Momjian - CVS <momjian@hub.org> writes:
> >     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:
>
> Peter is still objecting vocally to this patch.  Wasn't it a tad
> premature to apply it?

I will back it out.  I have not send a confirm to the user.  It was >24
hours.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026