Re: Guidance on INSERT RETURNING order

From: John Howroyd <jdhowroyd(at)googlemail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Guidance on INSERT RETURNING order
Date: 2023-04-14 21:44:19
Message-ID: CAAGaYByEYCj5vKpi2SqunLmr+fw3Y_83qnpnjXOVAOwxXzMbtQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

A patch for what? All my testing gives me the same output order as the
declaration order. Does anyone have an example where this is not the case?

The problem is that SQLAlchemy is an ORM and they need to be sure to match
records from the insert to the relevant code side objects. This needs to
be efficient as the majority of the python world will use this ORM for
their database needs. There is no PostgreSQL documentation upon which to
give this assertion.

So what is really needed is for PostgreSQL to commit to this behaviour, or
give guidance on how this might be achieved.

On Fri, 14 Apr 2023 at 19:50, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
wrote:

> On Fri, Apr 14, 2023 at 11:42 AM John Howroyd <jdhowroyd(at)googlemail(dot)com>
> wrote:
>
>> @PostgreSQL: Might I ask if this is still being actively considered or
>> should we repost to another mailing list (perhaps pgsql-hackers or any
>> other you might suggest)?
>>
>
> This is the right place for such a discussion. Unless you think you've
> come up with a design that you want to propose and that, if accepted, you
> would then write up a patch for. For that you'd probably want to move the
> discussion to -hackers with an outline of the patch you plan to write.
>
> David J.
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2023-04-14 22:14:12 Re: Guidance on INSERT RETURNING order
Previous Message Federico 2023-04-14 19:46:37 Re: Guidance on INSERT RETURNING order