public inbox for [email protected]  
help / color / mirror / Atom feed
CREATE TABLE LIKE(INCLUDING COMMENTS) description ignored STATISTICS
3+ messages / 2 participants
[nested] [flat]

* CREATE TABLE LIKE(INCLUDING COMMENTS) description ignored STATISTICS
@ 2025-09-07 03:02 jian he <[email protected]>
  2025-09-07 05:03 ` Re: CREATE TABLE LIKE(INCLUDING COMMENTS) description ignored STATISTICS David G. Johnston <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: jian he @ 2025-09-07 03:02 UTC (permalink / raw)
  To: [email protected]

hi.

https://www.postgresql.org/docs/devel/sql-createtable.html#SQL-CREATETABLE-PARMS-LIKE-OPT-COMMENTS
"""
INCLUDING COMMENTS
Comments for the copied columns, constraints, and indexes will be copied. The
default behavior is to exclude comments, resulting in the copied columns and
constraints in the new table having no comments.
"""

The above description should mention that comments on extended
statistics will be
copied as well?





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: CREATE TABLE LIKE(INCLUDING COMMENTS) description ignored STATISTICS
  2025-09-07 03:02 CREATE TABLE LIKE(INCLUDING COMMENTS) description ignored STATISTICS jian he <[email protected]>
@ 2025-09-07 05:03 ` David G. Johnston <[email protected]>
  2025-09-18 09:03   ` Re: CREATE TABLE LIKE(INCLUDING COMMENTS) description ignored STATISTICS jian he <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: David G. Johnston @ 2025-09-07 05:03 UTC (permalink / raw)
  To: jian he <[email protected]>; +Cc: [email protected] <[email protected]>

On Saturday, September 6, 2025, jian he <[email protected]> wrote:

> hi.
>
> https://www.postgresql.org/docs/devel/sql-createtable.
> html#SQL-CREATETABLE-PARMS-LIKE-OPT-COMMENTS
> """
> INCLUDING COMMENTS
> Comments for the copied columns, constraints, and indexes will be copied.
> The
> default behavior is to exclude comments, resulting in the copied columns
> and
> constraints in the new table having no comments.
> """
>
> The above description should mention that comments on extended
> statistics will be
> copied as well?
>
>
How about “If specified, existing comments on any copied elements are
copied as well.” ?  Let’s fix this by removing the duplication of the list
of things allowed to be copied, not by fixing the oversight the duplication
permitted.

David J.


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: CREATE TABLE LIKE(INCLUDING COMMENTS) description ignored STATISTICS
  2025-09-07 03:02 CREATE TABLE LIKE(INCLUDING COMMENTS) description ignored STATISTICS jian he <[email protected]>
  2025-09-07 05:03 ` Re: CREATE TABLE LIKE(INCLUDING COMMENTS) description ignored STATISTICS David G. Johnston <[email protected]>
@ 2025-09-18 09:03   ` jian he <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: jian he @ 2025-09-18 09:03 UTC (permalink / raw)
  To: David G. Johnston <[email protected]>; +Cc: [email protected] <[email protected]>

On Sun, Sep 7, 2025 at 1:03 PM David G. Johnston
<[email protected]> wrote:
>
> On Saturday, September 6, 2025, jian he <[email protected]> wrote:
>>
>> hi.
>>
>> https://www.postgresql.org/docs/devel/sql-createtable.html#SQL-CREATETABLE-PARMS-LIKE-OPT-COMMENTS
>> """
>> INCLUDING COMMENTS
>> Comments for the copied columns, constraints, and indexes will be copied. The
>> default behavior is to exclude comments, resulting in the copied columns and
>> constraints in the new table having no comments.
>> """
>>
>> The above description should mention that comments on extended
>> statistics will be
>> copied as well?
>>
>
> How about “If specified, existing comments on any copied elements are copied as well.” ?  Let’s fix this by removing the duplication of the list of things allowed to be copied, not by fixing the oversight the duplication permitted.
>

“If specified, existing comments on any copied elements are copied as well.”
some properties/elements don't have comments.

currently doc:
-------------------------------------------------
The optional like_option clauses specify which additional properties
of the original table to copy. Specifying INCLUDING copies the
property, specifying EXCLUDING omits the property. EXCLUDING is the
default. If multiple specifications are made for the same kind of
object, the last one is used. The available options are:

INCLUDING COMMENTS
Comments for the copied columns, constraints, and indexes will be
copied. The default behavior is to exclude comments, resulting in the
copied columns and constraints in the new table having no comments.

------------------------------------------------------------------------
The second sentence is redundant, because we already mentioned:
"EXCLUDING is the default".
So I am ok with:
"Comments for the copied columns, constraints, extended statistics and
 indexes will be copied".
the second sentence "The default behavior is to exclude comments...."
can be removed.

I also found that
https://www.postgresql.org/docs/devel/sql-createforeigntable.html
has the same problem.






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-09-18 09:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-09-07 03:02 CREATE TABLE LIKE(INCLUDING COMMENTS) description ignored STATISTICS jian he <[email protected]>
2025-09-07 05:03 ` David G. Johnston <[email protected]>
2025-09-18 09:03   ` jian he <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox