From: | Christopher Browne <cbbrowne(at)acm(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: sql row constructor...works! |
Date: | 2006-02-08 03:57:59 |
Message-ID: | m3acd233js.fsf@mobile.int.cbbrowne.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>> On Feb 8, 2006, at 11:17 , Merlin Moncure wrote:
>>
>> > The proper SQL construct without row constructor is:
>> >
>> > select * from t where
>> > a >= a1 and
>> > (a > a1 or b>= b1) and
>> > (a > a1 or b > b1 or c > c1)
>> > order by a,b,c limit 1 ^ no offset necessary
>> >
>> > confused yet?
No, not confused, that's closer to an example...
>> This is interesting! Could you also provide the equivalent *with* a
>> row constructor? (or did I miss that somewhere?)
>
> select * from t where (a,b,c) > (a1, b1, c1) order by a,b,c limit 1;
> [plus full usage of key on t(a,b,c)]
Ah, so _that_ is the new notation that works now? That's neat indeed.
--
"cbbrowne","@","gmail.com"
http://linuxdatabases.info/info/slony.html
"Instant coffee is like pouring hot water over the cremated remains of
a good friend."
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-02-08 04:43:40 | Audio interview |
Previous Message | Michael Glaesemann | 2006-02-08 02:47:41 | Re: sql row constructor...works! |