On Fri, 20 Oct 2006, Tom Lane wrote:

> Jeremy Drake <[EMAIL PROTECTED]> writes:
> > select rowval from myrowtypetable ORDER BY ROW((rowval).*) USING <;
> > ERROR:  operator does not exist: record < record
> This isn't required by the spec, and it's not implemented.  I don't
> see that it'd give any new functionality anyway, since you can always
> do ORDER BY rowval.f1, rowval.f2, ...
> The cases that are implemented are comparisons of explicit row
> constructors, eg "(a,b,c) < (d,e,f)" --- which I think is all
> you'll find support for in the spec.

I just think it is quite unexpected that the operator < is defined in some
places and not in others.  And the way I wrote the order by, it should
have been comparing explicit row constructors (compare the explicitly
constructed row for each rowval in order to sort).  I don't understand how
the operator < in a where clause would be different than the operator <
used by the order by.  If I were to make a custom type in C, and write
these same operators for it, they would work in both places, right?  Why
then would this be any different?

If someone had told me I would be Pope one day, I would have studied
                -- Pope John Paul I

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?


Reply via email to