summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2008-01-17 18:56:54 +0000
committerTom Lane2008-01-17 18:56:54 +0000
commit0df7717faa92ffc9d722495e2904767993b19d86 (patch)
treea9d2111ef0890a9bdbc5c4612188c35efec6445a /src/include
parentd07de6c4ecdd5ba3340e94c99957fa899736c53b (diff)
Fix ALTER INDEX RENAME so that if the index belongs to a unique or primary key
constraint, the constraint is renamed as well. This avoids inconsistent situations that could confuse pg_dump (not to mention humans). We might at some point provide ALTER TABLE RENAME CONSTRAINT as a more general solution, but there seems no reason not to allow doing it this way too. Per bug #3854 and related discussions.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/pg_constraint.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/catalog/pg_constraint.h b/src/include/catalog/pg_constraint.h
index 3b01787a7e..4c0fd51d34 100644
--- a/src/include/catalog/pg_constraint.h
+++ b/src/include/catalog/pg_constraint.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_constraint.h,v 1.26 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_constraint.h,v 1.27 2008/01/17 18:56:54 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -201,6 +201,7 @@ extern Oid CreateConstraintEntry(const char *constraintName,
const char *conSrc);
extern void RemoveConstraintById(Oid conId);
+extern void RenameConstraintById(Oid conId, const char *newname);
extern bool ConstraintNameIsUsed(ConstraintCategory conCat, Oid objId,
Oid objNamespace, const char *conname);