Re: Guidance on INSERT RETURNING order - Mailing list pgsql-general

From John Howroyd
Subject Re: Guidance on INSERT RETURNING order
Date
Msg-id CAAGaYByEYCj5vKpi2SqunLmr+fw3Y_83qnpnjXOVAOwxXzMbtQ@mail.gmail.com
Whole thread Raw
In response to Re: Guidance on INSERT RETURNING order  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Guidance on INSERT RETURNING order
Re: Guidance on INSERT RETURNING order
List 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.g.johnston@gmail.com> wrote:
On Fri, Apr 14, 2023 at 11:42 AM John Howroyd <jdhowroyd@googlemail.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.

pgsql-general by date:

Previous
From: Federico
Date:
Subject: Re: Guidance on INSERT RETURNING order
Next
From: "David G. Johnston"
Date:
Subject: Re: Guidance on INSERT RETURNING order