1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

Add ALTER VIEW ... RENAME TO, and a RENAME TO clause to ALTER SEQUENCE.

Sequences and views could previously be renamed using ALTER TABLE, but
this was a repeated source of confusion for users. Update the docs,
and psql tab completion. Patch from David Fetter; various minor fixes
by myself.
This commit is contained in:
Neil Conway
2007-07-03 01:30:37 +00:00
parent a1587e41ae
commit a55898131e
12 changed files with 184 additions and 26 deletions

View File

@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.282 2007/06/28 00:02:39 tgl Exp $
* $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.283 2007/07/03 01:30:37 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@ -1574,6 +1574,9 @@ CreateCommandTag(Node *parsetree)
case OBJECT_SCHEMA:
tag = "ALTER SCHEMA";
break;
case OBJECT_SEQUENCE:
tag = "ALTER SEQUENCE";
break;
case OBJECT_COLUMN:
case OBJECT_TABLE:
tag = "ALTER TABLE";
@ -1584,6 +1587,9 @@ CreateCommandTag(Node *parsetree)
case OBJECT_TRIGGER:
tag = "ALTER TRIGGER";
break;
case OBJECT_VIEW:
tag = "ALTER VIEW";
break;
default:
tag = "???";
break;