diff --git a/doc/src/sgml/ref/alter_foreign_table.sgml b/doc/src/sgml/ref/alter_foreign_table.sgml
index c2ebdac..af7d5fa 100644
*** a/doc/src/sgml/ref/alter_foreign_table.sgml
--- b/doc/src/sgml/ref/alter_foreign_table.sgml
*************** ALTER FOREIGN TABLE action is one of:
! ADD [ COLUMN ] column type
DROP [ COLUMN ] [ IF EXISTS ] column [ RESTRICT | CASCADE ]
ALTER [ COLUMN ] column [ SET DATA ] TYPE type
ALTER [ COLUMN ] column { SET | DROP } NOT NULL
--- 32,38 ----
where action is one of:
! ADD [ COLUMN ] column type [ NULL | NOT NULL ]
DROP [ COLUMN ] [ IF EXISTS ] column [ RESTRICT | CASCADE ]
ALTER [ COLUMN ] column [ SET DATA ] TYPE type
ALTER [ COLUMN ] column { SET | DROP } NOT NULL
*************** ALTER FOREIGN TABLE option ['value'] [, ... ] )
! Change options for the foreign table or the column of the foreign table.
ADD>, SET>, and DROP>
specify the action to be performed. ADD> is assumed
if no operation is explicitly specified. Option names must be
--- 125,131 ----
OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )
! Change options for the foreign table.
ADD>, SET>, and DROP>
specify the action to be performed. ADD> is assumed
if no operation is explicitly specified. Option names must be
*************** ALTER FOREIGN TABLE
! Consistency with the foreign server is not checked when a column is
! added or removed with ADD COLUMN or
! DROP COLUMN, a system oid> column is added
! or removed, a CHECK> or NOT NULL> constraint is
added, or column type is changed with SET DATA TYPE>. It is the
user's responsibility to ensure that the table definition matches the
remote side.
--- 258,266 ----
! Consistency with the foreign server is not checked when a column is added
! or removed with ADD COLUMN or
! DROP COLUMN, NOT NULL> constraint is
added, or column type is changed with SET DATA TYPE>. It is the
user's responsibility to ensure that the table definition matches the
remote side.
diff --git a/doc/src/sgml/ref/create_foreign_table.sgml b/doc/src/sgml/ref/create_foreign_table.sgml
index ad91072..50d8628 100644
*** a/doc/src/sgml/ref/create_foreign_table.sgml
--- b/doc/src/sgml/ref/create_foreign_table.sgml
*************** CREATE FOREIGN TABLE [ IF NOT EXISTS ] <
*** 94,100 ****
The data type of the column. This can include array
! specifiers. For more information on the data types supported by
PostgreSQL, refer to .
--- 94,106 ----
The data type of the column. This can include array
! specifiers.
! Unlike an ordinary table, default values cannot be used on a foreign
! tables. Serial and bigserial implicitly set default value on the column,
! therefore they cannot be used on a foreign table.
!
!
! For more information on the data types supported by
PostgreSQL, refer to .
*************** CREATE FOREIGN TABLE [ IF NOT EXISTS ] <
*** 107,112 ****
--- 113,130 ----
The column is not allowed to contain null values.
+
+ Note that defining NOT NULL> constraint on a column doesn't
+ guarantee that the data on the foreign side don't include any null value.
+ This means that query results might include null values even if the
+ column was defined as NOT NULL>. To ensure the integrity of
+ query result, FDW needs to throw an error when invalid data was returned
+ from the foreign server.
+
+
+ At present, NOT NULL> constraint is used only for query plan
+ optimization.
+