From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Add function to import operating system collations
Date: Thu, 19 Jan 2017 07:53:31 -0500
Message-ID: <13753.1484830411@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4eK1+z2ZwNvXMsfK-nTD5HeZqm6pLoXR7mXH_dVcbOoNYwDA@mail.gmail.com>
References: <E1cTrLM-0008E8-6K@gemulon.postgresql.org>
<CAA4eK1+z2ZwNvXMsfK-nTD5HeZqm6pLoXR7mXH_dVcbOoNYwDA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Amit Kapila <amit.kapila16@gmail.com> writes:
> On Wed, Jan 18, 2017 at 8:06 PM, Peter Eisentraut <peter_e@gmx.net> 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 (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, peter_e@gmx.net
Subject: Re: pgsql: Add function to import operating system collations
In-Reply-To: <13753.1484830411@sss.pgh.pa.us>
References: <E1cTrLM-0008E8-6K@gemulon.postgresql.org> <CAA4eK1+z2ZwNvXMsfK-nTD5HeZqm6pLoXR7mXH_dVcbOoNYwDA@mail.gmail.com> <13753.1484830411@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox