diff options
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r-- | src/backend/tcop/utility.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 49d3c129f3d..6043177cb46 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.143 2002/03/31 06:26:31 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.144 2002/03/31 07:49:30 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -385,32 +385,20 @@ ProcessUtility(Node *parsetree, CheckOwnership(stmt->relation, true); - /* ---------------- - * XXX using len == 3 to tell the difference - * between "rename rel to newrel" and - * "rename att in rel to newatt" will not - * work soon because "rename type/operator/rule" - * stuff is being added. - cim 10/24/90 - * ---------------- - * [another piece of amuzing but useless anecdote -- ay] - */ if (stmt->column == NULL) { /* * rename relation - * - * Note: we also rename the "type" tuple corresponding to - * the relation. */ - renamerel(stmt->relation, /* old relation */ - stmt->newname); /* new name */ + renamerel(RangeVarGetRelid(stmt->relation, false), + stmt->newname); } else { /* * rename attribute */ - renameatt(RangeVarGetRelid(stmt->relation, false), /* relation */ + renameatt(RangeVarGetRelid(stmt->relation, false), stmt->column, /* old att name */ stmt->newname, /* new att name */ interpretInhOption(stmt->relation->inhOpt)); /* recursive? */ |