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

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Allow the index name to be omitted in CREATE INDEX, causing the
Дата
Msg-id 20091223174145.19A67753FB7@cvs.postgresql.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Remove code that attempted to rename index columns to keep them
Следующее
От: petere@postgresql.org (Peter Eisentraut)
Дата:
Сообщение: pgsql: Replace target list by a wildcard, so that this workaround