pgsql: Refactor CREATE/ALTER DATABASE syntax so options need not be key

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Refactor CREATE/ALTER DATABASE syntax so options need not be key
Date: 2014-07-01 23:02:27
Message-ID: E1X274F-0007zx-JE@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Refactor CREATE/ALTER DATABASE syntax so options need not be keywords.

Most of the existing option names are keywords anyway, but we can get rid
of LC_COLLATE and LC_CTYPE as keywords known to the lexer/grammar. This
immediately reduces the size of the grammar tables by about 8KB, and will
save more when we add additional CREATE/ALTER DATABASE options in future.

A side effect of the implementation is that the CONNECTION LIMIT option
can now also be spelled CONNECTION_LIMIT. We choose not to document this,
however.

Vik Fearing, based on a suggestion by me; reviewed by Pavel Stehule

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/15c82efd6994affd1d5654d13bc8911a9faff659

Modified Files
--------------
src/backend/commands/dbcommands.c | 54 +++++++++-------
src/backend/parser/gram.y | 123 ++++++++++++++-----------------------
src/include/parser/kwlist.h | 2 -
3 files changed, 76 insertions(+), 103 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-07-02 00:10:56 pgsql: Allow CREATE/ALTER DATABASE to manipulate datistemplate and data
Previous Message Tom Lane 2014-07-01 21:52:01 pgsql: Remove some useless code in the configure script.