Text Size: Normal / Large

ALTER VIEW

Name

ALTER VIEW -- change the definition of a view

Synopsis

ALTER VIEW name RENAME TO newname

Description

ALTER VIEW changes the definition of a view. The only currently available functionality is to rename the view. To execute this command you must be the owner of the view.

Parameters

name

The name (optionally schema-qualified) of an existing view.

newname

The new name of the view.

Notes

Some variants of ALTER TABLE can be used with views as well; for example, to rename a view it is also possible to use ALTER TABLE RENAME. To change the schema or owner of a view, you currently must use ALTER TABLE.

Examples

To rename the view foo to bar:

ALTER VIEW foo RENAME TO bar;

Compatibility

ALTER VIEW is a PostgreSQL extension of the SQL standard.


User Comments

No comments could be found for this page.

Add Comment

Please use this form to add your own comments regarding your experience with particular features of PostgreSQL, clarifications of the documentation, or hints for other users. Please note, this is not a support forum, and your IP address will be logged. If you have a question or need help, please see the faq, try a mailing list, or join us on IRC. Note that submissions containing URLs or other keywords commonly found in 'spam' comments may be silently discarded. Please contact the webmaster if you think this is happening to you in error.

In order to submit a comment, you must have a community account.

* Comment
 

* denotes required field

Privacy Policy | Project hosted by our server sponsors. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group