head	1.40;
access;
symbols
	REL9_0_0:1.40
	REL9_1_ALPHA1:1.40
	REL9_0_RC1:1.40
	REL9_0_BETA4:1.40
	REL9_0_STABLE:1.40.0.2
	REL9_0_BETA3:1.40
	REL9_0_BETA2:1.40
	REL7_4_29:1.23
	REL8_0_25:1.26
	REL8_1_21:1.29
	REL8_2_17:1.33
	REL8_3_11:1.36
	REL8_4_4:1.38
	REL9_0_BETA1:1.40
	REL9_0_ALPHA5_BRANCH:1.39.0.8
	REL9_0_ALPHA5:1.39
	REL7_4_28:1.23
	REL8_0_24:1.26
	REL8_1_20:1.29
	REL8_2_16:1.33
	REL8_3_10:1.36
	REL8_4_3:1.38
	REL9_0_ALPHA4:1.39
	REL9_0_ALPHA4_BRANCH:1.39.0.6
	REL8_5_ALPHA3:1.39
	REL8_5_ALPHA3_BRANCH:1.39.0.4
	REL7_4_27:1.23
	REL8_0_23:1.26
	REL8_1_19:1.29
	REL8_2_15:1.33
	REL8_3_9:1.36
	REL8_4_2:1.38
	REL8_5_ALPHA2:1.39
	REL8_5_ALPHA2_BRANCH:1.39.0.2
	REL7_4_26:1.23
	REL8_0_22:1.26
	REL8_1_18:1.29
	REL8_2_14:1.33
	REL8_3_8:1.36
	REL8_4_1:1.38
	REL8_5_ALPHA1:1.38
	REL8_5_ALPHA1_BRANCH:1.38.0.4
	REL8_4_STABLE:1.38.0.2
	REL8_4_0:1.38
	REL8_4_RC2:1.38
	REL8_4_RC1:1.38
	REL8_4_BETA2:1.38
	REL8_4_BETA1:1.38
	REL7_4_25:1.23
	REL8_0_21:1.26
	REL8_1_17:1.29
	REL8_2_13:1.33
	REL8_3_7:1.36
	REL7_4_24:1.23
	REL8_0_20:1.26
	REL8_1_16:1.29
	REL8_2_12:1.33
	REL8_3_6:1.36
	REL7_4_23:1.23
	REL8_0_19:1.26
	REL8_1_15:1.29
	REL8_2_11:1.33
	REL8_3_5:1.36
	REL7_4_22:1.23
	REL8_0_18:1.26
	REL8_1_14:1.29
	REL8_2_10:1.33
	REL8_3_4:1.36
	REL7_4_21:1.23
	REL8_0_17:1.26
	REL8_1_13:1.29
	REL8_2_9:1.33
	REL8_3_3:1.36
	REL7_4_20:1.23
	REL8_0_16:1.26
	REL8_1_12:1.29
	REL8_2_8:1.33
	REL8_3_2:1.36
	REL8_2_7:1.33
	REL8_3_1:1.36
	REL8_3_STABLE:1.36.0.2
	REL8_3_0:1.36
	REL8_3_RC2:1.36
	REL7_3_21:1.20
	REL7_4_19:1.23
	REL8_0_15:1.26
	REL8_1_11:1.29
	REL8_2_6:1.33
	REL8_3_RC1:1.36
	REL8_3_BETA4:1.36
	REL8_3_BETA3:1.36
	REL8_3_BETA2:1.36
	REL8_3_BETA1:1.36
	REL7_3_20:1.20
	REL7_4_18:1.23
	REL8_0_14:1.26
	REL8_1_10:1.29
	REL8_2_5:1.33
	REL7_3_19:1.20
	REL7_4_17:1.23
	REL8_0_13:1.26
	REL8_1_9:1.29
	REL8_2_4:1.33
	REL8_0_12:1.26
	REL8_1_8:1.29
	REL8_2_3:1.33
	REL7_3_18:1.20
	REL7_4_16:1.23
	REL8_0_11:1.26
	REL8_1_7:1.29
	REL8_2_2:1.33
	REL8_0_10:1.26
	REL8_1_6:1.29
	REL8_2_1:1.33
	REL7_4_15:1.23
	REL7_3_17:1.20
	REL8_2_STABLE:1.33.0.2
	REL8_2_0:1.33
	REL8_2_RC1:1.33
	REL8_2_BETA3:1.33
	REL8_2_BETA2:1.33
	REL8_1_5:1.29
	REL8_0_9:1.26
	REL7_4_14:1.23
	REL7_3_16:1.20
	REL8_2_BETA1:1.32
	REL7_3_15:1.20
	REL7_4_13:1.23
	REL8_0_8:1.26
	REL8_1_4:1.29
	REL7_3_14:1.20
	REL7_4_12:1.23
	REL8_0_7:1.26
	REL8_1_3:1.29
	REL7_3_13:1.20
	REL7_4_11:1.23
	REL8_0_6:1.26
	REL8_1_2:1.29
	REL7_3_12:1.20
	REL7_4_10:1.23
	REL8_0_5:1.26
	REL8_1_1:1.29
	REL8_1_STABLE:1.29.0.2
	REL8_1_0:1.29
	REL8_1_0RC1:1.29
	REL8_1_0BETA4:1.29
	REL8_1_0BETA3:1.29
	REL7_3_11:1.20
	REL7_4_9:1.23
	REL8_0_4:1.26
	REL8_1_0BETA2:1.29
	REL8_1_0BETA1:1.29
	REL7_2_8:1.12
	REL7_3_10:1.20
	REL7_4_8:1.23
	REL8_0_3:1.26
	REL8_0_2:1.26
	REL7_2_7:1.12
	REL7_3_9:1.20
	REL7_4_7:1.23
	REL8_0_1:1.26
	REL8_0_STABLE:1.26.0.4
	REL8_0_0:1.26.0.2
	REL8_0_0RC5:1.26
	REL8_0_0RC4:1.26
	REL8_0_0RC3:1.25
	REL8_0_0RC2:1.25
	REL8_0_0RC1:1.25
	REL8_0_0BETA5:1.25
	REL8_0_0BETA4:1.25
	REL7_4_6:1.23
	REL7_3_8:1.20
	REL7_2_6:1.12
	REL8_0_0BETA3:1.25
	REL8_0_0BETA2:1.25
	REL7_2_5:1.12
	REL7_4_5:1.23
	REL7_3_7:1.20
	REL7_4_4:1.23
	REL8_0_0BETA1:1.25
	REL7_4_3:1.23
	REL7_4_2:1.23
	REL7_3_6:1.20
	REL7_4_1:1.23
	REL7_3_5:1.20
	REL7_4:1.23
	REL7_4_RC2:1.23
	REL7_4_STABLE:1.23.0.2
	REL7_4_RC1:1.23
	REL7_4_BETA5:1.23
	REL7_4_BETA4:1.23
	REL7_4_BETA3:1.23
	REL7_4_BETA2:1.21
	WIN32_DEV:1.21.0.2
	REL7_4_BETA1:1.21
	REL7_3_4:1.20
	REL7_3_2:1.20
	REL7_2_4:1.12
	REL7_3_STABLE:1.20.0.2
	REL7_2_3:1.12
	REL7_2_STABLE:1.12.0.2
	REL7_2:1.12
	REL7_2_RC2:1.12
	REL7_2_RC1:1.12
	REL7_2_BETA5:1.12
	REL7_2_BETA4:1.11
	REL7_2_BETA3:1.10
	REL7_2_BETA2:1.10
	REL7_2_BETA1:1.10
	REL7_1_2:1.8
	REL7_1_STABLE:1.8.0.2
	REL7_1_BETA:1.4
	REL7_1_BETA3:1.5
	REL7_1_BETA2:1.5
	REL7_1:1.8
	REL7_0_PATCHES:1.4.0.2
	REL7_0:1.4;
