11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.23 2003/09/09 18:28:52 tgl Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.24 2003/11/21 22:32:48 tgl Exp $
33PostgreSQL documentation
44-->
55
@@ -25,12 +25,17 @@ COMMENT ON
2525 TABLE <replaceable class="PARAMETER">object_name</replaceable> |
2626 COLUMN <replaceable class="PARAMETER">table_name</replaceable>.<replaceable class="PARAMETER">column_name</replaceable> |
2727 AGGREGATE <replaceable class="PARAMETER">agg_name</replaceable> (<replaceable class="PARAMETER">agg_type</replaceable>) |
28+ CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</replaceable>) |
2829 CONSTRAINT <replaceable class="PARAMETER">constraint_name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable> |
30+ CONVERSION <replaceable class="PARAMETER">object_name</replaceable> |
2931 DATABASE <replaceable class="PARAMETER">object_name</replaceable> |
3032 DOMAIN <replaceable class="PARAMETER">object_name</replaceable> |
3133 FUNCTION <replaceable class="PARAMETER">func_name</replaceable> (<replaceable class="PARAMETER">arg1_type</replaceable>, <replaceable class="PARAMETER">arg2_type</replaceable>, ...) |
3234 INDEX <replaceable class="PARAMETER">object_name</replaceable> |
35+ LARGE OBJECT <replaceable class="PARAMETER">large_object_oid</replaceable> |
3336 OPERATOR <replaceable class="PARAMETER">op</replaceable> (<replaceable class="PARAMETER">leftoperand_type</replaceable>, <replaceable class="PARAMETER">rightoperand_type</replaceable>) |
37+ OPERATOR CLASS <replaceable class="PARAMETER">object_name</replaceable> USING <replaceable class="parameter">index_method</replaceable> |
38+ [ PROCEDURAL ] LANGUAGE <replaceable class="PARAMETER">object_name</replaceable> |
3439 RULE <replaceable class="PARAMETER">rule_name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable> |
3540 SCHEMA <replaceable class="PARAMETER">object_name</replaceable> |
3641 SEQUENCE <replaceable class="PARAMETER">object_name</replaceable> |
@@ -70,21 +75,68 @@ COMMENT ON
7075 <varlistentry>
7176 <term><replaceable class="parameter">object_name</replaceable></term>
7277 <term><replaceable class="parameter">table_name.column_name</replaceable></term>
73- <term><replaceable class="parameter">aggname </replaceable></term>
78+ <term><replaceable class="parameter">agg_name </replaceable></term>
7479 <term><replaceable class="parameter">constraint_name</replaceable></term>
7580 <term><replaceable class="parameter">func_name</replaceable></term>
7681 <term><replaceable class="parameter">op</replaceable></term>
7782 <term><replaceable class="parameter">rule_name</replaceable></term>
7883 <term><replaceable class="parameter">trigger_name</replaceable></term>
7984 <listitem>
8085 <para>
81- The name of the object to bebe commented. Names of tables,
82- aggregates, domains, functions, indexes, operators,sequences ,
83- types, and views may be schema-qualified.
86+ The name of the object to be commented. Names of tables,
87+ aggregates, domains, functions, indexes, operators,operator classes ,
88+ sequences, types, and views may be schema-qualified.
8489 </para>
8590 </listitem>
8691 </varlistentry>
8792
93+ <varlistentry>
94+ <term><replaceable class="parameter">agg_type</replaceable></term>
95+ <listitem>
96+ <para>
97+ The argument data type of the aggregate function, or
98+ <literal>*</literal> if the function accepts any data type.
99+ </para>
100+ </listitem>
101+ </varlistentry>
102+
103+ <varlistentry>
104+ <term><replaceable class="parameter">large_object_oid</replaceable></term>
105+ <listitem>
106+ <para>
107+ The OID of the large object.
108+ </para>
109+ </listitem>
110+ </varlistentry>
111+
112+ <varlistentry>
113+ <term><literal>PROCEDURAL</literal></term>
114+
115+ <listitem>
116+ <para>
117+ This is a noise word.
118+ </para>
119+ </listitem>
120+ </varlistentry>
121+
122+ <varlistentry>
123+ <term><replaceable>sourcetype</replaceable></term>
124+ <listitem>
125+ <para>
126+ The name of the source data type of the cast.
127+ </para>
128+ </listitem>
129+ </varlistentry>
130+
131+ <varlistentry>
132+ <term><replaceable>targettype</replaceable></term>
133+ <listitem>
134+ <para>
135+ The name of the target data type of the cast.
136+ </para>
137+ </listitem>
138+ </varlistentry>
139+
88140 <varlistentry>
89141 <term><replaceable class="parameter">text</replaceable></term>
90142 <listitem>
@@ -93,12 +145,18 @@ COMMENT ON
93145 </para>
94146 </listitem>
95147 </varlistentry>
148+
96149 </variablelist>
97150 </refsect1>
98151
99152 <refsect1>
100153 <title>Notes</title>
101154
155+ <para>
156+ A comment for a database can only be created in that database,
157+ and will only be visible in that database, not in other databases.
158+ </para>
159+
102160 <para>
103161 There is presently no security mechanism for comments: any user
104162 connected to a database can see all the comments for objects in
@@ -130,13 +188,18 @@ COMMENT ON TABLE mytable IS NULL;
130188
131189<programlisting>
132190COMMENT ON AGGREGATE my_aggregate (double precision) IS 'Computes sample variance';
191+ COMMENT ON CAST (text AS int4) IS 'Allow casts from text to int4';
133192COMMENT ON COLUMN my_table.my_column IS 'Employee ID number';
193+ COMMENT ON CONVERSION my_conv IS 'Conversion to Unicode';
134194COMMENT ON DATABASE my_database IS 'Development Database';
135195COMMENT ON DOMAIN my_domain IS 'Email Address Domain';
136196COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral';
137197COMMENT ON INDEX my_index IS 'Enforces uniqueness on employee ID';
198+ COMMENT ON LANGUAGE plpython IS 'Python support for stored procedures';
199+ COMMENT ON LARGE OBJECT 346344 IS 'Planning document';
138200COMMENT ON OPERATOR ^ (text, text) IS 'Performs intersection of two texts';
139201COMMENT ON OPERATOR ^ (NONE, text) IS 'This is a prefix operator on text';
202+ COMMENT ON OPERATOR CLASS int4ops USING btree IS '4 byte integer operators for btrees';
140203COMMENT ON RULE my_rule ON my_table IS 'Logs updates of employee records';
141204COMMENT ON SCHEMA my_schema IS 'Departmental data';
142205COMMENT ON SEQUENCE my_sequence IS 'Used to generate primary keys';