Re: How to select a row and an adjacent row? - Mailing list pgsql-general

From Lincoln Yeoh
Subject Re: How to select a row and an adjacent row?
Date
Msg-id 3.0.5.32.20000623162044.009605c0@pop.mecomb.po.my
Whole thread Raw
In response to Re: How to select a row and an adjacent row?  (Lincoln Yeoh <lylyeoh@mecomb.com>)
List pgsql-general
At 04:03 PM 23-06-2000 +0800, Lincoln Yeoh wrote:
>At 10:55 AM 23-06-2000 +0400, you wrote:
>>You could probably do this:
>>
>>select * from yourtable where <key> > <known_row_key>
>>    order by <key> limit 1;
>>
>>- isn't it?
>
>Thanks. Looks like that would work. Dunno why previously I thought that
>wouldn't have worked- fuzzyminded today I guess.

>(if list was ordered by date and messageid)
>select * from table where criteria=xxxxx and messageid > currentmessageid
>    order by date, messageid limit 1;

Ack! I am fuzzyminded today. That won't work.

I think I'll go take a break now...

Cheerio!
Link.


pgsql-general by date:

Previous
From: Lincoln Yeoh
Date:
Subject: Re: How to select a row and an adjacent row?
Next
From: Holger Klawitter
Date:
Subject: just a note