Re: [COMMITTERS] pgsql: Add function to import operating system collations - Mailing list pgsql-committers

From Tom Lane
Subject Re: [COMMITTERS] pgsql: Add function to import operating system collations
Date
Msg-id 4700.1484844079@sss.pgh.pa.us
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add function to import operating systemcollations  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [COMMITTERS] pgsql: Add function to import operating systemcollations
List pgsql-committers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 1/19/17 7:53 AM, Tom Lane wrote:
>> Hm.  I see that the patch randomly changed the way that the collation
>> owner is generated ... looks like it no longer works for mixed-case
>> usernames.  Perhaps follow this model instead:

> We could just use the numeric value, like in the attached patch.

WFM.  Btw, I noticed that BOOTSTRAP_SUPERUSERID is hard-coded as "10"
in this bit in setup_privileges():

        " (SELECT E'=r/\"$POSTGRES_SUPERUSERNAME\"' as acl "
        "  UNION SELECT unnest(pg_catalog.acldefault("
        "    CASE WHEN relkind = 'S' THEN 's' ELSE 'r' END::\"char\",10::oid))"
        " ) as a) "

Is there a reasonable way to fix that?  Maybe do another replace_token
call for it?

            regards, tom lane


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [COMMITTERS] pgsql: Add function to import operating systemcollations
Next
From: Stephen Frost
Date:
Subject: Re: [COMMITTERS] pgsql: Add function to import operating systemcollations