diff options
| author | Robert Haas <rhaas@postgresql.org> | 2011-04-20 21:35:15 -0400 |
|---|---|---|
| committer | Robert Haas <rhaas@postgresql.org> | 2011-04-20 21:38:47 -0400 |
| commit | 68739ba856c52e6721d6cffec21f1bf0327a9a7b (patch) | |
| tree | f0982dcba2eb0414a732582e29ae03995636a6fb /src/include | |
| parent | 520bcd9c9bb4d06627054e1c567bac1feb2da879 (diff) | |
Allow ALTER TABLE name {OF type | NOT OF}.
This syntax allows a standalone table to be made into a typed table,
or a typed table to be made standalone. This is possibly a mildly
useful feature in its own right, but the real motivation for this
change is that we need it to make pg_upgrade work with typed tables.
This doesn't actually fix that problem, but it's necessary
infrastructure.
Noah Misch
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/commands/tablecmds.h | 2 | ||||
| -rw-r--r-- | src/include/nodes/parsenodes.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/include/commands/tablecmds.h b/src/include/commands/tablecmds.h index d4383525db4..3f971eb218f 100644 --- a/src/include/commands/tablecmds.h +++ b/src/include/commands/tablecmds.h @@ -56,6 +56,8 @@ extern void find_composite_type_dependencies(Oid typeOid, Relation origRelation, const char *origTypeName); +extern void check_of_type(HeapTuple typetuple); + extern AttrNumber *varattnos_map(TupleDesc olddesc, TupleDesc newdesc); extern AttrNumber *varattnos_map_schema(TupleDesc old, List *schema); extern void change_varattnos_of_a_node(Node *node, const AttrNumber *newattno); diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index c6337cfb879..24b4f723339 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -1219,6 +1219,8 @@ typedef enum AlterTableType AT_DisableRule, /* DISABLE RULE name */ AT_AddInherit, /* INHERIT parent */ AT_DropInherit, /* NO INHERIT parent */ + AT_AddOf, /* OF <type_name> */ + AT_DropOf, /* NOT OF */ AT_GenericOptions, /* OPTIONS (...) */ } AlterTableType; |
