11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.1 1999/10/26 03:48:58 momjian Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.2 1999/10/26 03:53:35 momjian Exp $
33Postgres documentation
44-->
55
@@ -103,6 +103,7 @@ COMMENT
103103 easily retrieved with <application>psql's</application>
104104 <emphasize>\dd</emphasize> command.
105105 To remove a comment, use <literal>''</literal>.
106+ Comments are automatically dropped when the object is dropped.
106107 </para>
107108 </refsect1>
108109
@@ -111,12 +112,31 @@ COMMENT
111112 Usage
112113 </title>
113114 <para>
114- comment the table <literal>mytable</literal>:
115+ Comment the table <literal>mytable</literal>:
115116
116117 <programlisting>
117118COMMENT ON mytable IS 'This is my table.';
118119 </programlisting>
119120 </para>
121+
122+ <para>
123+ Some more examples:
124+
125+ <programlisting>
126+ COMMENT ON DATABASE my_database IS 'Development Database';
127+ COMMENT ON INDEX my_index IS 'Enforces uniqueness on employee id';
128+ COMMENT ON RULE my_rule IS 'Logs UPDATES of employee records';
129+ COMMENT ON SEQUENCE my_sequence IS 'Used to generate primary keys';
130+ COMMENT ON TABLE my_table IS 'Employee Information';
131+ COMMENT ON TYPE my_type IS 'Complex Number support';
132+ COMMENT ON VIEW my_view IS 'View of departmental costs';
133+ COMMENT ON COLUMN my_table.my_field IS 'Employee ID number';
134+ COMMENT ON AGGREGATE my_aggregate float8 IS 'Computes sample variance';
135+ COMMENT ON FUNCTION my_function (datetime) IS 'Returns Roman Numeral';
136+ COMMENT ON OPERATOR ^ (text, text) IS 'Performs intersection of two text';
137+ COMMENT ON TRIGGER my_trigger ON my_table IS 'Used for R.I.';
138+ </programlisting>
139+ </para>
120140 </refsect1>
121141
122142 <refsect1 id="R1-SQL-COMMENT-3">