pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Federico <cfederico87@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: John Howroyd <jdhowroyd@googlemail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Guidance on INSERT RETURNING order
Date: Sat, 15 Apr 2023 09:40:44 -0400
Message-ID: <1678721.1681566044@sss.pgh.pa.us> (raw)
In-Reply-To: <CAN19dyfYSEMUt+f_TCJ-aQ1+_RNYVbnpQyRD9wwzYfFTWwDORQ@mail.gmail.com>
References: <CAN19dycS0oUorLOGgjxMX8NZq-hOA1RJrzwC4L3FxpMf4BQbBQ@mail.gmail.com>
	<95fbd8c8-2f7a-38a1-4a41-b2ac3763d89c@aklaver.com>
	<CAN19dyed0o5eCUYSEq30q39SpFmeZ7WSEHBfR042YYTVoipHcg@mail.gmail.com>
	<6644419d-50e1-97c9-5507-b6915bec96fa@gmail.com>
	<CAN19dydktTMU8hQ+2-PkaPf6PV6HFOvDwODD0cchNxVuVXSvKg@mail.gmail.com>
	<961adda9-4eb1-79f6-ee8f-9440a520ac15@gmail.com>
	<20230414164036.labzn5sbqzye7jvg@hjp.at>
	<CAAGaYBz3D6DWRmE_vaLxGBdCpTODw8GrKj=u=Ex3py0fwjf5vw@mail.gmail.com>
	<CAKFQuwa0f58-GHOko8bjSQePtq-H-yL4afL2+m687KoE5Mex_Q@mail.gmail.com>
	<CAN19dye=rfDRL=40QDko=yPggE0rotesr2sg1LSih-1c7v0fZQ@mail.gmail.com>
	<1608813.1681528629@sss.pgh.pa.us>
	<CAN19dyfYSEMUt+f_TCJ-aQ1+_RNYVbnpQyRD9wwzYfFTWwDORQ@mail.gmail.com>

Federico <cfederico87@gmail.com> writes:
> I think the tuple order would not be connected to the values, but be
> determined by the input order of the rows in the insert. So when using
> INSERT ... SELECT the tuple_order value would be determined by the
> output of the select, using the same logic as ROW_NUMBER.

We already rejected the idea that INSERT must preserve the order of
the incoming tuples.  Please don't re-propose it with different
wording.

			regards, tom lane





view thread (56+ messages)  latest in thread

Message-ID: <1678721.1681566044@sss.pgh.pa.us>
Permalink:  ../1678721.1681566044@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1678721.1681566044@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, cfederico87@gmail.com, david.g.johnston@gmail.com, jdhowroyd@googlemail.com
  Subject: Re: Guidance on INSERT RETURNING order
  In-Reply-To: <1678721.1681566044@sss.pgh.pa.us>
  References: <CAN19dycS0oUorLOGgjxMX8NZq-hOA1RJrzwC4L3FxpMf4BQbBQ@mail.gmail.com> <95fbd8c8-2f7a-38a1-4a41-b2ac3763d89c@aklaver.com> <CAN19dyed0o5eCUYSEq30q39SpFmeZ7WSEHBfR042YYTVoipHcg@mail.gmail.com> <6644419d-50e1-97c9-5507-b6915bec96fa@gmail.com> <CAN19dydktTMU8hQ+2-PkaPf6PV6HFOvDwODD0cchNxVuVXSvKg@mail.gmail.com> <961adda9-4eb1-79f6-ee8f-9440a520ac15@gmail.com> <20230414164036.labzn5sbqzye7jvg@hjp.at> <CAAGaYBz3D6DWRmE_vaLxGBdCpTODw8GrKj=u=Ex3py0fwjf5vw@mail.gmail.com> <CAKFQuwa0f58-GHOko8bjSQePtq-H-yL4afL2+m687KoE5Mex_Q@mail.gmail.com> <CAN19dye=rfDRL=40QDko=yPggE0rotesr2sg1LSih-1c7v0fZQ@mail.gmail.com> <1608813.1681528629@sss.pgh.pa.us> <CAN19dyfYSEMUt+f_TCJ-aQ1+_RNYVbnpQyRD9wwzYfFTWwDORQ@mail.gmail.com> <1678721.1681566044@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox