Re: sql row constructor...works!

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: sql row constructor...works!
Дата
Msg-id b42b73150602071835m172755fcmf3592e60f59db12d@mail.gmail.com
обсуждение исходный текст
Ответ на Re: sql row constructor...works!  (Michael Glaesemann <grzm@myrealbox.com>)
Ответы Re: sql row constructor...works!  (Michael Glaesemann <grzm@myrealbox.com>)
Re: sql row constructor...works!  (Csaba Nagy <nagy@ecircle-ag.com>)
Список 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?
>
> 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)]


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: sql row constructor...works!
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: sql row constructor...works!