Search Postgresql Archives

Re: Variable LIMIT and OFFSET in SELECTs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sam Mason <sam@xxxxxxxxxxxxx> writes:
> On Fri, Nov 16, 2007 at 01:38:30AM -0500, Tom Lane wrote:
>> IIRC, it used to be restricted to a constant, a few revisions back.

> 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.

Right.  There's clearly some value in supporting a parameter ($n),
and once we do that, given the existing expression-evaluation
infrastructure, we might as well allow everything except sub-selects.
(Sub-selects would cost a bit more because the planner would have to
deal with 'em.  Maybe not even a lot more ... I've not looked at it.)

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux