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 1pmLMr-00028f-NB for pgsql-general@arkaria.postgresql.org; Tue, 11 Apr 2023 21:17:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pmLMq-0005RU-JJ for pgsql-general@arkaria.postgresql.org; Tue, 11 Apr 2023 21:17:32 +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 1pmLMq-0005RL-8m for pgsql-general@lists.postgresql.org; Tue, 11 Apr 2023 21:17:32 +0000 Received: from evolvis.org ([2a02:a00:2000:f::1]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pmLMn-002JCO-PK for pgsql-general@lists.postgresql.org; Tue, 11 Apr 2023 21:17:31 +0000 Received: from x61w.mirbsd.org (2001-4dd7-f42e-0-21f-3bff-fe0d-cbb1.ipv6dyn.netcologne.de [IPv6:2001:4dd7:f42e:0:21f:3bff:fe0d:cbb1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by evolvis.org (Postfix) with ESMTPSA id D232C10017D for ; Tue, 11 Apr 2023 21:17:28 +0000 (UTC) Received: by x61w.mirbsd.org (Postfix, from userid 1000) id AFA04613D2; Tue, 11 Apr 2023 23:17:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by x61w.mirbsd.org (Postfix) with ESMTP id AAC3D602E4 for ; Tue, 11 Apr 2023 23:17:27 +0200 (CEST) Date: Tue, 11 Apr 2023 23:17:27 +0200 (CEST) From: Thorsten Glaser To: pgsql-general@lists.postgresql.org Subject: Re: Guidance on INSERT RETURNING order In-Reply-To: Message-ID: <3b1117cc-fe46-1ca0-d0f-92304c6fc79@evolvis.org> References: <95fbd8c8-2f7a-38a1-4a41-b2ac3763d89c@aklaver.com> Content-Language: de-DE-1901 MIME-Version: 1.0 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 Tue, 11 Apr 2023, Federico wrote: >Of course sorting the returned ids is only viable when using a serial Yes, which is why I pointed out it doesn=E2=80=99t have to be. >or identity column, that's why in the general case I've mentioned the >insert with sentinel column But it was pointed out that that=E2=80=99s not guaranteed either, unless yo= u add that sentinel column to the table itself=E2=80=A6 bye, //mirabilos --=20 15:41=E2=8E=9C Somebody write a testsuite for hello= world :-)