Skip to content

Commit 0a05920

Browse files
doc: Fix INSERT statement syntax for identity columns
The INSERT statements in the examples were erroneously using VALUE instead of VALUES. Backpatch to v17 where the examples were added through a37bb7c. Reported-by: shixiong327926@gmail.com Discussion: https://postgr.es/m/172958472112.696.6075270400394560263@wrigleys.postgresql.org Backpatch-through: 17
1 parent f92f6b3 commit 0a05920

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/src/sgml/ddl.sgml

+3-3
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ CREATE TABLE people (
271271
example, with the above definitions and assuming additional appropriate
272272
columns, writing
273273
<programlisting>
274-
INSERT INTO people (name, address) VALUE ('A', 'foo');
275-
INSERT INTO people (name, address) VALUE ('B', 'bar');
274+
INSERT INTO people (name, address) VALUES ('A', 'foo');
275+
INSERT INTO people (name, address) VALUES ('B', 'bar');
276276
</programlisting>
277277
would generate values for the <literal>id</literal> column starting at 1
278278
and result in the following table data:
@@ -285,7 +285,7 @@ INSERT INTO people (name, address) VALUE ('B', 'bar');
285285
Alternatively, the keyword <literal>DEFAULT</literal> can be specified in
286286
place of a value to explicitly request the sequence-generated value, like
287287
<programlisting>
288-
INSERT INTO people (id, name, address) VALUE (<emphasis>DEFAULT</emphasis>, 'C', 'baz');
288+
INSERT INTO people (id, name, address) VALUES (<emphasis>DEFAULT</emphasis>, 'C', 'baz');
289289
</programlisting>
290290
Similarly, the keyword <literal>DEFAULT</literal> can be used in
291291
<command>UPDATE</command> commands.

0 commit comments

Comments
 (0)