COMMENT ON [ [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] object_name | COLUMN table_name.column_name| AGGREGATE agg_name agg_type| FUNCTION func_name (arg1, arg2, ...)| OPERATOR op (leftoperand_type rightoperand_type) | TRIGGER trigger_name ON table_name ] IS 'text'
The COMMENT is a PostgreSQL-specific command that allows you to add comments to most objects within a database, including the database itself. Comments can be retrieved by using the following commands from within the psql client: \dd, \d+, or \l+. You can remove a comment by setting its text to NULL.
Note | |
---|---|
A comment that has been made on an object will be removed when that object is removed from the system. |