|
1 | 1 | <!--
|
2 |
| -$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.29 2005/06/08 21:15:27 tgl Exp $ |
| 2 | +$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.30 2006/02/12 03:22:17 momjian Exp $ |
3 | 3 | PostgreSQL documentation
|
4 | 4 | -->
|
5 | 5 |
|
@@ -36,9 +36,11 @@ COMMENT ON
|
36 | 36 | OPERATOR <replaceable class="PARAMETER">op</replaceable> (<replaceable class="PARAMETER">leftoperand_type</replaceable>, <replaceable class="PARAMETER">rightoperand_type</replaceable>) |
|
37 | 37 | OPERATOR CLASS <replaceable class="PARAMETER">object_name</replaceable> USING <replaceable class="parameter">index_method</replaceable> |
|
38 | 38 | [ PROCEDURAL ] LANGUAGE <replaceable class="PARAMETER">object_name</replaceable> |
|
| 39 | + ROLE <replaceable class="PARAMETER">object_name</replaceable> | |
39 | 40 | RULE <replaceable class="PARAMETER">rule_name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable> |
|
40 | 41 | SCHEMA <replaceable class="PARAMETER">object_name</replaceable> |
|
41 | 42 | SEQUENCE <replaceable class="PARAMETER">object_name</replaceable> |
|
| 43 | + TABLESPACE <replaceable class="PARAMETER">object_name</replaceable> | |
42 | 44 | TRIGGER <replaceable class="PARAMETER">trigger_name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable> |
|
43 | 45 | TYPE <replaceable class="PARAMETER">object_name</replaceable> |
|
44 | 46 | VIEW <replaceable class="PARAMETER">object_name</replaceable>
|
@@ -67,7 +69,8 @@ COMMENT ON
|
67 | 69 | <command>\dd</command>, <command>\d+</command>, and <command>\l+</command>.
|
68 | 70 | Other user interfaces to retrieve comments can be built atop
|
69 | 71 | the same built-in functions that <application>psql</application> uses, namely
|
70 |
| - <function>obj_description</> and <function>col_description</> |
| 72 | + <function>obj_description</>, <function>col_description</>, |
| 73 | + and <function>shobj_description</> |
71 | 74 | (see <xref linkend="functions-info-comment-table">).
|
72 | 75 | </para>
|
73 | 76 | </refsect1>
|
@@ -197,17 +200,15 @@ COMMENT ON
|
197 | 200 | <refsect1>
|
198 | 201 | <title>Notes</title>
|
199 | 202 |
|
200 |
| - <para> |
201 |
| - A comment for a database can only be created in that database, |
202 |
| - and will only be visible in that database, not in other databases. |
203 |
| - </para> |
204 |
| - |
205 | 203 | <para>
|
206 | 204 | There is presently no security mechanism for comments: any user
|
207 | 205 | connected to a database can see all the comments for objects in
|
208 | 206 | that database (although only superusers can change comments for
|
209 |
| - objects that they don't own). Therefore, don't put |
210 |
| - security-critical information in comments. |
| 207 | + objects that they don't own). For shared objects such as |
| 208 | + databases, roles, and tablespaces comments are stored gloablly |
| 209 | + and any user connected to any database can see all the comments |
| 210 | + for shared objects. Therefore, don't put security-critical |
| 211 | + information in comments. |
211 | 212 | </para>
|
212 | 213 | </refsect1>
|
213 | 214 |
|
@@ -245,10 +246,12 @@ COMMENT ON LARGE OBJECT 346344 IS 'Planning document';
|
245 | 246 | COMMENT ON OPERATOR ^ (text, text) IS 'Performs intersection of two texts';
|
246 | 247 | COMMENT ON OPERATOR - (NONE, text) IS 'This is a prefix operator on text';
|
247 | 248 | COMMENT ON OPERATOR CLASS int4ops USING btree IS '4 byte integer operators for btrees';
|
| 249 | +COMMENT ON ROLE my_role IS 'Administration group for finance tables'; |
248 | 250 | COMMENT ON RULE my_rule ON my_table IS 'Logs updates of employee records';
|
249 | 251 | COMMENT ON SCHEMA my_schema IS 'Departmental data';
|
250 | 252 | COMMENT ON SEQUENCE my_sequence IS 'Used to generate primary keys';
|
251 | 253 | COMMENT ON TABLE my_schema.my_table IS 'Employee Information';
|
| 254 | +COMMENT ON TABLESPACE my_tablespace IS 'Tablespace for indexes'; |
252 | 255 | COMMENT ON TRIGGER my_trigger ON my_table IS 'Used for RI';
|
253 | 256 | COMMENT ON TYPE complex IS 'Complex number data type';
|
254 | 257 | COMMENT ON VIEW my_view IS 'View of departmental costs';
|
|
0 commit comments