mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
Got "ADD" to appear only in ALTER TABLE and not CREATE TABLE
UNIQUE-PRIMARY KEY notice message. This is what Christopher wanted from his patch.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.208 2001/11/04 02:41:09 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.209 2001/11/04 03:08:11 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1238,8 +1238,10 @@ transformIndexConstraints(ParseState *pstate, CreateStmtContext *cxt)
|
||||
elog(ERROR, "%s: failed to make implicit index name",
|
||||
cxt->stmtType);
|
||||
|
||||
elog(NOTICE, "%s / %s will create implicit index '%s' for table '%s'",
|
||||
cxt->stmtType, (index->primary ? "PRIMARY KEY" : "UNIQUE"),
|
||||
elog(NOTICE, "%s / %s%s will create implicit index '%s' for table '%s'",
|
||||
cxt->stmtType,
|
||||
(strcmp(cxt->stmtType,"ALTER TABLE") == 0) ? "ADD " : "",
|
||||
(index->primary ? "PRIMARY KEY" : "UNIQUE"),
|
||||
index->idxname, cxt->relname);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user