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.96) (envelope-from ) id 1vqi0F-00GKBo-2v for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Feb 2026 01:29:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vqi0E-00BxA9-37 for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Feb 2026 01:29:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vqi0E-00BxA1-29 for pgsql-hackers@lists.postgresql.org; Fri, 13 Feb 2026 01:29:51 +0000 Received: from mail-dy1-x1330.google.com ([2607:f8b0:4864:20::1330]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vqi0B-00000000PPC-0VXq for pgsql-hackers@lists.postgresql.org; Fri, 13 Feb 2026 01:29:50 +0000 Received: by mail-dy1-x1330.google.com with SMTP id 5a478bee46e88-2ba9c484e5eso474371eec.1 for ; Thu, 12 Feb 2026 17:29:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770946185; x=1771550985; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZwYAaPLeOeM80m0jgMzhHkLsls7oyKCat8/QLZMkGvU=; b=IJkytImHVCBWLBotoJ5DMqOss4tSKlZodTvqfjqTOxN2Gnxgcbyop0FmS0iIrmhvel 63AJGC0TfSAc56YXejVPMwTy3LssrMm7ZawBt29qrjZ5i0p1JHXRyoyuKngtyTQ4+0tc CjTPAt2xC25vjDcH6fKXffSFc+yq29Nw9IAZ1epPgdKyaENFqp4PdDSm8YoPXWkZgFgP BeFQYSGUVLvgVzc0UQEW7xAl16oiEUTawpvikfGQKZwh4oA1Z1QElqp4WxNdSu3SY5/P cUb3YmDFlUV9CuPi0ZnjWKeUBjRXT4qWM/0CTrcRldw38AAMCDy/6oD6nsCzCcst3uHn ve/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770946185; x=1771550985; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZwYAaPLeOeM80m0jgMzhHkLsls7oyKCat8/QLZMkGvU=; b=k4UkO21bdOCnA44prJZnhsPdg0QFqZ1K/0y4x0TuhtACsvtr+T/e1th2gkFd+92IYw QTgeT/Lk43ouCr+0AOLmyrLBW4cMezb1D6w/oXN3VsXI0ETnHgZQhAWZgtg2+4MkNy2U 7suLdHglHf0GIbg1v1W0ZoA7W4twA8lCdRtp0fi5raxeeuUaOFDQOVcWYwfv5CK/4Kyn W4XfqHq4PtEyCh/S1f5nTayDogbsD6NOudpi95+dcdiJlqvF9mIIV0LONMgj2O9aeN0U /JqU1BhYi3qEx+EUvq5q/bOv1OjE+2yJOo3hSI+qQ4GCnalGhNXQFMp9Ndnu6LkQlH5E UR5A== X-Forwarded-Encrypted: i=1; AJvYcCVRXW2Oy44aOYbAGFc5bsuJNCZ+ZKoZPwGRs/dQ12hqtcRndC9IrwgQpinlKRn8pzqKcgyayo5GzT7jAmBy@lists.postgresql.org X-Gm-Message-State: AOJu0Yxuw2IBBD/61unU32OesUoAhLufVREpOfMcBsCnTqjBnLNAb+F2 +nC+fX4AjKaAFoslERt/SgXsfVbp3vAD69q8x+29ARPi+xdJTeiJP5PA X-Gm-Gg: AZuq6aIcpdNvmrGdlltMl2WQveJP3404uLVLfY04FXfAFiSBRL+d+mU3Ics3ePAcJO7 uxzoljcvgZv7q2XOzFtRlgsTIaohTN1VrO+GWndWrPzz/1qImVn5TGwF7BVw++sY1vXIsrsqApj isfOvl8c6u7z0l19iwGdOpxYuiQkhIeRM1VFBfnwrS/PATHZmIcjoJLTShg1KTRNW9C8B6CGVdo zvC4jLA2qJyf3ZuPZ5xStbIl9S9q8/ZYZsoDp/uOuU1uFGJm0UZ70FWFPPVTLsvBKNVijAlVE46 MuPp7DPemHMQtreurbfEh0M59wL1Dou9dxOu0CCMM9FX2T8mEIyPTTRpLq8mySlPuc6cPgevEom e0pthShvOiJNUaZTfSVlTr/JJCVJzrH5J8AqOM0OA3ViWYPGVFzECRaWNDxI482KTKH/Ccq5yXw ++dpRdp5g1Zb/OxWx+5JlPxvZFWxuJmk8D X-Received: by 2002:a05:7301:1287:b0:2b7:1abc:a6eb with SMTP id 5a478bee46e88-2babc3b64a7mr100874eec.7.1770946184415; Thu, 12 Feb 2026 17:29:44 -0800 (PST) Received: from smtpclient.apple ([142.171.105.12]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ba9dbe127dsm4433451eec.11.2026.02.12.17.29.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2026 17:29:43 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.300.41.1.7\)) Subject: Re: COMMENTS are not being copied in CREATE TABLE LIKE From: Chao Li In-Reply-To: <50f693ad-faec-4b1b-8de5-88dc90b236b4@uni-muenster.de> Date: Fri, 13 Feb 2026 09:29:08 +0800 Cc: Fujii Masao , Matheus Alcantara , "pgsql-hackers@lists.postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <50f693ad-faec-4b1b-8de5-88dc90b236b4@uni-muenster.de> To: Jim Jones X-Mailer: Apple Mail (2.3864.300.41.1.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Feb 12, 2026, at 23:33, Jim Jones = wrote: >=20 >=20 >=20 > On 12/02/2026 16:08, Fujii Masao wrote: >> On Thu, Feb 12, 2026 at 11:36=E2=80=AFPM Matheus Alcantara >> wrote: >>> The patch fix the issue and it seems correct to me. >=20 > Thanks for the review! >=20 >> 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. >=20 > Hmm, it seemed so obvious to me that I didn=E2=80=99t look more = closely at the > documentation :) Although I struggle to see the rationale for not > copying a table=E2=80=99s 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. >=20 > What are your thoughts? >=20 > Thanks! >=20 > Best, Jim >=20 >=20 I feel the current behavior is proper. When you create a table using = LIKE, you are cloning the structure, not the identity. Just as you have = to pick a new name for the table, you should provide a new comment that = fits its specific purpose. If a comment is needed, the COMMENT ON = command is already the straightforward way to handle that. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/