pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Volkan YAZICI <yazicivo@ttnet.net.tr>
To: Andrew Sullivan <ajs@crankycanuck.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: record datatype comparisons
Date: Tue, 31 Oct 2006 23:45:00 +0200
Message-ID: <20061031214500.GC1911@alamut> (raw)
In-Reply-To: <20061031212253.GD20809@phlogiston.dyndns.org>
References: <55c095e90610311135l101f6a91s433e6d7e5b90cb7c@mail.gmail.com>
<8C5B026B51B6854CBE88121DBF097A8655CBDD@ehost010-33.exch010.intermedia.net>
<20061031212253.GD20809@phlogiston.dyndns.org>
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.
view thread (10+ messages) latest in thread
Message-ID: <20061031214500.GC1911@alamut> Permalink: ../20061031214500.GC1911@alamut/ Also on: postgresql.org/message-id/20061031214500.GC1911@alamut ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-sql@postgresql.org Cc: yazicivo@ttnet.net.tr, ajs@crankycanuck.ca Subject: Re: record datatype comparisons In-Reply-To: <20061031214500.GC1911@alamut> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox