Re: Add CREATE DATABASE LOCALE option

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add CREATE DATABASE LOCALE option
Date: 2019-07-13 17:20:12
Message-ID: alpine.DEB.2.21.1907131909080.22273@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2019-07-13 18:41:34 Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)
Previous Message Julien Rouhaud 2019-07-13 16:58:30 Re: initdb recommendations