Re: row-wise comparison question/issue

Поиск
Список
Период
Сортировка
От Jeremy Drake
Тема Re: row-wise comparison question/issue
Дата
Msg-id Pine.BSO.4.64.0610201528380.9810@resin.csoft.net
обсуждение исходный текст
Ответ на Re: row-wise comparison question/issue  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: row-wise comparison question/issue  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 20 Oct 2006, Tom Lane wrote:

> Jeremy Drake <pgsql@jdrake.com> 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
harder.    -- Pope John Paul I


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Beta, RC Time?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Beta, RC Time?