diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-04-24 02:48:55 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-04-24 02:48:55 +0000 |
commit | 3a96b6cdeb6ea526de8759dd138c5985437c0260 (patch) | |
tree | cf2b1a95e59779679314a9207be42824e2fe9fac /src/include/nodes/parsenodes.h | |
parent | fbc4b7110fc9cd7096a248e257086974ffeadcc2 (diff) | |
download | postgresql-3a96b6cdeb6ea526de8759dd138c5985437c0260.tar.gz postgresql-3a96b6cdeb6ea526de8759dd138c5985437c0260.zip |
Attached is a patch for ALTER TRIGGER RENAME per the above thread. I
left a stub for a future "ALTER RULE RENAME" but did not write that one
yet. Bruce, if you want to add my name for for that I'll take it and do
it later.
Joe Conway
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r-- | src/include/nodes/parsenodes.h | 18 |
1 files changed, 12 insertions, 6 deletions
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; /* ---------------------- |