Re: Variable LIMIT and OFFSET in SELECTs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Variable LIMIT and OFFSET in SELECTs
Date: 2007-11-16 07:20:47
Message-ID: 27585.1195197647@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sam Mason <sam(at)samason(dot)me(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-11-16 07:33:14 Re: Variable LIMIT and OFFSET in SELECTs
Previous Message Reg Me Please 2007-11-16 07:16:23 Re: Variable LIMIT and OFFSET in SELECTs