Add ALTER VIEW ... RENAME TO, and a RENAME TO clause to ALTER SEQUENCE.
Neil Conway <neilc@samurai.com>
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.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/allfiles.sgml | modified | +2 −1 |
| doc/src/sgml/ref/alter_sequence.sgml | modified | +20 −9 |
| doc/src/sgml/ref/alter_view.sgml | added | +88 −0 |
| doc/src/sgml/ref/create_view.sgml | modified | +2 −1 |
| doc/src/sgml/ref/drop_view.sgml | modified | +2 −1 |
| doc/src/sgml/reference.sgml | modified | +2 −1 |
| src/backend/commands/alter.c | modified | +6 −2 |
| src/backend/commands/tablecmds.c | modified | +22 −4 |
| src/backend/parser/gram.y | modified | +19 −1 |
| src/backend/tcop/utility.c | modified | +7 −1 |
| src/bin/psql/tab-complete.c | modified | +11 −3 |
| src/include/commands/tablecmds.h | modified | +3 −2 |