CREATE FOREIGN TABLE [ IF NOT EXISTS ] $table_name$ ( [
    { $column_name$ $data_type$ [ OPTIONS ( { $option$ '$value$' } [ , ... ] ) ] [ COLLATE $collation$ ] [ $column_constraint$ [ ... ] ]
    | $table_constraint$ }
    [ , ... ]
    ] )
    [ INHERITS ( $parent_table$ [ , ... ] ) ]
    SERVER $server_name$
    [ OPTIONS ( { $option$ '$value$' } [ , ... ] ) ]

CREATE FOREIGN TABLE [ IF NOT EXISTS ] $table_name$
    PARTITION OF $parent_table$ [ (
    { $column_name$ [ WITH OPTIONS ] [ $column_constraint$ [ ... ] ]
    | $table_constraint$ }
    [ , ... ]
    ) ]
    { FOR VALUES $partition_bound_spec$ | DEFAULT }
    SERVER $server_name$
    [ OPTIONS ( { $option$ '$value$' } [ , ... ] ) ]

where $column_constraint$ is:

[ CONSTRAINT $constraint_name$ ]
    { NOT NULL |
    NULL |
    CHECK ( $expression$ ) [ NO INHERIT ] |
    DEFAULT $default_expr$ |
    GENERATED ALWAYS AS ( $generation_expr$ ) STORED }

where $table_constraint$ is:

[ CONSTRAINT $constraint_name$ ] CHECK ( $expression$ ) [ NO INHERIT ]

where $partition_bound_spec$ is:

IN ( $partition_bound_expr$ [ , ... ] ) |
    FROM ( { $partition_bound_expr$ | MINVALUE | MAXVALUE } [ , ... ] )
    TO ( { $partition_bound_expr$ | MINVALUE | MAXVALUE } [ , ... ] ) |
    WITH ( MODULUS $numeric_literal$, REMAINDER $numeric_literal$ )
