Re: pgsql: Add function to import operating system collations
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, Amit Kapila <amit.kapila16@gmail.com>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Date: 2017-01-19T15:26:14Z
Lists: pgsql-hackers
Attachments
- initdb-bootstrap-superuser-fix.patch (text/x-patch) patch
- (unnamed) (text/plain)
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:
>
> if (superuser_password)
> PG_CMD_PRINTF2("ALTER USER \"%s\" WITH PASSWORD E'%s';\n\n",
> username, escape_quotes(superuser_password));
>
> although TBH that doesn't look too darn safe either. I wonder how
> initdb has gotten along so far with no quote_ident() function.
We could just use the numeric value, like in the attached patch.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Avoid conflicts with collation aliases generated by stripping.
- 0333a7340054 10.0 landed
-
Add function to import operating system collations
- aa17c06fb585 10.0 cited
-
Remove dead code in bootstrap
- 193a7d791ebe 10.0 cited