Re: [PATCH] Enforce that INSERT...RETURNING preserves the order of multi rows
От | Pavel Stehule |
---|---|
Тема | Re: [PATCH] Enforce that INSERT...RETURNING preserves the order of multi rows |
Дата | |
Msg-id | CAFj8pRByaktu7+a52EVZ89AxfkS4hCzgYfeMXoQj3Y-zSBBKUQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Enforce that INSERT...RETURNING preserves the order of multi rows (Albert Cervera i Areny <albert@nan-tic.com>) |
Список | pgsql-hackers |
2012/10/21 Albert Cervera i Areny <albert@nan-tic.com>: > A Dimecres, 17 d'octubre de 2012 19:13:47, Merlin Moncure va escriure: > >> On Wed, Oct 17, 2012 at 9:29 AM, Peter Geoghegan <peter@2ndquadrant.com> >> wrote: > >> > On 17 October 2012 14:53, Merlin Moncure <mmoncure@gmail.com> wrote: > >> >> Is that defined in the standard? > >> > > >> > RETURNING isn't even defined in the standard. > >> > >> Right: Point being, assumptions based on implementation ordering are > >> generally to be avoided unless they are explicitly defined in the > >> standard or elsewhere. > > > > I don't see how one could use RETURNING if result is not ensured to be in > the same order as the tuples supplied. What's the use of RETURNING supplying > data in random order? you don't need a ORDER, you need data - and if you need a order, then you can use CTE and ORDER BY clause. Proposed feature can be too limited in future - when some better partitioning can be used or when paralel query processing will be supported Pavel > > > -- > > Albert Cervera i Areny > > http://www.NaN-tic.com > > Tel: +34 93 553 18 03 > > > > http://twitter.com/albertnan > > http://www.nan-tic.com/blog > >
В списке pgsql-hackers по дате отправления: