From: | Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr> |
---|---|
To: | Andrew Sullivan <ajs(at)crankycanuck(dot)ca> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: record datatype comparisons |
Date: | 2006-10-31 21:45:00 |
Message-ID: | 20061031214500.GC1911@alamut |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Oct 31 04:22, Andrew Sullivan wrote:
> On Tue, Oct 31, 2006 at 12:38:36PM -0800, George Pavlov wrote:
> > Both (1::int,'a'::varchar) and (select (2::int,'a'::varchar)) are of
> > type record, aren't they?
>
> I don't think so. Psql gives you a hint that not:
>
> testing=# SELECT (1::int, 'a'::varchar);
> row
> -------
> (1,a)
> (1 row)
>
> testing=# SELECT (SELECT(1::int, 'a'::varchar));
> ?column?
> ----------
> (1,a)
> (1 row)
>
> Note the column headers. They're differently shaped. Because
> pseudotype record doesn't have a shape, equality doesn't make sense,
> so you need two shapes that are already identical, so they can use
> the matching rules for that.
Can you be more verbose please? I couldn't understand what you mean with
"shape". AFAIK, both above queries should return same TupleDesc, which I
think means they should share same "shape". I don't have an idea about
the row comparison internals, but I still cannot see a reason for the
difference of returned types. I'd be appreciated if you can clarify the
explanation a little bit.
Regards.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2006-10-31 21:49:27 | Re: record datatype comparisons |
Previous Message | George Pavlov | 2006-10-31 21:33:25 | Re: record datatype comparisons |