aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/commands/tablecmds.h7
-rw-r--r--src/include/nodes/parsenodes.h18
2 files changed, 18 insertions, 7 deletions
diff --git a/src/include/commands/tablecmds.h b/src/include/commands/tablecmds.h
index 5d895972f5b..f3dfcd6b9b1 100644
--- a/src/include/commands/tablecmds.h
+++ b/src/include/commands/tablecmds.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: tablecmds.h,v 1.1 2002/04/15 05:22:04 tgl Exp $
+ * $Id: tablecmds.h,v 1.2 2002/04/24 02:48:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,6 +15,7 @@
#define TABLECMDS_H
#include "nodes/parsenodes.h"
+#include "utils/inval.h"
extern void AlterTableAddColumn(Oid myrelid, bool inherits,
ColumnDef *colDef);
@@ -60,4 +61,8 @@ extern void renameatt(Oid relid,
extern void renamerel(Oid relid,
const char *newrelname);
+extern void renametrig(Oid relid,
+ const char *oldname,
+ const char *newname);
+
#endif /* TABLECMDS_H */
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 1433083b2fb..60703a06dcc 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.173 2002/04/21 00:26:43 tgl Exp $
+ * $Id: parsenodes.h,v 1.174 2002/04/24 02:48:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1233,17 +1233,23 @@ typedef struct RemoveOperStmt
} RemoveOperStmt;
/* ----------------------
- * Alter Table Rename Statement
+ * Alter Object Rename Statement
* ----------------------
+ * Currently supports renaming tables, table columns, and triggers.
+ * If renaming a table, oldname is ignored.
*/
+#define RENAME_TABLE 110
+#define RENAME_COLUMN 111
+#define RENAME_TRIGGER 112
+#define RENAME_RULE 113
+
typedef struct RenameStmt
{
NodeTag type;
- RangeVar *relation; /* relation to be altered */
- char *column; /* if NULL, rename the relation name to
- * the new name. Otherwise, rename this
- * column name. */
+ RangeVar *relation; /* owning relation */
+ char *oldname; /* name of rule, trigger, etc */
char *newname; /* the new name */
+ int renameType; /* RENAME_TABLE, RENAME_COLUMN, etc */
} RenameStmt;
/* ----------------------