AlterFdwStmt AlterForeignServerStmt AlterGroupStmt
AlterObjectDependsStmt AlterObjectSchemaStmt AlterOwnerStmt
AlterOperatorStmt AlterTypeStmt AlterSeqStmt AlterSystemStmt AlterTableStmt
- AlterTblSpcStmt AlterExtensionStmt AlterExtensionContentsStmt AlterForeignTableStmt
+ AlterTblSpcStmt AlterExtensionStmt AlterExtensionContentsStmt
AlterCompositeTypeStmt AlterUserMappingStmt
AlterRoleStmt AlterRoleSetStmt AlterPolicyStmt AlterStatsStmt
AlterDefaultPrivilegesStmt DefACLAction
| AlterExtensionContentsStmt
| AlterFdwStmt
| AlterForeignServerStmt
- | AlterForeignTableStmt
| AlterFunctionStmt
| AlterGroupStmt
| AlterObjectDependsStmt
/*****************************************************************************
*
- * ALTER [ TABLE | INDEX | SEQUENCE | VIEW | MATERIALIZED VIEW ] variations
+ * ALTER [ TABLE | INDEX | SEQUENCE | VIEW | MATERIALIZED VIEW | FOREIGN TABLE ] variations
*
- * Note: we accept all subcommands for each of the five variants, and sort
+ * Note: we accept all subcommands for each of the variants, and sort
* out what's really legal at execution time.
*****************************************************************************/
n->nowait = $14;
$$ = (Node *)n;
}
+ | ALTER FOREIGN TABLE relation_expr alter_table_cmds
+ {
+ AlterTableStmt *n = makeNode(AlterTableStmt);
+ n->relation = $4;
+ n->cmds = $5;
+ n->relkind = OBJECT_FOREIGN_TABLE;
+ n->missing_ok = false;
+ $$ = (Node *)n;
+ }
+ | ALTER FOREIGN TABLE IF_P EXISTS relation_expr alter_table_cmds
+ {
+ AlterTableStmt *n = makeNode(AlterTableStmt);
+ n->relation = $6;
+ n->cmds = $7;
+ n->relkind = OBJECT_FOREIGN_TABLE;
+ n->missing_ok = true;
+ $$ = (Node *)n;
+ }
;
alter_table_cmds:
}
;
-/*****************************************************************************
- *
- * QUERY:
- * ALTER FOREIGN TABLE relname [...]
- *
- *****************************************************************************/
-
-AlterForeignTableStmt:
- ALTER FOREIGN TABLE relation_expr alter_table_cmds
- {
- AlterTableStmt *n = makeNode(AlterTableStmt);
- n->relation = $4;
- n->cmds = $5;
- n->relkind = OBJECT_FOREIGN_TABLE;
- n->missing_ok = false;
- $$ = (Node *)n;
- }
- | ALTER FOREIGN TABLE IF_P EXISTS relation_expr alter_table_cmds
- {
- AlterTableStmt *n = makeNode(AlterTableStmt);
- n->relation = $6;
- n->cmds = $7;
- n->relkind = OBJECT_FOREIGN_TABLE;
- n->missing_ok = true;
- $$ = (Node *)n;
- }
- ;
-
/*****************************************************************************
*
* QUERY: