public inbox for [email protected]
help / color / mirror / Atom feedFrom: Fujii Masao <[email protected]>
To: Jim Jones <[email protected]>
Cc: Matheus Alcantara <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: COMMENTS are not being copied in CREATE TABLE LIKE
Date: Fri, 13 Feb 2026 13:13:25 +0900
Message-ID: <CAHGQGwEbgCOpdaCRn81XiHbvGZ9Somiww0BE5ULE8_cf4CYA4Q@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<CAHGQGwF-uuKkon8Ah9dbMiGKoYmFJyHZnDa_HcWWCXKnh7LJ2Q@mail.gmail.com>
<[email protected]>
On Fri, Feb 13, 2026 at 12:34 AM Jim Jones <[email protected]> wrote:
>
>
>
> On 12/02/2026 16:08, Fujii Masao wrote:
> > On Thu, Feb 12, 2026 at 11:36 PM Matheus Alcantara
> > <[email protected]> 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 :) 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?
At first, I felt it would be more intuitive to copy the table comment as well.
However, on second thought, since LIKE can reference multiple tables,
copying table-level properties such as comments may not be well-defined.
For example, if two source tables each have a table comment and both are
specified in LIKE, which comment should be applied to the new table?
Regards,
--
Fujii Masao
view thread (18+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: COMMENTS are not being copied in CREATE TABLE LIKE
In-Reply-To: <CAHGQGwEbgCOpdaCRn81XiHbvGZ9Somiww0BE5ULE8_cf4CYA4Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox