Re: Add CREATE DATABASE LOCALE option - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Add CREATE DATABASE LOCALE option
Date
Msg-id d58f96ca-7f7a-7110-c560-1347a85407be@2ndquadrant.com
Whole thread Raw
In response to Re: Add CREATE DATABASE LOCALE option  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: Add CREATE DATABASE LOCALE option
List pgsql-hackers
On 2019-07-13 19:20, Fabien COELHO wrote:
> The second error message about conflicting option could more explicit than 
> a terse "conflicting or redundant options"? The user may expect later 
> options to superseedes earlier options, for instance.

done

> About the pg_dump code, I'm wondering whether it is worth generating 
> LOCALE as it breaks backward compatibility (eg dumping a new db to load it 
> into a older version).

We don't really care about backward compatibility here.  Moving forward,
with ICU and such, we don't want to have to drag around old syntax forever.

> If it is to be generated, I'd do merge the two conditions instead of 
> nesting.
> 
>    if (strlen(collate) > 0 && strcmp(collate, ctype) == 0)
>      // generate LOCALE

done

How about this patch?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: using explicit_bzero
Next
From: Tom Lane
Date:
Subject: Re: Broken defenses against dropping a partitioning column