mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$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
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ PostgreSQL documentation
|
|||||||
</refsynopsisdivinfo>
|
</refsynopsisdivinfo>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
INSERT INTO <replaceable class="PARAMETER">table</replaceable> [ ( <replaceable class="PARAMETER">column</replaceable> [, ...] ) ]
|
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>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-INSERT-1">
|
<refsect2 id="R2-SQL-INSERT-1">
|
||||||
@ -71,6 +71,16 @@ INSERT INTO <replaceable class="PARAMETER">table</replaceable> [ ( <replaceable
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</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>
|
<varlistentry>
|
||||||
<term><replaceable class="PARAMETER">query</replaceable></term>
|
<term><replaceable class="PARAMETER">query</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -175,6 +185,18 @@ INSERT INTO films (code, title, did, date_prod, kind)
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</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>
|
<para>
|
||||||
Insert a single row into table distributors; note that
|
Insert a single row into table distributors; note that
|
||||||
only column <literal>name</literal> is specified, so the omitted
|
only column <literal>name</literal> is specified, so the omitted
|
||||||
|
Reference in New Issue
Block a user