doc: Clarify that COLUMN is optional in ALTER TABLE ... ADD/DROP COLUMN. In ALTER TABLE ... ADD/DROP COLUMN, the COLUMN keyword is optional. However, part of the documentation could be read as if COLUMN were required, which may mislead users about the command syntax.
This commit updates the ALTER TABLE documentation to clearly state that COLUMN is optional for ADD and DROP. Also this commit adds regression tests covering ALTER TABLE ... ADD/DROP without the COLUMN keyword. Backpatch to all supported versions. Author: Chao Li <[email protected]> Reviewed-by: Robert Treat <[email protected]> Reviewed-by: Fujii Masao <[email protected]> Discussion: https://postgr.es/m/caeowx2n6shlmonjotf63tjjggbgitvt5omssofmbjgb6xue...@mail.gmail.com Backpatch-through: 14 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/9b0e5bd5320f95cfb35f0402c0f4bb7a1d3ecb0f Modified Files -------------- doc/src/sgml/ref/alter_table.sgml | 4 ++-- src/test/regress/expected/alter_table.out | 10 ++++++++++ src/test/regress/sql/alter_table.sql | 8 ++++++++ 3 files changed, 20 insertions(+), 2 deletions(-)