locks; strict;
comment	@# @;


1.40
date	2010.04.03.07.22.58;	author petere;	state Exp;
branches;
next	1.39;

1.39
date	2009.09.19.10.23.26;	author petere;	state Exp;
branches;
next	1.38;

1.38
date	2008.11.14.10.22.45;	author petere;	state Exp;
branches;
next	1.37;

1.37
date	2008.07.16.01.30.21;	author tgl;	state Exp;
branches;
next	1.36;

1.36
date	2007.08.21.21.08.47;	author tgl;	state Exp;
branches;
next	1.35;

1.35
date	2007.01.31.23.26.03;	author momjian;	state Exp;
branches;
next	1.34;

1.34
date	2007.01.23.05.07.17;	author tgl;	state Exp;
branches;
next	1.33;

1.33
date	2006.10.23.18.10.32;	author petere;	state Exp;
branches;
next	1.32;

1.32
date	2006.09.16.00.30.17;	author momjian;	state Exp;
branches;
next	1.31;

1.31
date	2006.07.27.19.52.04;	author tgl;	state Exp;
branches;
next	1.30;

1.30
date	2006.02.12.03.22.17;	author momjian;	state Exp;
branches;
next	1.29;

1.29
date	2005.06.08.21.15.27;	author tgl;	state Exp;
branches;
next	1.28;

1.28
date	2005.05.26.20.05.03;	author tgl;	state Exp;
branches;
next	1.27;

1.27
date	2005.03.07.04.30.51;	author momjian;	state Exp;
branches;
next	1.26;

1.26
date	2005.01.04.00.39.53;	author tgl;	state Exp;
branches;
next	1.25;

1.25
date	2003.11.29.19.51.38;	author pgsql;	state Exp;
branches;
next	1.24;

1.24
date	2003.11.21.22.32.48;	author tgl;	state Exp;
branches;
next	1.23;

1.23
date	2003.09.09.18.28.52;	author tgl;	state Exp;
branches;
next	1.22;

1.22
date	2003.08.31.17.32.21;	author petere;	state Exp;
branches;
next	1.21;

1.21
date	2003.04.15.13.25.08;	author petere;	state Exp;
branches
	1.21.2.1;
next	1.20;

1.20
date	2002.07.12.18.43.12;	author tgl;	state Exp;
branches;
next	1.19;

1.19
date	2002.05.13.17.45.30;	author tgl;	state Exp;
branches;
next	1.18;

1.18
date	2002.04.23.02.07.15;	author tgl;	state Exp;
branches;
next	1.17;

1.17
date	2002.04.21.19.02.39;	author thomas;	state Exp;
branches;
next	1.16;

1.16
date	2002.04.18.20.01.09;	author tgl;	state Exp;
branches;
next	1.15;

1.15
date	2002.03.19.02.18.12;	author momjian;	state Exp;
branches;
next	1.14;

1.14
date	2002.03.07.16.35.33;	author momjian;	state Exp;
branches;
next	1.13;

1.13
date	2002.03.06.20.34.44;	author momjian;	state Exp;
branches;
next	1.12;

1.12
date	2001.12.27.21.36.57;	author tgl;	state Exp;
branches;
next	1.11;

1.11
date	2001.12.08.03.24.34;	author thomas;	state Exp;
branches;
next	1.10;

1.10
date	2001.10.03.20.54.20;	author tgl;	state Exp;
branches;
next	1.9;

1.9
date	2001.09.03.12.57.49;	author petere;	state Exp;
branches;
next	1.8;

1.8
date	2001.03.05.19.00.39;	author petere;	state Exp;
branches;
next	1.7;

1.7
date	2001.03.05.18.42.56;	author momjian;	state Exp;
branches;
next	1.6;

1.6
date	2001.01.20.20.59.29;	author petere;	state Exp;
branches;
next	1.5;

1.5
date	2000.12.10.21.56.00;	author momjian;	state Exp;
branches;
next	1.4;

1.4
date	2000.04.11.05.39.15;	author thomas;	state Exp;
branches;
next	1.3;

1.3
date	99.10.26.16.36.28;	author momjian;	state Exp;
branches;
next	1.2;

1.2
date	99.10.26.03.53.35;	author momjian;	state Exp;
branches;
next	1.1;

1.1
date	99.10.26.03.48.58;	author momjian;	state Exp;
branches;
next	;

1.21.2.1
date	2003.09.07.04.36.44;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.40
log
@Remove unnecessary xref endterm attributes and title ids

The endterm attribute is mainly useful when the toolchain does not support
automatic link target text generation for a particular situation.  In  the
past, this was required by the man page tools for all reference page links,
but that is no longer the case, and it now actually gets in the way of
proper automatic link text generation.  The only remaining use cases are
currently xrefs to refsects.
@
text
@<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.39 2009/09/19 10:23:26 petere Exp $
PostgreSQL documentation
-->

<refentry id="SQL-COMMENT">
 <refmeta>
  <refentrytitle>COMMENT</refentrytitle>
  <manvolnum>7</manvolnum>
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>COMMENT</refname>
  <refpurpose>define or change the comment of an object</refpurpose>
 </refnamediv>

 <indexterm zone="sql-comment">
  <primary>COMMENT</primary>
 </indexterm>

 <refsynopsisdiv>
<synopsis>
COMMENT ON
{
  TABLE <replaceable class="PARAMETER">object_name</replaceable> |
  COLUMN <replaceable class="PARAMETER">table_name</replaceable>.<replaceable class="PARAMETER">column_name</replaceable> |
  AGGREGATE <replaceable class="PARAMETER">agg_name</replaceable> (<replaceable class="PARAMETER">agg_type</replaceable> [, ...] ) |
  CAST (<replaceable>source_type</replaceable> AS <replaceable>target_type</replaceable>) |
  CONSTRAINT <replaceable class="PARAMETER">constraint_name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable> |
  CONVERSION <replaceable class="PARAMETER">object_name</replaceable> |
  DATABASE <replaceable class="PARAMETER">object_name</replaceable> |
  DOMAIN <replaceable class="PARAMETER">object_name</replaceable> |
  FUNCTION <replaceable class="PARAMETER">function_name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) |
  INDEX <replaceable class="PARAMETER">object_name</replaceable> |
  LARGE OBJECT <replaceable class="PARAMETER">large_object_oid</replaceable> |
  OPERATOR <replaceable class="PARAMETER">operator_name</replaceable> (<replaceable class="PARAMETER">left_type</replaceable>, <replaceable class="PARAMETER">right_type</replaceable>) |
  OPERATOR CLASS <replaceable class="PARAMETER">object_name</replaceable> USING <replaceable class="parameter">index_method</replaceable> |
  OPERATOR FAMILY <replaceable class="PARAMETER">object_name</replaceable> USING <replaceable class="parameter">index_method</replaceable> |
  [ PROCEDURAL ] LANGUAGE <replaceable class="PARAMETER">object_name</replaceable> |
  ROLE <replaceable class="PARAMETER">object_name</replaceable> |
  RULE <replaceable class="PARAMETER">rule_name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable> |
  SCHEMA <replaceable class="PARAMETER">object_name</replaceable> |
  SEQUENCE <replaceable class="PARAMETER">object_name</replaceable> |
  TABLESPACE <replaceable class="PARAMETER">object_name</replaceable> |
  TEXT SEARCH CONFIGURATION <replaceable class="PARAMETER">object_name</replaceable> |
  TEXT SEARCH DICTIONARY <replaceable class="PARAMETER">object_name</replaceable> |
  TEXT SEARCH PARSER <replaceable class="PARAMETER">object_name</replaceable> |
  TEXT SEARCH TEMPLATE <replaceable class="PARAMETER">object_name</replaceable> |
  TRIGGER <replaceable class="PARAMETER">trigger_name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable> |
  TYPE <replaceable class="PARAMETER">object_name</replaceable> |
  VIEW <replaceable class="PARAMETER">object_name</replaceable>
} IS '<replaceable class="PARAMETER">text</replaceable>'
</synopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>

  <para>
   <command>COMMENT</command> stores a comment about a database object.
  </para>

  <para>
    To modify a comment, issue a new <command>COMMENT</> command for the
    same object.  Only one comment string is stored for each object.
    To remove a comment, write <literal>NULL</literal> in place of the text
    string.
    Comments are automatically dropped when the object is dropped.
  </para>

  <para>
    Comments can be viewed using <application>psql</application>'s 
    <command>\d</command> family of commands.
    Other user interfaces to retrieve comments can be built atop
    the same built-in functions that <application>psql</application> uses, namely
    <function>obj_description</>, <function>col_description</>,
    and <function>shobj_description</> 
    (see <xref linkend="functions-info-comment-table">).
  </para>
 </refsect1>

 <refsect1>
  <title>Parameters</title>

  <variablelist>
   <varlistentry>
    <term><replaceable class="parameter">object_name</replaceable></term>
    <term><replaceable class="parameter">table_name.column_name</replaceable></term>
    <term><replaceable class="parameter">agg_name</replaceable></term>
    <term><replaceable class="parameter">constraint_name</replaceable></term>
    <term><replaceable class="parameter">function_name</replaceable></term>
    <term><replaceable class="parameter">op</replaceable></term>
    <term><replaceable class="parameter">rule_name</replaceable></term>
    <term><replaceable class="parameter">trigger_name</replaceable></term>
    <listitem>
     <para>
      The name of the object to be commented.  Names of tables,
      aggregates, domains, functions, indexes, operators, operator classes,
      operator families, sequences, text search objects, types, and views can
      be schema-qualified.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">agg_type</replaceable></term>
    <listitem>
     <para>
      An input data type on which the aggregate function operates.
      To reference a zero-argument aggregate function, write <literal>*</>
      in place of the list of input data types.
     </para>
    </listitem>
   </varlistentry>
   
   <varlistentry>
     <term><replaceable>source_type</replaceable></term>
     <listitem>
      <para>
       The name of the source data type of the cast.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable>target_type</replaceable></term>
     <listitem>
      <para>
       The name of the target data type of the cast.
      </para>
     </listitem>
    </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">argmode</replaceable></term>

    <listitem>
     <para>
      The mode of a function argument: <literal>IN</>, <literal>OUT</>,
      <literal>INOUT</>, or <literal>VARIADIC</>.
      If omitted, the default is <literal>IN</>.
      Note that <command>COMMENT ON FUNCTION</command> does not actually pay
      any attention to <literal>OUT</> arguments, since only the input
      arguments are needed to determine the function's identity.
      So it is sufficient to list the <literal>IN</>, <literal>INOUT</>,
      and <literal>VARIADIC</> arguments.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">argname</replaceable></term>

    <listitem>
     <para>
      The name of a function argument.
      Note that <command>COMMENT ON FUNCTION</command> does not actually pay
      any attention to argument names, since only the argument data
      types are needed to determine the function's identity.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">argtype</replaceable></term>

    <listitem>
     <para>
      The data type(s) of the function's arguments (optionally 
      schema-qualified), if any.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">large_object_oid</replaceable></term>
    <listitem>
     <para>
      The OID of the large object.
     </para>
    </listitem>
   </varlistentry>

    <varlistentry>
     <term><literal>PROCEDURAL</literal></term>

     <listitem>
      <para>
       This is a noise word.
      </para>
     </listitem>
    </varlistentry>

   <varlistentry>
    <term><replaceable class="parameter">text</replaceable></term>
    <listitem>
     <para>
      The new comment, written as a string literal; or <literal>NULL</>
      to drop the comment.
     </para>
    </listitem>
   </varlistentry>
    
  </variablelist>
 </refsect1>

 <refsect1>
  <title>Notes</title>

  <para>
   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).  For shared objects such as
   databases, roles, and tablespaces comments are stored globally
   and any user connected to any database can see all the comments
   for shared objects.  Therefore, don't put security-critical
   information in comments.
  </para>
 </refsect1>

 <refsect1>
  <title>Examples</title>

  <para>
   Attach a comment to the table <literal>mytable</literal>:

