Re: Re: [PATCH] Enforce that INSERT...RETURNING preserves the order of multi rows

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Re: [PATCH] Enforce that INSERT...RETURNING preserves the order of multi rows
Дата
Msg-id 5084382C.3020607@dunslane.net
обсуждение исходный текст
Ответ на Re: Re: [PATCH] Enforce that INSERT...RETURNING preserves the order of multi rows  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Re: [PATCH] Enforce that INSERT...RETURNING preserves the order of multi rows
Список pgsql-hackers
On 10/21/2012 01:39 PM, Tom Lane wrote:
> I'm not exactly following what that proves?  It seems like this is still
> making a not-guaranteed assumption, which is that the outer INSERT isn't
> going to choose to rearrange the order of the rows coming from the CTE.
> Strictly speaking, even "SELECT * FROM ordered_inserts" isn't promising
> anything about row order.


Hmm. If we do
    INSERT INTO foo    SELECT ... ORDER BY

is that not guaranteed to insert in the desired order? We used to 
suggest that in the old CLUSTER docs. (I realize that's not what I 
suggested, but it seems relevant nevertheless.)


cheers

andrew




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: [PATCH] Enforce that INSERT...RETURNING preserves the order of multi rows
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [PATCH] Enforce that INSERT...RETURNING preserves the order of multi rows