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

From Fabien COELHO
Subject Re: Add CREATE DATABASE LOCALE option
Date
Msg-id alpine.DEB.2.21.1907131909080.22273@lancre
Whole thread Raw
In response to Re: Add CREATE DATABASE LOCALE option  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: Add CREATE DATABASE LOCALE option  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Hello Peter,

>> I think pg_dump/t/002_pg_dump.pl might be a good place.  Not the easiest
>> program in the world to work with, admittedly.
>
> Updated patch with test and expanded documentation.

Patch v2 applies cleanly, compiles, make check-world ok with tap enabled. 
Doc gen ok.

The addition looks reasonable.

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.

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).

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

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: initdb recommendations
Next
From: Joe Conway
Date:
Subject: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)