Re: Insert Documentation - Returning Clause and Order - Mailing list pgsql-hackers

From James Coleman
Subject Re: Insert Documentation - Returning Clause and Order
Date
Msg-id CAAaqYe9-1_SNBvK1Kq+q0xe9eJFSAvXeO4TjY09DkDUpZyVCLg@mail.gmail.com
Whole thread Raw
In response to Re: Insert Documentation - Returning Clause and Order  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
On Sat, Dec 12, 2020 at 10:11 AM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Sat, Dec 12, 2020 at 7:02 AM James Coleman <jtc331@gmail.com> wrote:
>>
>>
>> Certainly almost every ORM, and maybe even other forms of application
>> code, need to be able to associate the serial column value returned
>> with what it inserted.
>
>
> Yet most ORM would perform single inserts at a time, not in bulk, making such a feature irrelevant to them.

I think that's a pretty hasty generalization. It's the majority of use
cases in an ORM, sure, but plenty of ORMs (and libraries or
applications using them) support inserting batches where performance
requires it. Rails/ActiveRecord is actually integrating that feature
into core (though many Ruby libraries already add that support, as
does, for example, the application I spend the majority of time
working on).

James



pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: pglz compression performance, take two
Next
From: Gilles Darold
Date:
Subject: Re: MultiXact\SLRU buffers configuration