public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jim Jones <[email protected]>
To: Carlos Alves <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Chao Li <[email protected]>
Cc: Fujii Masao <[email protected]>
Cc: Matheus Alcantara <[email protected]>
Cc: [email protected] <[email protected]>
Cc: David G. Johnston <[email protected]>
Subject: Re: COMMENTS are not being copied in CREATE TABLE LIKE
Date: Wed, 25 Mar 2026 10:21:56 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAL-Pge4eWCAu7VcjXhXxFKPwT0jYqG2xG7vRAyZJXcr75voJCA@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<CAHGQGwF-uuKkon8Ah9dbMiGKoYmFJyHZnDa_HcWWCXKnh7LJ2Q@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CAL-Pge4eWCAu7VcjXhXxFKPwT0jYqG2xG7vRAyZJXcr75voJCA@mail.gmail.com>

Hi Carlos

On 24/03/2026 19:32, Carlos Alves wrote:
> Just one point I'd like to address is the documentation. Following the
> idea of the other "includings" options wouldn't it be interesting to
> present a more concise text? As a suggestion, it could be something like:
> 
> "Comments on columns, not null and check constraints, indexes, extended
> statistics and the table itself from a source table will be copied. If
> the command references multiple source tables with including clauses,
> any existing table-level comments will be merged into a single entry,
> separated by newlines in the order they were specified."

In the second paragraph of the INCLUDING COMMENTS docs I wrote:

<para>
  If multiple <literal>LIKE</literal> clauses specify
  <literal>INCLUDING COMMENTS</literal> and the source tables have
  table-level comments, these comments will be concatenated in the new
  table, separated by newlines, in the order that the
  <literal>LIKE</literal> clauses appear.
</para>

Which pretty much states the same? Please let me know if I am missing
your point here.


> I've attached some preliminary tests I performed.

Thanks for the thorough tests. Much appreciated!

Best, Jim







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], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: COMMENTS are not being copied in CREATE TABLE LIKE
  In-Reply-To: <[email protected]>

* 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