<programlisting>
COMMENT ON TABLE mytable IS 'This is my table.';
</programlisting>

   Remove it again:

<programlisting>
COMMENT ON TABLE mytable IS NULL;
</programlisting>
  </para>

  <para>
   Some more examples:

<programlisting>
COMMENT ON AGGREGATE my_aggregate (double precision) IS 'Computes sample variance';
COMMENT ON CAST (text AS int4) IS 'Allow casts from text to int4';
COMMENT ON COLUMN my_table.my_column IS 'Employee ID number';
COMMENT ON CONVERSION my_conv IS 'Conversion to UTF8';
COMMENT ON DATABASE my_database IS 'Development Database';
COMMENT ON DOMAIN my_domain IS 'Email Address Domain';
COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral';
COMMENT ON INDEX my_index IS 'Enforces uniqueness on employee ID';
COMMENT ON LANGUAGE plpython IS 'Python support for stored procedures';
COMMENT ON LARGE OBJECT 346344 IS 'Planning document';
COMMENT ON OPERATOR ^ (text, text) IS 'Performs intersection of two texts';
COMMENT ON OPERATOR - (NONE, text) IS 'This is a prefix operator on text';
COMMENT ON OPERATOR CLASS int4ops USING btree IS '4 byte integer operators for btrees';
COMMENT ON OPERATOR FAMILY integer_ops USING btree IS 'all integer operators for btrees';
COMMENT ON ROLE my_role IS 'Administration group for finance tables';
COMMENT ON RULE my_rule ON my_table IS 'Logs updates of employee records';
COMMENT ON SCHEMA my_schema IS 'Departmental data';
COMMENT ON SEQUENCE my_sequence IS 'Used to generate primary keys';
COMMENT ON TABLE my_schema.my_table IS 'Employee Information';
COMMENT ON TABLESPACE my_tablespace IS 'Tablespace for indexes';
COMMENT ON TEXT SEARCH CONFIGURATION my_config IS 'Special word filtering';
COMMENT ON TEXT SEARCH DICTIONARY swedish IS 'Snowball stemmer for swedish language';
COMMENT ON TEXT SEARCH PARSER my_parser IS 'Splits text into words';
COMMENT ON TEXT SEARCH TEMPLATE snowball IS 'Snowball stemmer';
COMMENT ON TRIGGER my_trigger ON my_table IS 'Used for RI';
COMMENT ON TYPE complex IS 'Complex number data type';
COMMENT ON VIEW my_view IS 'View of departmental costs';
</programlisting>
  </para>
 </refsect1>

 <refsect1>
  <title>Compatibility</title>

  <para>
   There is no <command>COMMENT</command> command in the SQL standard.
  </para>
 </refsect1>
</refentry>
@


1.39
log
@Make the placeholder naming in the synopses of the SQL help more consistent
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.38 2008/11/14 10:22:45 petere Exp $
d8 1
a8 1
  <refentrytitle id="SQL-COMMENT-TITLE">COMMENT</refentrytitle>
@


1.38
log
@Set SQL man pages to be section 7 by default, and only transform them to
another section if required by the platform (instead of the old way of
building them in section "l" and always transforming them to the
platform-specific section).

This speeds up the installation on common platforms, and it avoids some
funny business with the man page tools and build process.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.37 2008/07/16 01:30:21 tgl Exp $
d29 1
a29 1
  CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</replaceable>) |
d34 1
a34 1
  FUNCTION <replaceable class="PARAMETER">func_name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) |
d37 1
a37 1
  OPERATOR <replaceable class="PARAMETER">op</replaceable> (<replaceable class="PARAMETER">leftoperand_type</replaceable>, <replaceable class="PARAMETER">rightoperand_type</replaceable>) |
d53 1
a53 1
} IS <replaceable class="PARAMETER">'text'</replaceable>
d92 1
a92 1
    <term><replaceable class="parameter">func_name</replaceable></term>
d118 1
a118 1
     <term><replaceable>sourcetype</replaceable></term>
