Amit Kapila <[email protected]> writes:
> On Wed, Jan 18, 2017 at 8:06 PM, Peter Eisentraut <[email protected]> wrote:
>> Add function to import operating system collations
> After this commit, initdb is failing with below error on one of my VM
> m/c (Linux amitkapila-centos-vm 2.6.32-358.11.1.el6.x86_64):
> performing post-bootstrap initialization ... 2017-01-19 15:19:14.409
> IST [3611] FATAL: role "amitkapila" does not exist at character 150
> 2017-01-19 15:19:14.409 IST [3611] STATEMENT: INSERT INTO
> pg_collation (collname, collnamespace, collowner, collencoding,
> collcollate, collctype) VALUES ('ucs_basic',
> 'pg_catalog'::regnamespace, 'Amitkapila'::regrole, 6, 'C', 'C');
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.
regards, tom lane
--
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers