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 1vGd8j-002dKB-3R for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Nov 2025 13:01:28 +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 1vGd8h-002ZAk-Sx for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Nov 2025 13:01:26 +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.94.2) (envelope-from ) id 1vGd8g-002ZAc-TS for pgsql-bugs@lists.postgresql.org; Wed, 05 Nov 2025 13:01:26 +0000 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vGd8c-0067cA-39 for pgsql-bugs@lists.postgresql.org; Wed, 05 Nov 2025 13:01:25 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id CA4857A0186; Wed, 5 Nov 2025 08:01:19 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Wed, 05 Nov 2025 08:01:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1762347679; x=1762434079; bh=Nf4SeG4AfHK/4HZFvse5Z3eYVcfhTspt w+S5x5J/mpY=; b=Dv3WG/tGEdw7B/xfdaRupvEH93z/0W8WUJd3GWDCnu/o5EMK 9+far897XyxM5emLI3Yj9RvFGsPoVzk14xduaz1ew5mdgkXTMmNGOCunAW9a8s3g WsK1q2Q3+iUJvB9KSc7/0Ut2paryaTYX8UNJmHVvv7whT6iqVc2NGh6x5PxHGTHf 42edE0w64fyCpFRu/TV+bBj5QSv2wbnZ17hiVMgzKUysaL2Mu216Hzu77UY/avGN Q/CIplonhqrsoRd/lQT5gHzz9z1kiOFHRsqyTgPG3hK+RQTL+H05P1nzXIjegPyd 4MZ8Y2iBS+nqiIOt+hpltMW/pdX+APP0JPkD1Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1762347679; x= 1762434079; bh=Nf4SeG4AfHK/4HZFvse5Z3eYVcfhTsptw+S5x5J/mpY=; b=k DThStazEcM00k75/QKro8b79bX8w7kTFmK7HSKMFA2A4PtLW8bjLlp3rcSP42chn /i5HBiXkspm97jfu1jZN1HUeU225KPuvGTbXP1vTbe+xKWdt+852h+YOwuk8NmHY YqQNh+LwxkvUn4osYYE3JFWVfugmhr80g9W9jc4DAZWKA6uZ8nmG88X1dZMdablK 4oHHYhEIeAOmgvyLuZGMfOh6aJiq0RAM/Tvrq8smscZELbwVuff/i1qZXPO4wLC6 3J12KQynAtS6MIW1wJ32SPRa5GBoYUKcMud1+yJDBcDHFuZ0ag5sow101ivVx/Gq ECKyz75j8jF83fOEqjIPg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddukeefleejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgheqne cuggftrfgrthhtvghrnhepjefhveehtdetgfffhffhfeefgffghffflefgieeuueekhedv hedvfeehffdvfeeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthho peehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehkuhhmrghrvghsrghnrdgsrg hlrghkrhhishhhnhgrnhesihhnthhitghsrdgrihdprhgtphhtthhopehpghhsqhhlqdgs uhhgsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepjhgrnh grsehinhhtihgtshdrrghipdhrtghpthhtohepshhivhgrughhrghsrdgrrhhumhhughgr mhesihhnthhitghsrdgrihdprhgtphhtthhopehinhhtihgtshdruggvvhhophhssehinh htihgtshdrrghi X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Nov 2025 08:01:18 -0500 (EST) Message-ID: Date: Wed, 5 Nov 2025 14:01:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: CREATE TABLE ... LIKE INCLUDING ALL does not create new sequences for serial columns To: Kumaresan Balakrishnan , "pgsql-bugs@lists.postgresql.org" Cc: Janarthanan Poornavel , Sivadhas arumugam , Intics Devops References: Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 03.11.25 18:10, Kumaresan Balakrishnan wrote: > This behavior occurs even with `INCLUDING ALL`, which implies `INCLUDING > DEFAULTS` > and `INCLUDING IDENTITY`.  However, it seems that when serial columns > are used, > their associated sequences are copied by reference rather than duplicated. This works correctly if you use GENERATED ALWAYS AS IDENTITY instead of serial. Using serial is kind of deprecated for reasons like this.