Re: COMMENTS are not being copied in CREATE TABLE LIKE - Mailing list pgsql-hackers

From Carlos Alves
Subject Re: COMMENTS are not being copied in CREATE TABLE LIKE
Date
Msg-id CAL-Pge6dUj7gEdd74aPjvxmPkgjMXMF2kp3hDh75eQCPmsBeZQ@mail.gmail.com
Whole thread Raw
In response to Re: COMMENTS are not being copied in CREATE TABLE LIKE  (Jim Jones <jim.jones@uni-muenster.de>)
Responses Re: COMMENTS are not being copied in CREATE TABLE LIKE
List pgsql-hackers

Em qua., 25 de mar. de 2026 às 06:23, Jim Jones <jim.jones@uni-muenster.de> escreveu:
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




Hi Jim!

I saw the second paragraph that you wrote and the explanations are perfect!

My suggestion was instead of describing it in two paragraphs, try describing the parameter in just one (and the text I sent was just a suggestion).

But your document is perfect for me! It was just to simplify, as in the description of the other parameters.

Sincerely, Carlos

pgsql-hackers by date:

Previous
From: Viktor Holmberg
Date:
Subject: Re: [PATCH] no table rewrite when set column type to constrained domain
Next
From: Andres Freund
Date:
Subject: Re: Lowering the default wal_blocksize to 4K