| From: | Lincoln Yeoh <lylyeoh(at)mecomb(dot)com> |
|---|---|
| To: | Eugene Karpachov <jk(at)steel(dot)orel(dot)ru> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: How to select a row and an adjacent row? |
| Date: | 2000-06-23 08:20:44 |
| Message-ID: | 3.0.5.32.20000623162044.009605c0@pop.mecomb.po.my |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Carsten Huettl | 2000-06-23 09:53:09 | FATAL 1: Database dbname=template1 does not exist in pg_database |
| Previous Message | Holger Klawitter | 2000-06-23 08:09:37 | just a note |