From: | "George Pavlov" <gpavlov(at)mynewplace(dot)com> |
---|---|
To: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | record datatype comparisons |
Date: | 2006-10-31 20:38:36 |
Message-ID: | 8C5B026B51B6854CBE88121DBF097A8655CBDD@ehost010-33.exch010.intermedia.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Aaron Bono | 2006-10-31 20:43:31 | Re: Table Relationships |
Previous Message | A. Kretschmer | 2006-10-31 20:13:44 | Re: Table Relationships |