diff options
author | Daniel Gustafsson | 2024-10-23 12:58:17 +0000 |
---|---|---|
committer | Daniel Gustafsson | 2024-10-23 12:58:17 +0000 |
commit | 17b4aa77c3a161a9d0e7b08bd9931fe9fd051540 (patch) | |
tree | c3481b7a72f23dcb88ce26b9c7bae1f07e26c468 /doc/src | |
parent | 55e6d712aff83587c2e06899a794c52fbfb415f6 (diff) |
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 a37bb7c1399.
Reported-by: [email protected]
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 17
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ddl.sgml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 8ab0ddb112f..f6344b3b79a 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -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. |