| From: | "Matheus Alcantara" <matheusssilv97(at)gmail(dot)com> |
|---|---|
| To: | "Jim Jones" <jim(dot)jones(at)uni-muenster(dot)de>, "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: COMMENTS are not being copied in CREATE TABLE LIKE |
| Date: | 2026-02-12 16:25:07 |
| Message-ID: | DGD4G22LA094.N14CLBAAJ8C4@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu Feb 12, 2026 at 12:33 PM -03, Jim Jones wrote:
>
>
> On 12/02/2026 16:08, Fujii Masao wrote:
>> On Thu, Feb 12, 2026 at 11:36 PM Matheus Alcantara
>> <matheusssilv97(at)gmail(dot)com> wrote:
>>> The patch fix the issue and it seems correct to me.
>
> Thanks for the review!
>
>> The documentation [1] states that INCLUDING COMMENTS copies comments for
>> the copied columns, constraints, and indexes. It does not mention copying
>> comments on the table itself. Therefore, not copying table comments with
>> INCLUDING COMMENTS does not appear to be a bug. That is, the proposed patch
>> seems more like an improvement than a bug fix.
>
> Hmm, it seemed so obvious to me that I didn’t look more closely at the
> documentation :)
>
Yeah, me too. I even checked if column comments was being created, but I
still assume that table comments should also be copied.
> Although I struggle to see the rationale for not
> copying a table’s comment in a CREATE TABLE LIKE ... INCLUDING COMMENTS
> statement, I have to agree that the documentation is quite clear about
> this limitation, and therefore it cannot really be considered a bug.
> That said, it may well be worth considering for a future release.
>
> What are your thoughts?
>
+1 for having this as a feature on a future release.
--
Matheus Alcantara
EDB: https://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Jones | 2026-02-12 16:40:16 | Re: Add CREATE SCHEMA ... LIKE support |
| Previous Message | Tom Lane | 2026-02-12 16:17:37 | Our ABI diff infrastructure ignores enum SysCacheIdentifier |