pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: doc: Document IF NOT EXISTS option for ALTER FOREIGN TABLE ADD C
Date: Mon, 09 Mar 2026 09:27:16 +0000
Message-ID: <E1vzWtQ-0037lY-0G@gemulon.postgresql.org> (raw)

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d0f4b6350d843c6ad7ebf84fbca06e595b780ad3

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(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1vzWtQ-0037lY-0G@gemulon.postgresql.org>
Permalink:  ../E1vzWtQ-0037lY-0G@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vzWtQ-0037lY-0G@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: doc: Document IF NOT EXISTS option for ALTER FOREIGN TABLE ADD C
  In-Reply-To: <E1vzWtQ-0037lY-0G@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox