Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phbGP-0007fq-MU for pgsql-general@arkaria.postgresql.org; Wed, 29 Mar 2023 19:15:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1phbGO-0005SN-MO for pgsql-general@arkaria.postgresql.org; Wed, 29 Mar 2023 19:15:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phbGN-0005S7-IU for pgsql-general@lists.postgresql.org; Wed, 29 Mar 2023 19:15:16 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phbGK-0007j6-Fo for pgsql-general@lists.postgresql.org; Wed, 29 Mar 2023 19:15:15 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id E3BFA5C00DA for ; Wed, 29 Mar 2023 15:15:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 29 Mar 2023 15:15:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= 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:sender:subject:subject:to:to; s=fm1; t= 1680117310; x=1680203710; bh=j9+YzgVgngP++YU7DDeYOnIsdtGKORJd7eV 6astiPnw=; b=NrQsAsQro3HM7rIleDyoqKrcSzFt9xPmlhjG8EOGQ6bKAZmBBS6 WHSGLpjdEjlttzRvnkP6vG6yWPoauD0qECG6IE9+LKi/c+ZaHdxM8zKtuw+7H6vb iqv1O805Ym0ykXWh4KR3I2PKPQ+cWxLXKd2hmJ35EXbJkpuNjpEmhK5mbRvIkEzg U3jYFJSzXGmmkJTadw/pi8KT01sQDTxKuUuGGfsJvpbhZwY054CrtEgsicfLjcks V5p3j8HUMMIM2MKLwoJjhfjNhBBHsFZf3Z0tWblUxpP86ftrYxPmTPL5SmqaIR1D +theyQxpN03OLSeDRWbPg3d6z+fzSqC3Mag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1680117310; x= 1680203710; bh=j9+YzgVgngP++YU7DDeYOnIsdtGKORJd7eV6astiPnw=; b=c 1xYrpNc5aegksnbIiLepN8Hk/0SfATAQvHpR5bOMOmQ9OBeSVpM6n+A4WS37DmaH rZy/MEsrZkk6BvU1+ln7Sy+VO5eauJ9rCjjFScr81RHz2s1yUsGAyUrcj/njWc9J kZjGy18LtVIq+hAs8cX2qbVYw/S/J2hZ02fIbMWRHezgKzGV2P8IDsquMuizrtyF LiajEGHMjk3GTFBNNfMtAZyWqCUzi2wxeXHnvfXrXSCGanuoC/AH6TGFHvIzH+/P laHRCl+UkFoG/+fRSxFBDWfYtRILzHSpb9BvomhCbGpS2TEJbqCkPTV9g5pzmlNI 46Uil+vFjWu1gP65KkFIg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehiedgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesth ejredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeevvdekie fhudfhhfdtkeelgeffudeigfetjeegfffghfetfeelledugfelleegveenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrg hvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 29 Mar 2023 15:15:10 -0400 (EDT) Message-ID: <8708606d-e6f2-07f5-b374-465224de9c66@aklaver.com> Date: Wed, 29 Mar 2023 12:15:09 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: Using CTID system column as a "temporary" primary key To: pgsql-general@lists.postgresql.org References: <20230329164337.7px2drewpfrjyjqw@hjp.at> Content-Language: en-US From: Adrian Klaver In-Reply-To: <20230329164337.7px2drewpfrjyjqw@hjp.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/29/23 09:43, Peter J. Holzer wrote: > On 2023-03-29 07:59:54 -0700, Adrian Klaver wrote: >> On 3/29/23 07:19, Sebastien Flaesch wrote: >>> INSERT statements must not use the serial column, so you have to list >>> all columns of the table and provide only the values of the non-serial >>> columns. With Informix you could just specific a zero to get a new >>> generated serial, but seems this has never been considered with >>> PostgreSQL. >> >> Yes it has: > [...] >> insert into seq_test values(default, 'test'); > > Default is not the same as zero. It accomplishes the same thing, a place holder value can be used to fire the sequence without column qualifying the insert/update. Furthermore it works over all columns. So I would say it has been considered by Postgres as a way to 'to get a new generated serial'. > > hp > -- Adrian Klaver adrian.klaver@aklaver.com