d127 1
a127 1
     <term><replaceable>targettype</replaceable></term>
@


1.37
log
@Support "variadic" functions, which can accept a variable number of arguments
so long as all the trailing arguments are of the same (non-array) type.
The function receives them as a single array argument (which is why they
have to all be the same type).

It might be useful to extend this facility to aggregates, but this patch
doesn't do that.

This patch imposes a noticeable slowdown on function lookup --- a follow-on
patch will fix that by adding a redundant column to pg_proc.

Pavel Stehule
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.36 2007/08/21 21:08:47 tgl Exp $
d9 1
@


1.36
log
@First rough cut at text search documentation: bare bones reference
pages for the new SQL commands.  I also committed Bruce's text search
introductory chapter, as-is except for fixing some markup errors,
so that there would be a place for the reference pages to link to.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.35 2007/01/31 23:26:03 momjian Exp $
d139 3
a141 2
      The mode of a function argument: either <literal>IN</>, <literal>OUT</>,
      or <literal>INOUT</>.  If omitted, the default is <literal>IN</>.
d145 2
a146 2
      So it is sufficient to list the <literal>IN</> and <literal>INOUT</>
      arguments.
@


1.35
log
@Update reference documentation on may/can/might:

Standard English uses "may", "can", and "might" in different ways:

        may - permission, "You may borrow my rake."

        can - ability, "I can lift that log."

        might - possibility, "It might rain today."

Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice.  Similarly, "It may crash" is better stated, "It might crash".
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.34 2007/01/23 05:07:17 tgl Exp $
d45 4
d72 2
a73 3
    Comments can be
    easily retrieved with the <application>psql</application> commands
    <command>\dd</command>, <command>\d+</command>, and <command>\l+</command>.
d99 2
a100 1
      operator families, sequences, types, and views can be schema-qualified.
d262 4
@


1.34
log
@Add CREATE/ALTER/DROP OPERATOR FAMILY commands, also COMMENT ON OPERATOR
FAMILY; and add FAMILY option to CREATE OPERATOR CLASS to allow adding a
class to a pre-existing family.  Per previous discussion.  Man, what a
tedious lot of cutting and pasting ...
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.33 2006/10/23 18:10:32 petere Exp $
d96 1
a96 1
      operator families, sequences, types, and views may be schema-qualified.
@


1.33
log
@Spellchecking and such
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.32 2006/09/16 00:30:17 momjian Exp $
d38 1
d96 1
a96 1
      sequences, types, and views may be schema-qualified.
d251 1
@


1.32
log
@Remove emacs info from footer of SGML files.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.31 2006/07/27 19:52:04 tgl Exp $
d209 1
a209 1
   databases, roles, and tablespaces comments are stored gloablly
@


1.31
log
@Aggregate functions now support multiple input arguments.  I also took
the opportunity to treat COUNT(*) as a zero-argument aggregate instead
of the old hack that equated it to COUNT(1); this is materially cleaner
(no more weird ANYOID cases) and ought to be at least a tiny bit faster.
Original patch by Sergey Koposov; review, documentation, simple regression
tests, pg_dump and psql support by moi.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.30 2006/02/12 03:22:17 momjian Exp $
a270 17

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->
@


1.30
log
@I've created a new shared catalog table pg_shdescription to store
comments on cluster global objects like databases, tablespaces, and
roles.

It touches a lot of places, but not much in the way of big changes.  The
only design decision I made was to duplicate the query and manipulation
functions rather than to try and have them handle both shared and local
comments.  I believe this is simpler for the code and not an issue for
callers because they know what type of object they are dealing with.
This has resulted in a shobj_description function analagous to
obj_description and backend functions [Create/Delete]SharedComments
mirroring the existing [Create/Delete]Comments functions.

pg_shdescription.h goes into src/include/catalog/

Kris Jurka
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.29 2005/06/08 21:15:27 tgl Exp $
d27 1
a27 1
  AGGREGATE <replaceable class="PARAMETER">agg_name</replaceable> (<replaceable class="PARAMETER">agg_type</replaceable>) |
d104 3
a106 2
      The argument data type of the aggregate function, or
      <literal>*</literal> if the function accepts any data type.
@


1.29
log
@Remove grammar productions for prefix and postfix % and ^ operators,
as well as the existing pg_catalog entries for prefix and postfix %.
These have never been documented, though they did appear in one old
regression test.  This avoids surprising behavior in cases like
"SELECT -25 % -10".  Per recent discussion.
Note: although there is a catalog change here, I did not force initdb
since there's no harm in leaving the inaccessible entries in one's
copy of pg_operator.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.28 2005/05/26 20:05:03 tgl Exp $
d39 1
d43 1
d72 2
a73 1
    <function>obj_description</> and <function>col_description</>
a203 5
   A comment for a database can only be created in that database,
   and will only be visible in that database, not in other databases.
  </para>

  <para>
d207 5
a211 2
   objects that they don't own).  Therefore, don't put
   security-critical information in comments.
d249 1
d254 1
@


1.28
log
@Document that utility commands such as DROP FUNCTION allow argument names
and modes to be included when naming an existing function.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.27 2005/03/07 04:30:51 momjian Exp $
d246 1
a246 1
COMMENT ON OPERATOR ^ (NONE, text) IS 'This is a prefix operator on text';
@


1.27
log
@Rename canonical encodings, per Peter:

	UNICODE => UTF8
	ALT => WIN866
	WIN => WIN1251
	TCVN => WIN1258

The old codes continue to work.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.26 2005/01/04 00:39:53 tgl Exp $
d33 1
a33 1
  FUNCTION <replaceable class="PARAMETER">func_name</replaceable> (<replaceable class="PARAMETER">arg1_type</replaceable>, <replaceable class="PARAMETER">arg2_type</replaceable>, ...) |
d106 58
a182 18
   
   <varlistentry>
     <term><replaceable>sourcetype</replaceable></term>
     <listitem>
      <para>
       The name of the source data type of the cast.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><replaceable>targettype</replaceable></term>
     <listitem>
      <para>
       The name of the target data type of the cast.
      </para>
     </listitem>
    </varlistentry>
@


1.26
log
@More minor updates and copy-editing.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/comment.sgml,v 1.25 2003/11/29 19:51:38 pgsql Exp $
d198 1
a198 1
COMMENT ON CONVERSION my_conv IS 'Conversion to Unicode';
@


1.25
log
@
$Header: -> $PostgreSQL Changes ...
@
text
@d2 1
a2 1
$PostgreSQL: /cvsroot/pgsql-server/doc/src/sgml/ref/comment.sgml,v 1.24 2003/11/21 22:32:48 tgl Exp $
a53 6
    Comments can be
    easily retrieved with the <application>psql</application> commands
    <command>\dd</command>, <command>\d+</command>, and <command>\l+</command>.
    Other user interfaces to retrieve comments can be built atop
    the same built-in functions that <application>psql</application> uses, namely
    <function>obj_description</> and <function>col_description</>.
d63 10
d148 2
a149 1
      The new comment.
@


1.24
log
@COMMENT ON casts, conversions, languages, operator classes, and
large objects.  Dump all these in pg_dump; also add code to pg_dump
user-defined conversions.  Make psql's large object code rely on
the backend for inserting/deleting LOB comments, instead of trying to
hack pg_description directly.  Documentation and regression tests added.

Christopher Kings-Lynne, code reviewed by Tom
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/comment.sgml,v 1.23 2003/09/09 18:28:52 tgl Exp $
@


1.23
log
@Remove a bunch of content-free Diagnostics sections, as per previous
discussion.  (Still have some work to do editing the remainder.)
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/comment.sgml,v 1.22 2003/08/31 17:32:21 petere Exp $
d28 1
d30 1
d35 1
d37 2
d78 1
a78 1
    <term><replaceable class="parameter">aggname</replaceable></term>
d86 3
a88 3
      The name of the object to be be commented.  Names of tables,
      aggregates, domains, functions, indexes, operators, sequences,
      types, and views may be schema-qualified.
d94 47
d148 1
d156 5
d191 1
d193 1
d198 2
d202 1
@


1.22
log
@Add/edit index entries.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/comment.sgml,v 1.21 2003/04/15 13:25:08 petere Exp $
a92 15
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1>
  <title>Diagnostics</title>

  <variablelist>
   <varlistentry>
    <term><computeroutput>COMMENT</computeroutput></term>
    <listitem>
     <para>
      Message returned if the comment was successfully changed.
@


1.21
log
@Bring SQL ref pages to consistent format, part 1.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/comment.sgml,v 1.20 2002/07/12 18:43:12 tgl Exp $
d16 4
@


1.21.2.1
log
@Update this branch to match CVS head, includes WIN32 improvements.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql-server/doc/src/sgml/ref/comment.sgml,v 1.22 2003/08/31 17:32:21 petere Exp $
a15 4

 <indexterm zone="sql-comment">
  <primary>COMMENT</primary>
 </indexterm>
@


1.20
log
@Second phase of committing Rod Taylor's pg_depend/pg_constraint patch.
pg_relcheck is gone; CHECK, UNIQUE, PRIMARY KEY, and FOREIGN KEY
constraints all have real live entries in pg_constraint.  pg_depend
exists, and RESTRICT/CASCADE options work on most kinds of DROP;
however, pg_depend is not yet very well populated with dependencies.
(Most of the ones that are present at this point just replace formerly
hardwired associations, such as the implicit drop of a relation's pg_type
entry when the relation is dropped.)  Need to add more logic to create
dependency entries, improve pg_dump to dump constraints in place of
indexes and triggers, and add some regression tests.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.19 2002/05/13 17:45:30 tgl Exp $
d11 1
d13 2
a14 6
  <refname>
   COMMENT
  </refname>
  <refpurpose>
   define or change the comment of an object
  </refpurpose>
d16 1
d18 1
a18 4
  <refsynopsisdivinfo>
   <date>1999-07-20</date>
  </refsynopsisdivinfo>
  <synopsis>
d20 1
a20 1
[
d36 3
a38 2
] IS <replaceable class="PARAMETER">'text'</replaceable>
  </synopsis>
d40 2
a41 58
  <refsect2 id="R2-SQL-COMMENT-1">
   <refsect2info>
    <date>1999-10-25</date>
   </refsect2info>
   <title>
    Inputs
   </title>
   <para>

    <variablelist>
     <varlistentry>
      <term><replaceable class="PARAMETER">object_name,
      table_name.column_name, agg_name, constraint_name, func_name, op, rule_name, trigger_name</replaceable></term>
      <listitem>
       <para>
	The name of the object to be be commented.  Names of tables,
	aggregates, domains, functions, indexes, operators, sequences, types,
	and views
	may be schema-qualified.
       </para>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term><replaceable class="PARAMETER">text</replaceable></term>
      <listitem>
       <para>
	The comment to add.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>
  </refsect2>

  <refsect2 id="R2-SQL-COMMENT-2">
   <refsect2info>
    <date>1998-09-08</date>
   </refsect2info>
   <title>
    Outputs
   </title>
   <para>

    <variablelist>
     <varlistentry>
      <term><computeroutput>
COMMENT
       </computeroutput></term>
      <listitem>
       <para>
	Message returned if the table is successfully commented.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>
  </refsect2>
 </refsynopsisdiv>
a42 7
 <refsect1 id="R1-SQL-COMMENT-1">
  <refsect1info>
   <date>1998-10-25</date>
  </refsect1info>
  <title>
   Description
  </title>
d46 5
a50 5
    easily retrieved with <command>psql</command>'s
    <command>\dd</command>, <command>\d+</command>, or <command>\l+</command>
    commands.  Other user interfaces to retrieve comments can be built atop
    the same built-in functions that <command>psql</command> uses, namely
    <function>obj_description()</> and <function>col_description()</>.
d60 52
a112 1
  <note>
d114 5
a118 5
    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.
a119 1
  </note>
d122 3
a124 4
 <refsect1 id="R1-SQL-COMMENT-2">
  <title>
   Usage
  </title>
d128 1
a128 1
   <programlisting>
d130 1
a130 1
   </programlisting>
d134 1
a134 1
   <programlisting>
d136 1
a136 1
   </programlisting>
d142 1
a142 1
   <programlisting>
d144 1
a144 1
COMMENT ON COLUMN my_table.my_field IS 'Employee ID number';
d148 1
a148 1
COMMENT ON INDEX my_index IS 'Enforces uniqueness on employee id';
d151 1
a151 1
COMMENT ON RULE my_rule ON my_table IS 'Logs UPDATES of employee records';
d155 2
a156 2
COMMENT ON TRIGGER my_trigger ON my_table IS 'Used for R.I.';
COMMENT ON TYPE complex IS 'Complex Number datatype';
d158 1
a158 1
   </programlisting>
d162 6
a167 16
 <refsect1 id="R1-SQL-COMMENT-3">
  <title>
   Compatibility
  </title>

  <refsect2 id="R2-SQL-COMMENT-4">
   <refsect2info>
    <date>1998-09-08</date>
   </refsect2info>
   <title>
    SQL92
   </title>
   <para>
    There is no <command>COMMENT</command> in <acronym>SQL92</acronym>.
   </para>
  </refsect2>
@


1.19
log
@Make operators have their own comments separate from those of the
underlying function; but cause psql's \do to show the underlying
function's comment if the operator has no comment of its own, to preserve
the useful functionality of the original behavior.  Also, implement
COMMENT ON SCHEMA.  Patch from Rod Taylor.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.18 2002/04/23 02:07:15 tgl Exp $
d29 1
d56 1
a56 1
      table_name.column_name, agg_name, func_name, op, rule_name, trigger_name</replaceable></term>
@


1.18
log
@Update SQL-command reference pages for schema features.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.17 2002/04/21 19:02:39 thomas Exp $
d26 1
a26 1
  [ DATABASE | DOMAIN | INDEX | SEQUENCE | TABLE | TYPE | VIEW ] <replaceable class="PARAMETER">object_name</replaceable> |
d29 5
a33 2
  FUNCTION <replaceable class="PARAMETER">func_name</replaceable> (<replaceable class="PARAMETER">arg1</replaceable>, <replaceable class="PARAMETER">arg2</replaceable>, ...) |
  OPERATOR <replaceable class="PARAMETER">op</replaceable> (<replaceable class="PARAMETER">leftoperand_type</replaceable> <replaceable class="PARAMETER">rightoperand_type</replaceable>) |
d35 5
a39 1
  TRIGGER <replaceable class="PARAMETER">trigger_name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable>
d59 3
a61 2
	indexes, sequences, views, types, domains, functions, aggregates,
	and operators may be schema-qualified.
d127 1
d129 1
a129 1
    It should be noted that there is presently no security mechanism
d135 1
d143 1
a143 1
   Comment the table <literal>mytable</literal>:
d146 7
a152 1
COMMENT ON mytable IS 'This is my table.';
d160 2
d164 1
d166 4
d171 3
a173 2
COMMENT ON TABLE my_table IS 'Employee Information';
COMMENT ON TYPE my_type IS 'Complex Number support';
a174 6
COMMENT ON COLUMN my_table.my_field IS 'Employee ID number';
COMMENT ON AGGREGATE my_aggregate (double precision) IS 'Computes sample variance';
COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral';
COMMENT ON OPERATOR ^ (text, text) IS 'Performs intersection of two text';
COMMENT ON RULE my_rule ON my_table IS 'Logs UPDATES of employee records';
COMMENT ON TRIGGER my_trigger ON my_table IS 'Used for R.I.';
@


1.17
log
@Augment the date/time examples in the User's Guide to reflect the newer
 capabilities of specifying time zones as intervals per SQL9x.
Put refentrytitle contents on the same line as the tag.
 Otherwise, leading whitespace is propagated into the product, which
 (at least) messes up the ToC layout.
Remove (some) docinfo tags containing dates. Best to omit if the dates
 are not accurate; maybe use CVS dates instead or leave them out.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.16 2002/04/18 20:01:09 tgl Exp $
d47 2
a48 2
      <term><replaceable class="PARAMETER">object_name, table_name,
      column_name, agg_name, func_name, op, rule_name, trigger_name</replaceable></term>
d51 3
a53 1
	The name of the object to be be commented.
@


1.16
log
@Rule names are now unique per-relation, rather than unique globally.
DROP RULE and COMMENT ON RULE syntax adds an 'ON tablename' clause,
similar to TRIGGER syntaxes.  To allow loading of existing pg_dump
files containing COMMENT ON RULE, the COMMENT code will still accept
the old syntax --- but only if the target rulename is unique across
the whole database.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.15 2002/03/19 02:18:12 momjian Exp $
d8 1
a8 3
  <refentrytitle id="SQL-COMMENT-TITLE">
   COMMENT
  </refentrytitle>
@


1.15
log
@Add DOMAIN support.  Includes manual pages and regression tests, from
Rod Taylor.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.14 2002/03/07 16:35:33 momjian Exp $
d28 1
a28 1
  [ DATABASE | DOMAIN | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] <replaceable class="PARAMETER">object_name</replaceable> |
d33 1
d50 1
a50 1
      column_name, agg_name, func_name, op, trigger_name</replaceable></term>
a146 1
COMMENT ON RULE my_rule IS 'Logs UPDATES of employee records';
d155 1
@


1.14
log
@Back out domain patch until it works properly.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.12 2001/12/27 21:36:57 tgl Exp $
d28 1
a28 1
  [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] <replaceable class="PARAMETER">object_name</replaceable> |
d36 1
a36 1
  
d67 1
a67 1
  
d102 1
a102 1
    Comments can be 
d144 1
d159 1
a159 1
 
d164 1
a164 1
  
@


1.13
log
@Ok.  Updated patch attached.

