Re: Guidance on INSERT RETURNING order

Поиск
Список
Период
Сортировка
От Federico
Тема Re: Guidance on INSERT RETURNING order
Дата
Msg-id CAN19dydJ9rC4aNx1KENpF3Zne9gYAtA=z3BhV8bdnbOJs45DRg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Guidance on INSERT RETURNING order  (Rob Sargent <robjsargent@gmail.com>)
Список pgsql-general
On Tue, 11 Apr 2023 at 23:46, Rob Sargent <robjsargent@gmail.com> wrote:
>
>
> >> Can your client retain a hashmap of md5,data pairings, allowing the
> >> lookup on the way back using the returned data and supplied id?
> >>
> > When using unique columns or similar, that's something that is done,
> > but if there are no unique columns in the value no match can be done
> > reliably with the source data, since sqlalchemy is a library that
> > allows arbitrary schemas to be generated.
> >
> > Thanks for the reply,
> >    Federico
> So you're returned data is not what was sent to the server? Otherwise it
> should generate the same md5, as I understand it. Identical data would
> of course be a problem.
>

That should be the case, yes.
If a table has a non-nullable unique key, it should be possible to use
a hashmap and perform that lockup. We are planning on implementing
something like this to cover the cases where it can be used.

Thanks for the reply,
  Federico



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

Предыдущее
От: Federico
Дата:
Сообщение: Re: Guidance on INSERT RETURNING order
Следующее
От: Thorsten Glaser
Дата:
Сообщение: Re: Guidance on INSERT RETURNING order