Re: Insert Documentation - Returning Clause and Order

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Insert Documentation - Returning Clause and Order
Дата
Msg-id CAKFQuwZc3YPKDBrAnxXo8Ad+21kWf0hXuZNEXtJqXKX1FwkoUw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Insert Documentation - Returning Clause and Order  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Ответы Re: Insert Documentation - Returning Clause and Order  (James Coleman <jtc331@gmail.com>)
Список pgsql-hackers
On Fri, Dec 11, 2020 at 6:24 AM Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> wrote:
On Thu, Dec 10, 2020 at 7:49 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:

> Yeah, the ongoing work on parallel inserts would seem to be an issue.  We should probably document that though.  And maybe as part of parallel inserts patch provide a user-specifiable way to ask for such a guarantee if needed.  ‘Insert returning ordered”

I am curious about the usecase which needs that guarantee? Don't you
have a column on which you can ORDER BY so that it returns the same
order as INSERT?

This comes up periodically in the context of auto-generated keys being returned - specifically on the JDBC project list (maybe elsewhere...).  If one adds 15 VALUES entries to an insert and then sends them in bulk to the server it would be helpful if the generated keys could be matched up one-to-one with the keyless objects in the client.  Basically "pipelining" the client and server.

David J.

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: PoC/WIP: Extended statistics on expressions
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: pg_basebackup caused FailedAssertion