doc: Document IF NOT EXISTS option for ALTER FOREIGN TABLE ADD COLUMN.

Commit 2cd40adb85d added the IF NOT EXISTS option to ALTER TABLE ADD COLUMN.
This also enabled IF NOT EXISTS for ALTER FOREIGN TABLE ADD COLUMN,
but the ALTER FOREIGN TABLE documentation was not updated to mention it.

This commit updates the documentation to describe the IF NOT EXISTS option for
ALTER FOREIGN TABLE ADD COLUMN.

While updating that section, also this commit clarifies that the COLUMN keyword
is optional in ALTER FOREIGN TABLE ADD/DROP COLUMN. Previously, part of
the documentation could be read as if COLUMN were required.

This commit adds regression tests covering these ALTER FOREIGN TABLE syntaxes.

Backpatch to all supported versions.

Suggested-by: Fujii Masao <[email protected]>
Author: Chao Li <[email protected]>
Reviewed-by: Robert Treat <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Discussion: 
https://postgr.es/m/CAHGQGwFk=rrhrwgwptqxbesbt4dzsz86q3ftcwcu3ar5boi...@mail.gmail.com
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/94ff80f49d64ed3b2b5fe598732600c9bb1beb71

Modified Files
--------------
doc/src/sgml/ref/alter_foreign_table.sgml  |  8 +++++---
src/test/regress/expected/foreign_data.out | 13 +++++++++++++
src/test/regress/sql/foreign_data.sql      |  7 +++++++
3 files changed, 25 insertions(+), 3 deletions(-)

Reply via email to