Allow the index name to be omitted in CREATE INDEX, causing the system to
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 23 Dec 2009 17:41:45 +0000 (17:41 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 23 Dec 2009 17:41:45 +0000 (17:41 +0000)
commitd68e08d1fea8b71057849321a17f87839a2ecbd0
tree616277b2c8595a6c8c6cc4e81d54837a60b9500f
parentc176e122222c63844c0a2f3f8c568c3fe6c57d15
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.
doc/src/sgml/keywords.sgml
doc/src/sgml/ref/create_index.sgml
src/backend/parser/gram.y
src/include/parser/kwlist.h
src/test/regress/expected/create_index.out
src/test/regress/sql/create_index.sql