Clarify INCLUDING COMMENTS behavior in CREATE TABLE and CREATE FOREIGN TABLE docs
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: pgsql-docs@lists.postgresql.org
Date: 2026-02-17T14:36:33Z
Lists: pgsql-docs
Attachments
- v1-0001-doc-Clarify-INCLUDING-COMMENTS-behavior-in-CREATE.patch (application/octet-stream) patch v1-0001
Hi, > Comments for the copied columns, constraints, and indexes will be copied. The above current description of INCLUDING COMMENTS in the CREATE TABLE docs appears inaccurate and incomplete. It says that comments on constraints are copied, but in practice only comments on CHECK and NOT NULL constraints are copied; comments on other constraints (such as primary keys) are not. In addition, comments on extended statistics are copied, but this is not documented. The CREATE FOREIGN TABLE docs has a similar omission: comments on extended statistics are also copied, but this is not mentioned. Therefore I'd like to propose the attached patch to clarify the actual behavior of INCLUDING COMMENTS. Thoughts? Regards, -- Fujii Masao
Commits
-
doc: Clarify INCLUDING COMMENTS behavior in CREATE TABLE LIKE.
- ec84a1f16f28 14.23 landed
- e81c61ee4a8e 15.18 landed
- fe99a0338953 16.14 landed
- df927d3d08b1 17.10 landed
- 315b0f3e87ff 18.4 landed
- b2ff2a0b5296 19 (unreleased) landed