pgsql: Change initdb and CREATE DATABASE to actively reject attempts to

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Change initdb and CREATE DATABASE to actively reject attempts to
Date: 2007-09-28 22:25:49
Message-ID: 20070928222549.C9B87753E4C@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Change initdb and CREATE DATABASE to actively reject attempts to create
databases with encodings that are incompatible with the server's LC_CTYPE
locale, when we can determine that (which we can on most modern platforms,
I believe). C/POSIX locale is compatible with all encodings, of course,
so there is still some usefulness to CREATE DATABASE's ENCODING option,
but this will insulate us against all sorts of recurring complaints
caused by mismatched settings.

I moved initdb's existing LC_CTYPE-to-encoding mapping knowledge into
a new src/port/ file so it could be shared by CREATE DATABASE.

Modified Files:
--------------
pgsql/doc/src/sgml:
charset.sgml (r2.83 -> r2.84)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/charset.sgml?r1=2.83&r2=2.84)
pgsql/doc/src/sgml/ref:
create_database.sgml (r1.47 -> r1.48)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_database.sgml?r1=1.47&r2=1.48)
pgsql/src:
Makefile.global.in (r1.238 -> r1.239)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/Makefile.global.in?r1=1.238&r2=1.239)
pgsql/src/backend/commands:
dbcommands.c (r1.198 -> r1.199)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/dbcommands.c?r1=1.198&r2=1.199)
pgsql/src/bin/initdb:
initdb.c (r1.142 -> r1.143)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/initdb/initdb.c?r1=1.142&r2=1.143)
pgsql/src/include:
port.h (r1.112 -> r1.113)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/port.h?r1=1.112&r2=1.113)
pgsql/src/port:
Makefile (r1.34 -> r1.35)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/port/Makefile?r1=1.34&r2=1.35)

Added Files:
-----------
pgsql/src/port:
chklocale.c (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/port/chklocale.c?rev=1.1&content-type=text/x-cvsweb-markup)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2007-09-28 22:33:20 pgsql: Update TCL comment: * We can only fix this with Tcl >= 8.4,
Previous Message Bruce Momjian 2007-09-28 21:32:29 pgsql: Remove: < * SQL*Net listener that makes PostgreSQL appear as an