Hi, Commit 302cf157592 added support for LIKE in CREATE FOREIGN TABLE. In this feature, since indexes are not created for foreign tables, comments on indexes are not copied either.
However, the CREATE FOREIGN TABLE docs incorrectly states that index comments are copied when using INCLUDING COMMENTS, as shown below: ------------------------------ INCLUDING COMMENTS Comments for the copied columns, constraints, and indexes will be copied. ------------------------------ This isn't accurate for foreign tables, so we should remove the mention of indexes. Patch attached. Regards, -- Fujii Masao NTT DATA Japan Corporation
From e6a023b56f790c9995463d75e6101e5eaf49e98b Mon Sep 17 00:00:00 2001 From: Fujii Masao <fu...@postgresql.org> Date: Wed, 18 Jun 2025 13:56:14 +0900 Subject: [PATCH v1] doc: Fix incorrect description of INCLUDING COMMENTS in CREATE FOREIGN TABLE. Commit 302cf157592 added support for LIKE in CREATE FOREIGN TABLE. In this feature, since indexes are not created for foreign tables, comments on indexes are not copied either. However, the documentation incorrectly stated that index comments would be copied when using INCLUDING COMMENTS. This commit corrects that by removing the mention of index comments. --- doc/src/sgml/ref/create_foreign_table.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/ref/create_foreign_table.sgml b/doc/src/sgml/ref/create_foreign_table.sgml index d08834ac9d2..009fa46532b 100644 --- a/doc/src/sgml/ref/create_foreign_table.sgml +++ b/doc/src/sgml/ref/create_foreign_table.sgml @@ -232,7 +232,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM <term><literal>INCLUDING COMMENTS</literal></term> <listitem> <para> - Comments for the copied columns, constraints, and indexes will be + Comments for the copied columns and constraints will be copied. The default behavior is to exclude comments, resulting in the copied columns and constraints in the new table having no comments. -- 2.49.0