record datatype comparisons
От | George Pavlov |
---|---|
Тема | record datatype comparisons |
Дата | |
Msg-id | 8C5B026B51B6854CBE88121DBF097A8655CBDD@ehost010-33.exch010.intermedia.net обсуждение исходный текст |
Ответ на | Round Numeric Type ("Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com>) |
Ответы |
Re: record datatype comparisons
|
Список | pgsql-sql |
I am trying to do some record comparisons using IS DISTINCT FROM and I feel like I am missing something. Basically comparisons between manually constructed records work as expected, but if I have a record returned by a select on one (or both sides) of the comparison I get errors "ERROR: operator does not exist: record = record". I suspect some simple missing parentheses/syntax issue but I feel like I have tried everything... The simplest way to reproduce: select ((1::int,'a'::varchar) is distinct from (2::int,'a'::varchar)); --> true, as expected select ((1::int,'a'::varchar) is distinct from (select (2::int,'a'::varchar))); --> throws the error Both (1::int,'a'::varchar) and (select (2::int,'a'::varchar)) are of type record, aren't they? In real life I want the right side of the IS DISTINCT FROM to be the result of a query to a table. Please help. Thanks! George
В списке pgsql-sql по дате отправления: