diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml
index bd3aa6f438f..d3bb16c191a 100644
--- a/doc/src/sgml/ref/insert.sgml
+++ b/doc/src/sgml/ref/insert.sgml
@@ -1,5 +1,5 @@
@@ -22,9 +22,9 @@ PostgreSQL documentation
INSERT INTO table [ ( column [, ...] ) ]
- { DEFAULT VALUES | VALUES ( expression [, ...] ) | SELECT query }
+ { DEFAULT VALUES | VALUES ( { expression | DEFAULT } [, ...] ) | SELECT query }
-
+
Inputs
@@ -71,6 +71,16 @@ INSERT INTO table [ (
+
+ DEFAULT
+
+
+ This column will be filled in by the column DEFAULT clause, or NULL if
+ a default is not available.
+
+
+
+
query
@@ -83,7 +93,7 @@ INSERT INTO table [ (
-
+
Outputs
@@ -133,7 +143,7 @@ INSERT 0 #
- Each column not present in the target list will be inserted
+ Each column not present in the target list will be inserted
using a default value, either a declared DEFAULT value
or NULL. PostgreSQL will reject the new
column if a NULL is inserted into a column declared NOT NULL.
@@ -175,6 +185,18 @@ INSERT INTO films (code, title, did, date_prod, kind)
+
+ In the third example, we use the DEFAULT values for the date columns
+ rather than specifying an entry.
+
+
+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');
+
+
+
Insert a single row into table distributors; note that
only column name is specified, so the omitted
@@ -197,7 +219,7 @@ INSERT INTO films SELECT * FROM tmp;
Insert into arrays (refer to the
PostgreSQL User's Guide for further
information about arrays):
-
+
-- Create an empty 3x3 gameboard for noughts-and-crosses
-- (all of these queries create the same board attribute)
@@ -215,14 +237,14 @@ INSERT INTO tictactoe (game, board)
Compatibility
-
+
SQL92
INSERT is fully compatible with SQL92.
- Possible limitations in features of the
+ Possible limitations in features of the
query
clause are documented for
.