Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uzAYT-0005kx-0o for pgsql-docs@arkaria.postgresql.org; Thu, 18 Sep 2025 09:03:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uzAYR-00F1i4-As for pgsql-docs@arkaria.postgresql.org; Thu, 18 Sep 2025 09:03:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uzAYR-00F1hv-1M for pgsql-docs@lists.postgresql.org; Thu, 18 Sep 2025 09:03:51 +0000 Received: from mail-vk1-xa2e.google.com ([2607:f8b0:4864:20::a2e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uzAYO-0013sE-23 for pgsql-docs@lists.postgresql.org; Thu, 18 Sep 2025 09:03:49 +0000 Received: by mail-vk1-xa2e.google.com with SMTP id 71dfb90a1353d-54a2b984822so490490e0c.3 for ; Thu, 18 Sep 2025 02:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758186228; x=1758791028; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TGGYSiw4IyjR93Jm79tQcR3/He5qLo/CVV6p8dslpsk=; b=PMMLvjcEQ7ZxiLkYYI4azeo2Ob7XCXTsiUy1Q99ePcVypZp4cEUii7Y5j40I6wHsLF UUmgoJgxVEQzMnLPrY9idipyfK61lnE4VWGqawvyZ18KNDMwCTJFLEfRIIK3JONG7lQn K2YCftf1Hhjl4oh8tENI1d/O9kFOtz4NFbyABtyX1ZCdw1KwozSVVWF5KpIPXMhcpl6/ ljsS6POzsfQ2XczcyjNk0hcEmtTCeOyHZB3VRDvHTen/z8EdPU8VZFIjrdaxWojUEg9S uIXheDvssuuJpc8FhcAn1KUnPeJfRnkjRnjxjvud3ipnLkWp6iL8+Dun4eiQgNdWxpF1 D1Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758186228; x=1758791028; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TGGYSiw4IyjR93Jm79tQcR3/He5qLo/CVV6p8dslpsk=; b=RSisOrI4rnu0WG4YKO3FFMyp9Z9LtXEwJu/MP2t3bc26xsPUSI3TLVHOrhbAUJ3TRo SJaa9ioEDypNS5Fc3qfPZRu+WVYP0ulamzhjPn3NhtIlVIHt/dEPZclmM1mtWRkY0xLQ GmWDu+ACvVqwA6eKcyVyD63Mk5zX7SZjNk/PXPXaYcl4zQZaby3bpUSefuPAEKLLnbwi qGXc4ZRa7x3318XyXkJOv/B3sPQQ7LZEqQ7rERy/9LwuWdwn0N8Q0TWsXAXcsWbyuwYc RNHHWokUHmfsDoUcPKOe5rpK6iuFf5yCCX9V77LJqZSeXvZvYASN2U10quIZgqM3sJvo W8Yw== X-Gm-Message-State: AOJu0Yya8xnM2UAiR3rJMg9No1uaGBLJyYSSwgFWyGxENM3EbrwYn1ha 23Xkr6a42Q97iQM3IZDodGciFB0buCCD2F1fhj2Xfz9pl1hyVaD/L7IXgajUuGw20cjYUXeOpJ6 nyD/PDrfMWbQIt1CTUOk0A00KGrkjIN8= X-Gm-Gg: ASbGncvTwlxor/QOtfKBTacEDgdPxJ+LnIURvOzAQdOn87AwaN/Vixvd5vIk+fimIme QlL3chzC00yr5hAIqHN6rA+urr1tf806zlLhYPhPc2HNY+I6Rpv93Djm8GpVIBZ9unq0gKtcPo/ 9TzBlMa1iDnNURun5s591EowsoKghcwJIniS2tHwGqAyyUWrYB8Rs51t11HNuc2j47FTF1FmTLN F/I2E6DWqZWV0qCBDijwXmjiVWd5zVXUEmm/km8IraA3yAv51VJ09Tw9g== X-Google-Smtp-Source: AGHT+IFZ58bMCWQhBip2xDAH54u1PgiOFHXPw6v10RnrMEjracHiV67PCR5o//i8XRWz3x5yQ3K74SOGPQeTFGk1cfs= X-Received: by 2002:a05:6122:1d8e:b0:539:44bc:78f1 with SMTP id 71dfb90a1353d-54a60a3a223mr1807217e0c.5.1758186227983; Thu, 18 Sep 2025 02:03:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: jian he Date: Thu, 18 Sep 2025 17:03:10 +0800 X-Gm-Features: AS18NWBqg-hZQqZra3AwmGtlRfwfI9m4X5RlFskB-aIICP4O40Y3yj7hCb8JjNA Message-ID: Subject: Re: CREATE TABLE LIKE(INCLUDING COMMENTS) description ignored STATISTICS To: "David G. Johnston" Cc: "pgsql-docs@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Sep 7, 2025 at 1:03=E2=80=AFPM David G. Johnston wrote: > > On Saturday, September 6, 2025, jian he wro= te: >> >> hi. >> >> https://www.postgresql.org/docs/devel/sql-createtable.html#SQL-CREATETAB= LE-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 =E2=80=9CIf specified, existing comments on any copied elements= are copied as well.=E2=80=9D ? Let=E2=80=99s fix this by removing the dup= lication of the list of things allowed to be copied, not by fixing the over= sight the duplication permitted. > =E2=80=9CIf specified, existing comments on any copied elements are copied = as well.=E2=80=9D 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.