doc: Fix INSERT statement syntax for identity columns
authorDaniel Gustafsson <[email protected]>
Wed, 23 Oct 2024 12:58:17 +0000 (14:58 +0200)
committerDaniel Gustafsson <[email protected]>
Wed, 23 Oct 2024 12:58:17 +0000 (14:58 +0200)
The INSERT statements in the examples were erroneously using
VALUE instead of VALUES. Back to v17 where the examples
were added through a37bb7c1399.

Reported-by: [email protected]
Discussion: https://postgr.es/m/172958472112.696.6075270400394560263@wrigleys.postgresql.org
Back-through: 17

doc/src/sgml/ddl.sgml

index 8ab0ddb112f4762bf1513c8545d670a06f2f7386..f6344b3b79a8fc03640ac1bd16837e883d6c808d 100644 (file)
@@ -271,8 +271,8 @@ CREATE TABLE people (
    example, with the above definitions and assuming additional appropriate
    columns, writing
 <programlisting>
-INSERT INTO people (name, address) VALUE ('A', 'foo');
-INSERT INTO people (name, address) VALUE ('B', 'bar');
+INSERT INTO people (name, address) VALUES ('A', 'foo');
+INSERT INTO people (name, address) VALUES ('B', 'bar');
 </programlisting>
    would generate values for the <literal>id</literal> column starting at 1
    and result in the following table data:
@@ -285,7 +285,7 @@ INSERT INTO people (name, address) VALUE ('B', 'bar');
    Alternatively, the keyword <literal>DEFAULT</literal> can be specified in
    place of a value to explicitly request the sequence-generated value, like
 <programlisting>
-INSERT INTO people (id, name, address) VALUE (<emphasis>DEFAULT</emphasis>, 'C', 'baz');
+INSERT INTO people (id, name, address) VALUES (<emphasis>DEFAULT</emphasis>, 'C', 'baz');
 </programlisting>
    Similarly, the keyword <literal>DEFAULT</literal> can be used in
    <command>UPDATE</command> commands.