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
Showing
- doc/src/sgml/ref/alter_table.sgml 26 additions, 0 deletionsdoc/src/sgml/ref/alter_table.sgml
- src/backend/commands/tablecmds.c 260 additions, 17 deletionssrc/backend/commands/tablecmds.c
- src/backend/parser/gram.y 17 additions, 0 deletionssrc/backend/parser/gram.y
- src/backend/parser/parse_utilcmd.c 1 addition, 21 deletionssrc/backend/parser/parse_utilcmd.c
- src/include/commands/tablecmds.h 2 additions, 0 deletionssrc/include/commands/tablecmds.h
- src/include/nodes/parsenodes.h 2 additions, 0 deletionssrc/include/nodes/parsenodes.h
- src/test/regress/expected/alter_table.out 38 additions, 0 deletionssrc/test/regress/expected/alter_table.out
- src/test/regress/sql/alter_table.sql 30 additions, 0 deletionssrc/test/regress/sql/alter_table.sql
Loading
Please register or sign in to comment