Commit 9fcc1159 authored by Bruce Momjian's avatar Bruce Momjian

Appears I forgot to update the docs earlier.

Please note I have no way to test this.  Docbook doesn't like my
cygwin setup.

--
Rod Taylor
parent 80e232f2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/insert.sgml,v 1.17 2002/04/23 02:07:16 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/insert.sgml,v 1.18 2002/04/24 02:31:30 momjian Exp $
PostgreSQL documentation
-->
......@@ -22,7 +22,7 @@ PostgreSQL documentation
</refsynopsisdivinfo>
<synopsis>
INSERT INTO <replaceable class="PARAMETER">table</replaceable> [ ( <replaceable class="PARAMETER">column</replaceable> [, ...] ) ]
{ DEFAULT VALUES | VALUES ( <replaceable class="PARAMETER">expression</replaceable> [, ...] ) | SELECT <replaceable class="PARAMETER">query</replaceable> }
{ DEFAULT VALUES | VALUES ( { <replaceable class="PARAMETER">expression</replaceable> | DEFAULT } [, ...] ) | SELECT <replaceable class="PARAMETER">query</replaceable> }
</synopsis>
<refsect2 id="R2-SQL-INSERT-1">
......@@ -71,6 +71,16 @@ INSERT INTO <replaceable class="PARAMETER">table</replaceable> [ ( <replaceable
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="PARAMETER">DEFAULT</replaceable></term>
<listitem>
<para>
This column will be filled in by the column DEFAULT clause, or NULL if
a default is not available.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="PARAMETER">query</replaceable></term>
<listitem>
......@@ -175,6 +185,18 @@ INSERT INTO films (code, title, did, date_prod, kind)
</programlisting>
</para>
<para>
In the third example, we use the DEFAULT values for the date columns
rather than specifying an entry.
<programlisting>
INSERT INTO films VALUES
('UA502','Bananas',105,DEFAULT,'Comedy',INTERVAL '82 minute');
INSERT INTO films (code, title, did, date_prod, kind)
VALUES ('T_601', 'Yojimbo', 106, DEFAULT, 'Drama');
</programlisting>
</para>
<para>
Insert a single row into table distributors; note that
only column <literal>name</literal> is specified, so the omitted
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment