summaryrefslogtreecommitdiff
path: root/src/include/commands
diff options
context:
space:
mode:
authorTom Lane2002-07-12 18:43:19 +0000
committerTom Lane2002-07-12 18:43:19 +0000
commit7c6df91dda27accab3097390ef0d21d93028c7a1 (patch)
tree5705b975e8de4edf82252e6df28e0bd57c83cb95 /src/include/commands
parent791a40f943e2a9353c5823fb4f2bd446ec623d38 (diff)
Second phase of committing Rod Taylor's pg_depend/pg_constraint patch.
pg_relcheck is gone; CHECK, UNIQUE, PRIMARY KEY, and FOREIGN KEY constraints all have real live entries in pg_constraint. pg_depend exists, and RESTRICT/CASCADE options work on most kinds of DROP; however, pg_depend is not yet very well populated with dependencies. (Most of the ones that are present at this point just replace formerly hardwired associations, such as the implicit drop of a relation's pg_type entry when the relation is dropped.) Need to add more logic to create dependency entries, improve pg_dump to dump constraints in place of indexes and triggers, and add some regression tests.
Diffstat (limited to 'src/include/commands')
-rw-r--r--src/include/commands/comment.h2
-rw-r--r--src/include/commands/defrem.h10
-rw-r--r--src/include/commands/proclang.h1
-rw-r--r--src/include/commands/trigger.h10
4 files changed, 15 insertions, 8 deletions
diff --git a/src/include/commands/comment.h b/src/include/commands/comment.h
index bf2acfcfa0e..0972c13486a 100644
--- a/src/include/commands/comment.h
+++ b/src/include/commands/comment.h
@@ -27,7 +27,7 @@
extern void CommentObject(CommentStmt *stmt);
-extern void DeleteComments(Oid oid, Oid classoid);
+extern void DeleteComments(Oid oid, Oid classoid, int32 subid);
extern void CreateComments(Oid oid, Oid classoid, int32 subid, char *comment);
diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h
index 551deae0956..169ec3f3dff 100644
--- a/src/include/commands/defrem.h
+++ b/src/include/commands/defrem.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: defrem.h,v 1.40 2002/07/01 15:27:56 tgl Exp $
+ * $Id: defrem.h,v 1.41 2002/07/12 18:43:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,6 +27,7 @@ extern void DefineIndex(RangeVar *heapRelation,
List *attributeList,
bool unique,
bool primary,
+ bool isconstraint,
Expr *predicate,
List *rangetable);
extern void RemoveIndex(RangeVar *relation, DropBehavior behavior);
@@ -39,16 +40,19 @@ extern void ReindexDatabase(const char *databaseName, bool force, bool all);
*/
extern void CreateFunction(CreateFunctionStmt *stmt);
-extern void RemoveFunction(List *functionName, List *argTypes);
+extern void RemoveFunction(RemoveFuncStmt *stmt);
+extern void RemoveFunctionById(Oid funcOid);
extern void DefineOperator(List *names, List *parameters);
extern void RemoveOperator(RemoveOperStmt *stmt);
+extern void RemoveOperatorById(Oid operOid);
extern void DefineAggregate(List *names, List *parameters);
-extern void RemoveAggregate(List *aggName, TypeName *aggType);
+extern void RemoveAggregate(RemoveAggrStmt *stmt);
extern void DefineType(List *names, List *parameters);
extern void RemoveType(List *names, DropBehavior behavior);
+extern void RemoveTypeById(Oid typeOid);
extern void DefineDomain(CreateDomainStmt *stmt);
extern void RemoveDomain(List *names, DropBehavior behavior);
diff --git a/src/include/commands/proclang.h b/src/include/commands/proclang.h
index 25cf7ab5ef8..f4fde9b1083 100644
--- a/src/include/commands/proclang.h
+++ b/src/include/commands/proclang.h
@@ -13,5 +13,6 @@
extern void CreateProceduralLanguage(CreatePLangStmt *stmt);
extern void DropProceduralLanguage(DropPLangStmt *stmt);
+extern void DropProceduralLanguageById(Oid langOid);
#endif /* PROCLANG_H */
diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h
index 9ff6c8e1eac..b9308cd57f3 100644
--- a/src/include/commands/trigger.h
+++ b/src/include/commands/trigger.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: trigger.h,v 1.36 2002/06/20 20:29:49 momjian Exp $
+ * $Id: trigger.h,v 1.37 2002/07/12 18:43:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -101,9 +101,11 @@ typedef struct TriggerData
#define RI_MAX_ARGUMENTS (RI_FIRST_ATTNAME_ARGNO + (RI_MAX_NUMKEYS * 2))
-extern void CreateTrigger(CreateTrigStmt *stmt);
-extern void DropTrigger(Oid relid, const char *trigname);
-extern void RelationRemoveTriggers(Relation rel);
+extern Oid CreateTrigger(CreateTrigStmt *stmt, bool forConstraint);
+
+extern void DropTrigger(Oid relid, const char *trigname,
+ DropBehavior behavior);
+extern void RemoveTriggerById(Oid trigOid);
extern void renametrig(Oid relid, const char *oldname, const char *newname);