COMMENT -- define or change the comment of an object
COMMENT ON { TABLE table_name | COLUMN table_name.column_name } IS 'text'
COMMENT stores a comment about a database object. To modify a comment, issue a new COMMENT command for the same object. Only one comment string is stored for each object. To remove a comment, specify the empty string (two consecutive single quotes with no intervening space) for text. Comments are automatically dropped when the object is dropped.
table_name
The name of the table to be commented. The table name may be schema-qualified.
table_name.column_name
The name of a column within table_name to be commented. The table name may be schema-qualified.
text
The new comment.
There is presently no security mechanism for comments: any user connected to a database can see all the comments for objects in that database (although only superusers can change comments for objects that they don’t own). Therefore, don’t put security-critical information in comments.
Attach a comment to the table emp:
COMMENT ON TABLE emp IS 'Current employee information';
Attach a comment to the empno column of the emp table:
COMMENT ON COLUMN emp.empno IS 'Employee identification number';
Remove theses comments: