Re: Variable LIMIT and OFFSET in SELECTs

Поиск
Список
Период
Сортировка
Искать
От
Sam Mason
Тема
Re: Variable LIMIT and OFFSET in SELECTs
Дата
Msg-id
20071116065349.GJ1955@frubble.xen.chris-lamb.co.uk
Ответ на
Список
Дерево обсуждения
Variable LIMIT and OFFSET in SELECTs Reg Me Please <regmeplease@gmail.com>
Re: Variable LIMIT and OFFSET in SELECTs Tom Lane <tgl@sss.pgh.pa.us>
Re: Variable LIMIT and OFFSET in SELECTs Reg Me Please <regmeplease@gmail.com>
Re: Variable LIMIT and OFFSET in SELECTs "Pavel Stehule" <pavel.stehule@gmail.com>
Re: Variable LIMIT and OFFSET in SELECTs "Trevor Talbot" <quension@gmail.com>
Re: Variable LIMIT and OFFSET in SELECTs Reg Me Please <regmeplease@gmail.com>
Re: Variable LIMIT and OFFSET in SELECTs Sam Mason <sam@samason.me.uk>
Re: Variable LIMIT and OFFSET in SELECTs Reg Me Please <regmeplease@gmail.com>
Re: Variable LIMIT and OFFSET in SELECTs Sam Mason <sam@samason.me.uk>
Re: Variable LIMIT and OFFSET in SELECTs Tom Lane <tgl@sss.pgh.pa.us>
Re: Variable LIMIT and OFFSET in SELECTs Reg Me Please <regmeplease@gmail.com>
Re: Variable LIMIT and OFFSET in SELECTs Richard Huxton <dev@archonet.com>
Re: Variable LIMIT and OFFSET in SELECTs Reg Me Please <regmeplease@gmail.com>
Re: Variable LIMIT and OFFSET in SELECTs Richard Huxton <dev@archonet.com>
Re: Variable LIMIT and OFFSET in SELECTs Reg Me Please <regmeplease@gmail.com>
Re: Variable LIMIT and OFFSET in SELECTs Sam Mason <sam@samason.me.uk>
Re: Variable LIMIT and OFFSET in SELECTs Tom Lane <tgl@sss.pgh.pa.us>
Re: Variable LIMIT and OFFSET in SELECTs Sam Mason <sam@samason.me.uk>
Re: Variable LIMIT and OFFSET in SELECTs Tom Lane <tgl@sss.pgh.pa.us>
Re: Variable LIMIT and OFFSET in SELECTs Reg Me Please <regmeplease@gmail.com>
Re: Variable LIMIT and OFFSET in SELECTs Tom Lane <tgl@sss.pgh.pa.us>
Re: Variable LIMIT and OFFSET in SELECTs Reg Me Please <regmeplease@gmail.com>
Re: Variable LIMIT and OFFSET in SELECTs "Trevor Talbot" <quension@gmail.com>
Re: Variable LIMIT and OFFSET in SELECTs Tom Lane <tgl@sss.pgh.pa.us>
Re: Variable LIMIT and OFFSET in SELECTs Gregory Stark <stark@enterprisedb.com>
Re: Variable LIMIT and OFFSET in SELECTs Gregory Stark <stark@enterprisedb.com>
On Fri, Nov 16, 2007 at 01:38:30AM -0500, Tom Lane wrote:
> Sam Mason  writes:
> > wow, that's kind of fun isn't it.  I only thought you could put a
> > constant in there.  Maybe I should have had a look in the grammar/tested
> > it first!
> 
> IIRC, it used to be restricted to a constant, a few revisions back.
> In current releases the only restriction that stems from laziness is
> not allowing a sub-select.  (If anyone were to put forward a serious
> use-case, we'd probably go fix that.)

I'm amazed it supports anything more than a constant.  The values are
almost always going to come from external code, so there doesn't seem
much point in doing anything else.

I suppose with all the expression evaluation code already in PG,
supporting what it currently does isn't hard.

> The OP's complaint is that we don't allow a variable of the query's own
> level, but AFAICT he's still not grasped the point that that leads to an
> indeterminate limit value ...

Being too close to a problem makes it very easy to forget about the
general case.  I probably do this far too often myself!


  Sam
В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
От: Reg Me Please
Дата:
FAQ