COMMENT ON VIEW
Adds, revises, or removes a comment on a view. Each object can have one comment. Comments are stored in the system table COMMENTS
.
Syntax
COMMENT ON VIEW [[database.]schema.]view IS { 'comment' | NULL }
Parameters
[database.]schema
|
Specifies a schema, by default myschema.thisDbObject If you specify a database, it must be the current database. |
view
|
The name of the view with which to associate the comment. |
comment
|
Specifies the text of the comment to add. If a comment already exists for this view, this comment overwrites the previous one. Comments can be up to 8192 characters in length. If a comment exceeds that limitation, Vertica truncates the comment and alerts the user with a message. |
NULL
|
Removes an existing comment. |
Privileges
Non-superuser: object owner
Examples
The following example adds a comment from the curr_month_ship
view:
=> COMMENT ON VIEW curr_month_ship IS 'Shipping data for the current month';
The following example removes a comment from the curr_month_ship
view:
=> COMMENT ON VIEW curr_month_ship IS NULL;