- domain.patch -> source patch against pgsql in cvs
- drop_domain.sgml and create_domain.sgml -> New doc/src/sgml/ref docs

- dominfo.txt -> basic domain related queries I used for testing
[ ADDED TO /doc]

Enables domains of array elements -> CREATE DOMAIN dom int4[3][2];

Uses a typbasetype column to describe the origin of the domain.

Copies data to attnotnull rather than processing in execMain().

Some documentation differences from earlier.

If this is approved, I'll start working on pg_dump, and a \dD <domain>
option in psql, and regression tests.  I don't really feel like doing
those until the system table structure settles for pg_type.


CHECKS when added, will also be copied to to the table attributes.  FK
Constraints (if I ever figure out how) will be done similarly.  Both
will lbe handled by MergeDomainAttributes() which is called shortly
before MergeAttributes().

Rod Taylor
@
text
@d28 1
a28 1
  [ DATABASE | DOMAIN | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] <replaceable class="PARAMETER">object_name</replaceable> |
d36 1
a36 1

d67 1
a67 1

d102 1
a102 1
    Comments can be
a143 1
COMMENT ON DOMAIN my_domain IS 'Domains are like abstracted fields';
d158 1
a158 1

d163 1
a163 1

@


1.12
log
@Document obj_description and col_description functions; expand
description of COMMENT command.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.11 2001/12/08 03:24:34 thomas Exp $
d28 1
a28 1
  [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] <replaceable class="PARAMETER">object_name</replaceable> |
d36 1
a36 1
  
d67 1
a67 1
  
d102 1
a102 1
    Comments can be 
d144 1
d159 1
a159 1
 
d164 1
a164 1
  
@


1.11
log
@Use PostgreSQL consistantly throughout docs. Before, usage was split evenly
 between Postgres and PostgreSQL.
@
text
@d2 1
a2 1
$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.10 2001/10/03 20:54:20 tgl Exp $
d101 2
a102 1
   <command>COMMENT</command> adds a comment to an object that can be 
d104 11
a114 2
    <command>\dd</command>, <command>\d+</command>, or <command>\l+</command> commands.
    To remove a comment, write <literal>NULL</literal>.
d116 8
@


1.10
log
@DROP AGGREGATE and COMMENT ON AGGREGATE now accept the expected syntax
'aggname (aggtype)'.  The old syntax 'aggname aggtype' is still accepted
for backwards compatibility.  Fix pg_dump, which was actually broken for
most cases of user-defined aggregates.  Clean up error messages associated
with these commands.
@
text
@d2 2
a3 2
$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.9 2001/09/03 12:57:49 petere Exp $
Postgres documentation
@


1.9
log
@Put some kind of grammatical uniformity in the <refpurpose> lines.
@
text
@d2 1
a2 1
$Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.8 2001/03/05 19:00:39 petere Exp $
d28 4
a31 5
  [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ]
  <replaceable class="PARAMETER">object_name</replaceable> |
  COLUMN <replaceable class="PARAMETER">table_name</replaceable>.<replaceable class="PARAMETER">column_name</replaceable>|
  AGGREGATE <replaceable class="PARAMETER">agg_name</replaceable> <replaceable class="PARAMETER">agg_type</replaceable>|
  FUNCTION <replaceable class="PARAMETER">func_name</replaceable> (<replaceable class="PARAMETER">arg1</replaceable>, <replaceable class="PARAMETER">arg2</replaceable>, ...)|
d104 1
a104 1
    To remove a comment, use <literal>NULL</literal>.
@


1.8
log
@Add missing space, change some markup.
@
text
@d2 1
a2 1
$Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.7 2001/03/05 18:42:56 momjian Exp $
d18 1
a18 1
   Add comment to an object
@


1.7
log
@I'm attaching those diffs for the Reference Guide in a tar file, as
not all of them attached properly in the post I made a few minutes
ago. Please disregard those earlier files. The diffs in the tar file
replace them.

Pierce Tyler
@
text
@d2 1
a2 1
$Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.6 2001/01/20 20:59:29 petere Exp $
d103 2
a104 2
    easily retrieved with <application>psql's</application>
    <emphasis>\dd</emphasis>, <emphasis>\d+</emphasis>, or <emphasis>\l+</emphasis>commands.
@


1.6
log
@Replace some oldish, non-SQL'ish elements with more standard forms. (cast
syntax, type names, function names, etc.)
@
text
@d2 1
a2 1
$Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.5 2000/12/10 21:56:00 momjian Exp $
d104 1
a104 1
    <emphasis>\dd</emphasis> or <emphasis>\d+</emphasis> commands.
@


1.5
log
@Add mention of \d+ to comment.
@
text
@d2 1
a2 1
$Header: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.4 2000/04/11 05:39:15 thomas Exp $
d134 2
a135 2
COMMENT ON AGGREGATE my_aggregate float8 IS 'Computes sample variance';
COMMENT ON FUNCTION my_function (datetime) IS 'Returns Roman Numeral';
@


1.4
log
@Update porting list.
Fix markup to get clean compile.
@
text
@d2 1
a2 1
$Header: /usr/local/cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.3 1999/10/26 16:36:28 momjian Exp $
d104 1
a104 1
    <emphasis>\dd</emphasis> command.
@


1.3
log
@Add mention of NULL for COMMENT.
@
text
@d2 1
a2 1
$Header: /usr/local/cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.2 1999/10/26 03:53:35 momjian Exp $
d104 1
a104 1
    <emphasize>\dd</emphasize> command.
@


1.2
log
@More comments.
@
text
@d2 1
a2 1
$Header: /usr/local/cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.1 1999/10/26 03:48:58 momjian Exp $
d105 1
a105 1
    To remove a comment, use <literal>''</literal>.
@


1.1
log
@Add documentation for comment.
@
text
@d2 1
a2 1
$Header: /usr/local/cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.2 1999/10/01 15:24:09 thomas Exp $
d106 1
d115 1
a115 1
   comment the table <literal>mytable</literal>:
d119 19
@
