pgsql: Allow the index name to be omitted in CREATE INDEX, causing the

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow the index name to be omitted in CREATE INDEX, causing the
Date: 2009-12-23 17:41:45
Message-ID: 20091223174145.19A67753FB7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Allow the index name to be omitted in CREATE INDEX, causing the system to
choose an index name the same as it would do for an unnamed index constraint.
(My recent changes to the index naming logic have helped to ensure that this
will be a reasonable choice.) Per a suggestion from Peter.

A necessary side-effect is to promote CONCURRENTLY to type_func_name_keyword
status, ie, it can't be a table/column/index name anymore unless quoted.
This is not all bad, since we have heard more than once of people typing
CREATE INDEX CONCURRENTLY ON foo (...) and getting a normal index build of
an index named "concurrently", which was not what they wanted. Now this
syntax will result in a concurrent build of an index with system-chosen
name; which they can rename afterwards if they want something else.

Modified Files:
--------------
pgsql/doc/src/sgml:
keywords.sgml (r2.27 -> r2.28)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/keywords.sgml?r1=2.27&r2=2.28)
pgsql/doc/src/sgml/ref:
create_index.sgml (r1.71 -> r1.72)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_index.sgml?r1=1.71&r2=1.72)
pgsql/src/backend/parser:
gram.y (r2.698 -> r2.699)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y?r1=2.698&r2=2.699)
pgsql/src/include/parser:
kwlist.h (r1.7 -> r1.8)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/kwlist.h?r1=1.7&r2=1.8)
pgsql/src/test/regress/expected:
create_index.out (r1.33 -> r1.34)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/create_index.out?r1=1.33&r2=1.34)
pgsql/src/test/regress/sql:
create_index.sql (r1.27 -> r1.28)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/create_index.sql?r1=1.27&r2=1.28)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2009-12-23 19:17:45 pgsql: Replace target list by a wildcard, so that this workaround
Previous Message Tom Lane 2009-12-23 17:10:37 Re: [COMMITTERS] pgsql: Remove code that attempted to rename index columns to keep them