Re: problem using twice custom comparision operator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marek Florianczyk <franki(at)adm(dot)tp(dot)pl>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: problem using twice custom comparision operator
Date: 2009-01-23 22:40:52
Message-ID: 23403.1232750452@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Marek Florianczyk <franki(at)adm(dot)tp(dot)pl> writes:
> Hi all,
> I wanted to make custom operator to sort data like this:
> 1,2,10,1a,1b,10a

It might work better if you were more careful to ensure that the
operator were a valid sort operator, ie

! a<a not reflexive
a < b => ! b < a not commutative
a < b & b < c => a < c transitive

It fairly obviously fails the first of these, and I don't have too much
confidence in the others.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Steve Midgley 2009-01-25 18:41:30 Re: problem using twice custom comparision operator
Previous Message Marek Florianczyk 2009-01-23 20:42:44 problem using twice custom comparision operator