pgsql: Allow the index name to be omitted in CREATE INDEX, causing the - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Allow the index name to be omitted in CREATE INDEX, causing the
Date
Msg-id 20091223174145.19A67753FB7@cvs.postgresql.org
Whole thread Raw
List 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)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Remove code that attempted to rename index columns to keep them
Next
From: petere@postgresql.org (Peter Eisentraut)
Date:
Subject: pgsql: Replace target list by a wildcard, so that this workaround