Re: Insert Documentation - Returning Clause and Order

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема Re: Insert Documentation - Returning Clause and Order
Дата
Msg-id CAExHW5tAZPT9hZ0neepAroSY71wGsTL+2OamKTp0M8RMZ4u=zA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Insert Documentation - Returning Clause and Order  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Insert Documentation - Returning Clause and Order  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
On Thu, Dec 10, 2020 at 7:49 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Thursday, December 10, 2020, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> wrote:
>>
>> On Wed, Dec 9, 2020 at 9:10 PM David G. Johnston
>> <david.g.johnston@gmail.com> wrote:
>> >
>> > Hey,
>> >
>> > Would it be accurate to add the following sentence to the INSERT documentation under "Outputs"?
>> >
>> > "...inserted or updated by the command."  For a multiple-values insertion, the order of output rows will match the
orderthat rows are presented in the values or query clause. 
>>
>> Postgres's current implementation may be doing so, but I don't think
>> that can be guaranteed in possible implementations. I don't think
>> restricting choice of implementation to guarantee that is a good idea
>> either.
>>
>
> Yeah, the ongoing work on parallel inserts would seem to be an issue.  We should probably document that though.  And
maybeas part of parallel inserts patch provide a user-specifiable way to ask for such a guarantee if needed.  ‘Insert
returningordered” 

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?

--
Best Wishes,
Ashutosh Bapat



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

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: PoC/WIP: Extended statistics on expressions
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Feature Proposal: Add ssltermination parameter for SNI-based LoadBalancing