pgsql: Avoid conflicts with collation aliases generated by stripping.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid conflicts with collation aliases generated by stripping.
Date: 2017-01-18 18:44:25
Message-ID: E1cTvDd-0004RV-Hn@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid conflicts with collation aliases generated by stripping.

This resulted in failures depending on the order of "locale -a" output.
The original coding in initdb sorted the results, but that should be
unnecessary as long as "locale -a" doesn't print duplicate names. The
original entries will then all be non-dups, and while we might generate
duplicate aliases by stripping, they should be for different encodings and
thus not conflict. Even if the latter assumption fails somehow, it won't
be fatal because we're using if_not_exists mode for the aliases.

Discussion: https://postgr.es/m/26116.1484751196%40sss.pgh.pa.us

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0333a7340054c3356940759b1ab2391eed572171

Modified Files
--------------
src/backend/commands/collationcmds.c | 36 ++++++++++++++++++++++++++----------
1 file changed, 26 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-01-18 18:46:03 Re: pgsql: Add function to import operating system collations
Previous Message Tom Lane 2017-01-18 17:58:37 pgsql: Improve RLS planning by marking individual quals with security l