Re: pgsql: Add function to import operating system collations

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Add function to import operating system collations
Date: 2017-01-19 15:26:14
Message-ID: dfd34b03-911b-adad-57f9-42833bb15610@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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

Attachment Content-Type Size
initdb-bootstrap-superuser-fix.patch text/x-patch 1013 bytes

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2017-01-19 16:03:05 Re: [COMMITTERS] pgsql: Add pg_sequence system catalog
Previous Message Peter Eisentraut 2017-01-19 14:33:58 Re: [COMMITTERS] pgsql: Generate fmgr prototypes automatically

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-01-19 15:34:22 Re: ISO/IEC 9075-2:2016 for postgres community
Previous Message Alvaro Herrera 2017-01-19 15:12:18 Re: Patch to implement pg_current_logfile() function