Re: Guidance on INSERT RETURNING order

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Guidance on INSERT RETURNING order
Дата
Msg-id CAKFQuwaHDiCV0BRf+1jWqV3QVP=vek7ptAK53YTRk+Vh0-tNMA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Guidance on INSERT RETURNING order  (John Howroyd <jdhowroyd@googlemail.com>)
Список pgsql-general
On Fri, Apr 14, 2023 at 2:44 PM John Howroyd <jdhowroyd@googlemail.com> wrote:
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.


We aren't committing to it though.  It will require newly introduced syntax that tells the system to behave in the manner so desired.  It makes sense to attach such syntax to the RETURNING clause itself.  Whether someone can achieve that in a manner that the project is willing to commit remains to be seen.

In short, lots of people complain about PostgreSQL's lack of this feature.  None of them are stepping up to fill in the gap and there isn't enough interest, for many reasons, for the people being complained to to go ahead and design and implement it themselves.

David J.

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

Предыдущее
От: John Howroyd
Дата:
Сообщение: Re: Guidance on INSERT RETURNING order
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Guidance on INSERT RETURNING order