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 1vvYHl-007VzO-1U for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Feb 2026 10:07:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vvYHj-00BgLY-0I for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Feb 2026 10:07:55 +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.96) (envelope-from ) id 1vvYHi-00BgLO-1e for pgsql-hackers@lists.postgresql.org; Thu, 26 Feb 2026 10:07:54 +0000 Received: from udcm-wwu2.uni-muenster.de ([128.176.118.28]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vvYHd-00000001H8f-3XVO for pgsql-hackers@lists.postgresql.org; Thu, 26 Feb 2026 10:07:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uni-muenster.de; i=@uni-muenster.de; q=dns/txt; s=uniout; t=1772100471; x=1803636471; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=5aYt6Ry34so96k1WkEZYHEFRDetW5siaIbALdhfR3mQ=; b=S7/QRbSZcj2y72mDaLFf7Y+xzGvZzj5eeydQonE0kScjPz7JSER8y6n2 Ea8ISwZdW5xYtkXn+xd69fctQ+LlnihLHOR9crfR8RI12tuZekKPQY7oO FbAa/HcelOwXJXs+KUF4eQMOiVUxaTw7/S/0iTPHGx1ZWqhkJkeuNoUyy M3vImVxD0yW7+cuR3Mb9+XakSU/fVjE3EhtEQVnuZ4/vQy/9sBDLb86tI LdjeC+Zrf0M5JDxi7rqaAhQS3Cm4iQK9Od1Z8DYvg43f0N1mQaLLl9ObB YOaTxTxuIIquhLQmGXOjIwf+fjtB4Jb91UiyhEeP9kXXuOF3B2Tk9GPAF w==; X-CSE-ConnectionGUID: 7pbAKwj3S32qOFAPuo6UVA== X-CSE-MsgGUID: QBZ7b/dRTHOifcFZYOVpDA== X-IronPort-AV: E=Sophos;i="6.21,312,1763420400"; d="scan'208";a="386057730" Received: from secmail.uni-muenster.de ([128.176.118.4]) by UDCM-RELAY2.UNI-MUENSTER.DE with ESMTP; 26 Feb 2026 11:07:36 +0100 Received: from [192.168.178.27] (dynamic-093-133-131-100.93.133.pool.telefonica.de [93.133.131.100]) by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTPSA id 06E9020ADF02; Thu, 26 Feb 2026 11:07:34 +0100 (CET) Message-ID: <3ecadefa-f63a-48a6-b732-b3e79814933b@uni-muenster.de> Date: Thu, 26 Feb 2026 11:07:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: COMMENTS are not being copied in CREATE TABLE LIKE To: =?UTF-8?Q?H=C3=BCseyin_Demir?= Cc: pgsql-hackers@lists.postgresql.org References: <5888209c-44b5-438a-abd3-7d07990b3a4c@uni-muenster.de> <177174751973.626.7673368092428390674.pgcf@coridan.postgresql.org> Content-Language: de-DE, en-GB From: Jim Jones In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 26/02/2026 08:46, Hüseyin Demir wrote: > Yes, because changing the behavior will lead to misinterpretations while > creating tables and tables derived from template ones will be presented > differently with respect to comments they have. But isn't that the case to any feature that we add to CREATE TABLE LIKE? For instance, if we add INCLUDING TRIGGERS, it will inevitably change the behaviour of INCLUDING ALL. > Such changes can cause unexpected different objects inside a database. > For example, any existing script using INCLUDING COMMENTS or INCLUDING > ALL will now copy the table comment where it didn't before.  That's true, the newly created table would then get a comment it didn't have before. I just fail to see how this would create an unexpected different object. Of course, if this script relies on the table not having a comment to work, it could case some problems. > If we need this behavioral change my idea is to introduce a new sub- > option or keep table comments excluded unless explicitly opted in. > Because after changing the current behavior there is no way to implement > old behavior.  The user can always use EXCLUDING COMMENTS for that CREATE TABLE t2 ( LIKE t1 INCLUDING ALL EXCLUDING COMMENTS ); Thanks, Hüseyin! Best, Jim