Re: Coercing compound types to use generic ROW comparison operators

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Randall Lucas <rlucas(at)tercent(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Coercing compound types to use generic ROW comparison operators
Date: 2007-10-11 22:11:14
Message-ID: 12212.1192140674@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Randall Lucas <rlucas(at)tercent(dot)com> writes:
> Still, this would fail in a nested situation because it wouldn't
> recurse (if col1 of the compound type were another compound type,
> ferinstance), as would your suggestion above. It might be worthwhile
> to allow choosing to use the default ROW comparison operator at
> composite type creation (which would provide a more elegant solution to
> nested situations).

You are incorrectly supposing that there *is* such an animal as a
default row comparison operator --- actually, ROW() = ROW() is expanded
at parse time into field-by-field comparisons. This is usually a good
thing since it gives the planner more flexibility.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Carlos H. Reimer 2007-10-11 22:29:33 RES: RES: 8.2.4 selects make applications wait indefinitely
Previous Message Randall Lucas 2007-10-11 21:59:27 Re: Coercing compound types to use generic ROW comparison operators