(record = record) inconsistent with record_eq(arg1, arg2)
От | David G. Johnston |
---|---|
Тема | (record = record) inconsistent with record_eq(arg1, arg2) |
Дата | |
Msg-id | CAKFQuwYEw-f6RSP0xzUNNMus=OcyGX-6GSOPorb3YtRPPEiyxg@mail.gmail.com обсуждение исходный текст |
Ответ на | (record = record) inconsistent with record_eq(arg1, arg2) (jian he <jian.universality@gmail.com>) |
Ответы |
Re: (record = record) inconsistent with record_eq(arg1, arg2)
|
Список | pgsql-bugs |
On Monday, July 31, 2023, jian he <jian.universality@gmail.com> wrote:
hi.not sure if it's a bug or I misunderstood.select row(1,null::int) = (1,1::int); -- return nullselect record_eq(row(1,null::int),(1,1::int)); --return false.
This isn’t a bug though I can’t point to the exact code where the difference manifests.
The SQL standard mandates the query behavior of the equals operator while internal indexing and hash details require that the equality function not return null.
Calling record_eq directly in SQL is unsupported so the claim that the second query is buggy is incorrect altogether. We don’t promise any particular result to the user in that situation, and could indeed remove the function and the query could produce an error and we’d be technically bug-free.
David J.
В списке pgsql-bugs по дате отправления: