aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-07-28 13:26:59 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-07-28 13:26:59 -0400
commit884aec4f8505d9b4c767cf0f2456e12b843688cc (patch)
tree40d02150681d24074cd77bad0d2699c54788dfcd /src
parent93b99d3b6aec67a5eac30c67c511dbb03dd2f72c (diff)
downloadpostgresql-884aec4f8505d9b4c767cf0f2456e12b843688cc.tar.gz
postgresql-884aec4f8505d9b4c767cf0f2456e12b843688cc.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/backend/parser/parse_utilcmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index 16d40c72406..5b84566d08c 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -1094,7 +1094,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;