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'
This parameter takes the name of the object you are adding a comment to.
Use this parameter to enter the text of the comment to add.
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.
A comment that has been made on an object will be removed when that object is removed from the system.
The following example adds a comment to the customer table.
COMMENT ON TABLE customer IS 'This is the customer table.';
The next example deletes the previously added comment from the customer table.
COMMENT ON TABLE customer IS NULL;