diff --git a/doc/src/sgml/ref/comment.sgml b/doc/src/sgml/ref/comment.sgml index 69fe3e2873..c59ea744e7 100644 --- a/doc/src/sgml/ref/comment.sgml +++ b/doc/src/sgml/ref/comment.sgml @@ -1,5 +1,5 @@ @@ -103,6 +103,7 @@ COMMENT easily retrieved with psql's \dd command. To remove a comment, use ''. + Comments are automatically dropped when the object is dropped. @@ -111,12 +112,31 @@ COMMENT Usage - comment the table mytable: + Comment the table mytable: COMMENT ON mytable IS 'This is my table.'; + + + Some more examples: + + +COMMENT ON DATABASE my_database IS 'Development Database'; +COMMENT ON INDEX my_index IS 'Enforces uniqueness on employee id'; +COMMENT ON RULE my_rule IS 'Logs UPDATES of employee records'; +COMMENT ON SEQUENCE my_sequence IS 'Used to generate primary keys'; +COMMENT ON TABLE my_table IS 'Employee Information'; +COMMENT ON TYPE my_type IS 'Complex Number support'; +COMMENT ON VIEW my_view IS 'View of departmental costs'; +COMMENT ON COLUMN my_table.my_field IS 'Employee ID number'; +COMMENT ON AGGREGATE my_aggregate float8 IS 'Computes sample variance'; +COMMENT ON FUNCTION my_function (datetime) IS 'Returns Roman Numeral'; +COMMENT ON OPERATOR ^ (text, text) IS 'Performs intersection of two text'; +COMMENT ON TRIGGER my_trigger ON my_table IS 'Used for R.I.'; + +