Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit17b4aa7

Browse files
doc: Fix INSERT statement syntax for identity columns
The INSERT statements in the examples were erroneously usingVALUE instead of VALUES. Backpatch to v17 where the exampleswere added througha37bb7c.Reported-by: shixiong327926@gmail.comDiscussion:https://postgr.es/m/172958472112.696.6075270400394560263@wrigleys.postgresql.orgBackpatch-through: 17
1 parent55e6d71 commit17b4aa7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎doc/src/sgml/ddl.sgml

Lines changed: 3 additions & 3 deletions
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)

[8]ページ先頭

©2009-2025 Movatter.jp