]> git.ipfire.org Git - thirdparty/postgresql.git/commit
doc: Document IF NOT EXISTS option for ALTER FOREIGN TABLE ADD COLUMN.
authorFujii Masao <fujii@postgresql.org>
Mon, 9 Mar 2026 09:24:41 +0000 (18:24 +0900)
committerFujii Masao <fujii@postgresql.org>
Mon, 9 Mar 2026 09:25:05 +0000 (18:25 +0900)
commitc3fa8399415f404275767bd0c737c883e2cf5334
treeedca88cccc4242ce0b1578d4268509de03d1da25
parent2543b9ea92fe49c0e4ba1d5adfdc1178c977f371
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 <masao.fujii@gmail.com>
Author: Chao Li <lic@highgo.com>
Reviewed-by: Robert Treat <rob@xzilla.net>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwFk=rrhrwGwPtQxBesbT4DzSZ86Q3ftcwCu3AR5bOiXLw@mail.gmail.com
Backpatch-through: 14
doc/src/sgml/ref/alter_foreign_table.sgml
src/test/regress/expected/foreign_data.out
src/test/regress/sql/foreign_data.sql