Re: Variable LIMIT and OFFSET in SELECTs - Mailing list pgsql-general

From Tom Lane
Subject Re: Variable LIMIT and OFFSET in SELECTs
Date
Msg-id 27585.1195197647@sss.pgh.pa.us
Whole thread Raw
In response to Re: Variable LIMIT and OFFSET in SELECTs  (Sam Mason <sam@samason.me.uk>)
List pgsql-general
Sam Mason <sam@samason.me.uk> 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

pgsql-general by date:

Previous
From: Reg Me Please
Date:
Subject: Re: Variable LIMIT and OFFSET in SELECTs
Next
From: Tom Lane
Date:
Subject: Re: Variable LIMIT and OFFSET in SELECTs