Unable to identify an ordering operator - Mailing list pgsql-sql

From Ferruccio Zamuner
Subject Unable to identify an ordering operator
Date
Msg-id 200012311455.eBVEtCt11654@tnt.diff.org
Whole thread Raw
Responses Re: Unable to identify an ordering operator  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Hello,

select persons.name,firm.name,persons.tel      from persons,work,firm       where (persons.table_owner=0) and
 (work.id_firm=firm.id and work.id_person=persons.id)          union  select persons.name,firm.name,persons.tel
from persons,work,firm          where (persons.table_owner=1) and                (work.id_firm=firm.id and
work.id_person=persons.id);

ERROR:  Unable to identify an ordering operator '<' for type '_text'       Use an explicit ordering operator or modify
thequery
 


I know that this query can be rewrite to eliminate the UNION using an
OR operator on first condition but my question is:

How can I specify an ordering operator? On which field have I to put it?


Best wishes for the new YEAR,              \fer


pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Rules
Next
From: Tom Lane
Date:
Subject: Re: Unable to identify an ordering operator