aboutsummaryrefslogtreecommitdiff
path: root/src/include/catalog/pg_constraint.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/catalog/pg_constraint.h')
-rw-r--r--src/include/catalog/pg_constraint.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/include/catalog/pg_constraint.h b/src/include/catalog/pg_constraint.h
index fe836010ecf..245b999205c 100644
--- a/src/include/catalog/pg_constraint.h
+++ b/src/include/catalog/pg_constraint.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_constraint.h,v 1.10 2003/11/29 22:40:58 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_constraint.h,v 1.11 2004/06/10 17:55:59 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -141,15 +141,14 @@ typedef FormData_pg_constraint *Form_pg_constraint;
*/
/*
- * Used for constraint support functions where the
- * and conrelid, contypid columns being looked up
+ * Identify constraint type for lookup purposes
*/
-typedef enum CONSTRAINTCATEGORY
+typedef enum ConstraintCategory
{
CONSTRAINT_RELATION,
CONSTRAINT_DOMAIN,
- CONSTRAINT_ASSERTION
-} CONSTRAINTCATEGORY;
+ CONSTRAINT_ASSERTION /* for future expansion */
+} ConstraintCategory;
/*
* prototypes for functions in pg_constraint.c
@@ -176,10 +175,10 @@ extern Oid CreateConstraintEntry(const char *constraintName,
extern void RemoveConstraintById(Oid conId);
-extern bool ConstraintNameIsUsed(CONSTRAINTCATEGORY conCat, Oid objId, Oid objNamespace,
- const char *cname);
-extern char *GenerateConstraintName(CONSTRAINTCATEGORY conCat, Oid objId, Oid objNamespace,
- int *counter);
-extern bool ConstraintNameIsGenerated(const char *cname);
+extern bool ConstraintNameIsUsed(ConstraintCategory conCat, Oid objId,
+ Oid objNamespace, const char *conname);
+extern char *ChooseConstraintName(const char *name1, const char *name2,
+ const char *label, Oid namespace,
+ List *others);
#endif /* PG_CONSTRAINT_H */