1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Improve documentation about CREATE TABLE ... LIKE.

The docs failed to explain that LIKE INCLUDING INDEXES would not preserve
the names of indexes and associated constraints.  Also, it wasn't mentioned
that EXCLUDE constraints would be copied by this option.  The latter
oversight seems enough of a documentation bug to justify back-patching.

In passing, do some minor copy-editing in the same area, and add an entry
for LIKE under "Compatibility", since it's not exactly a faithful
implementation of the standard's feature.

Discussion: <20160728151154.AABE64016B@smtp.hushmail.com>
This commit is contained in:
Tom Lane
2016-07-28 13:26:59 -04:00
parent 737f25cfed
commit a9a998180a
2 changed files with 42 additions and 20 deletions

View File

@@ -1015,7 +1015,9 @@ generateClonedIndexStmt(CreateStmtContext *cxt, Relation source_idx,
/*
* We don't try to preserve the name of the source index; instead, just
* let DefineIndex() choose a reasonable name.
* let DefineIndex() choose a reasonable name. (If we tried to preserve
* the name, we'd get duplicate-relation-name failures unless the source
* table was in a different schema.)
*/
index->idxname = NULL;