Re: [SQL] Add: Special sort querstion

2009-04-01 Thread Dirk Jagdmann
I think it can not be done with default PostgreSQL functions and operators, because you must compare two different columns of two rows depending which row is on either side of the comparision. But I think you can do this with the following steps: 1) create a new type as a 4-tupel of start_lat,

Re: [SQL] Add: Special sort querstion

2009-04-01 Thread Dirk Jagdmann
I think it can not be done with default PostgreSQL functions and operators, because you must compare two different columns of two rows depending which row is on either side of the comparision. But I think you can do this with the following steps: 1) create a new type as a 4-tupel of start_lat,

Re: [SQL] Add: Special sort querstion

2009-04-01 Thread Scott Marlowe
On Fri, Mar 27, 2009 at 6:10 AM, Dominik Piekarski d.piekar...@vivawasser.de wrote: Oh, actually every row of the same id-range has the same start_lat/start_lng coordinates as the predecessors end_lat/end_lng coordinates. But the question remains the same. Is there a way to do something like

[SQL] Add: Special sort querstion

2009-03-27 Thread Dominik Piekarski
Oh, actually every row of the same id-range has the same start_lat/start_lng coordinates as the predecessors end_lat/end_lng coordinates. But the question remains the same. Is there a way to do something like ORDER BY (start_lat = end_lat AND start_lng = end_lng) ? Or maybe another way to