Re: Guidance on INSERT RETURNING order

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: Guidance on INSERT RETURNING order
Дата
Msg-id 20230414164036.labzn5sbqzye7jvg@hjp.at
обсуждение исходный текст
Ответ на Re: Guidance on INSERT RETURNING order  (Rob Sargent <robjsargent@gmail.com>)
Ответы Re: Guidance on INSERT RETURNING order  (John Howroyd <jdhowroyd@googlemail.com>)
Список pgsql-general
On 2023-04-11 15:45:59 -0600, Rob Sargent 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.

> So you're returned data is not what was sent to the server? Otherwise it
> should generate the same md5, as I understand it.

That's not necessarily the case. There are quite a few data types where
the input value is truncated, rounded or otherwise normalized. So I
don't think you can generally expect to read back exactly the same value
you inserted.

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Вложения

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

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: JSON / ASP.NET AJAX Dates support in PostgreSQL
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: JSON / ASP.NET AJAX Dates support in PostgreSQL