Re: Insert Documentation - Returning Clause and Order

From: James Coleman <jtc331(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Insert Documentation - Returning Clause and Order
Date: 2020-12-13 01:14:42
Message-ID: CAAaqYe9-1_SNBvK1Kq+q0xe9eJFSAvXeO4TjY09DkDUpZyVCLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 12, 2020 at 10:11 AM David G. Johnston
<david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
> On Sat, Dec 12, 2020 at 7:02 AM James Coleman <jtc331(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gilles Darold 2020-12-13 09:17:51 Re: MultiXact\SLRU buffers configuration
Previous Message Justin Pryzby 2020-12-12 20:20:17 Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly