diff --git a/doc/src/sgml/ref/alter_foreign_table.sgml b/doc/src/sgml/ref/alter_foreign_table.sgml
index 3cb6f08fcf..1672f548ef 100644
--- a/doc/src/sgml/ref/alter_foreign_table.sgml
+++ b/doc/src/sgml/ref/alter_foreign_table.sgml
@@ -38,6 +38,11 @@ ALTER FOREIGN TABLE [ IF EXISTS ] namecolumn_name SET DEFAULT expression
ALTER [ COLUMN ] column_name DROP DEFAULT
ALTER [ COLUMN ] column_name { SET | DROP } NOT NULL
+ ALTER [ COLUMN ] column_name SET EXPRESSION AS ( expression )
+ ALTER [ COLUMN ] column_name DROP EXPRESSION [ IF EXISTS ]
+ ALTER [ COLUMN ] column_name ADD GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ]
+ ALTER [ COLUMN ] column_name { SET GENERATED { ALWAYS | BY DEFAULT } | SET sequence_option | RESTART [ [ WITH ] restart ] } [...]
+ ALTER [ COLUMN ] column_name DROP IDENTITY [ IF EXISTS ]
ALTER [ COLUMN ] column_name SET STATISTICS integer
ALTER [ COLUMN ] column_name SET ( attribute_option = value [, ... ] )
ALTER [ COLUMN ] column_name RESET ( attribute_option [, ... ] )
diff --git a/doc/src/sgml/ref/create_foreign_table.sgml b/doc/src/sgml/ref/create_foreign_table.sgml
index dc4b907599..9c6851f47d 100644
--- a/doc/src/sgml/ref/create_foreign_table.sgml
+++ b/doc/src/sgml/ref/create_foreign_table.sgml
@@ -48,6 +48,7 @@ CREATE FOREIGN TABLE [ IF NOT EXISTS ] table_name
CHECK ( expression ) [ NO INHERIT ] |
DEFAULT default_expr |
GENERATED ALWAYS AS ( generation_expr ) STORED }
+ GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ] |
and table_constraint is:
@@ -309,6 +310,52 @@ WITH ( MODULUS numeric_literal, REM
+
+ GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ]
+
+
+ This clause creates the column as an identity
+ column. It will have an implicit sequence attached to it
+ and the column in new rows will automatically have values from the
+ sequence assigned to it. (The computed value will be presented
+ to the foreign-data wrapper for storage and must be returned on
+ reading.)
+ Such a column is implicitly NOT NULL.
+
+
+
+ The clauses ALWAYS and BY DEFAULT
+ determine how explicitly user-specified values are handled in
+ INSERT and UPDATE commands.
+
+
+
+ In an INSERT command, if ALWAYS is
+ selected, a user-specified value is only accepted if the
+ INSERT statement specifies OVERRIDING SYSTEM
+ VALUE. If BY DEFAULT is selected, then the
+ user-specified value takes precedence. See
+ for details. (In the COPY command, user-specified
+ values are always used regardless of this setting.)
+
+
+
+ In an UPDATE command, if ALWAYS is
+ selected, any update of the column to any value other than
+ DEFAULT will be rejected. If BY
+ DEFAULT is selected, the column can be updated normally.
+ (There is no OVERRIDING clause for the
+ UPDATE command.)
+
+
+
+ The optional sequence_options clause can be
+ used to override the options of the sequence.
+ See for details.
+
+
+
+
OPTIONS ( option 'value' [, ...] )