Re: Variable LIMIT and OFFSET in SELECTs

From: Reg Me Please <regmeplease(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Sam Mason <sam(at)samason(dot)me(dot)uk>
Subject: Re: Variable LIMIT and OFFSET in SELECTs
Date: 2007-11-15 18:48:15
Message-ID: 200711151948.18678.regmeplease@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sorry but I don't understand.

Either the LIMIT and OFFSET are to be definitely CONSTANT or not.

In the SQL function body the LIMIT and the OFFSET *are definitely not*
CONSTANT. And the planner can do its job at best as usual.

As Sam says I should be able to "put an IMMUTABLE expression into a LIMIT or
OFFSET". And under some circumstances (SQL function body) it's true even with
VARIABLE expressions like function call arguments.

In my opinion I would say it's more a problem with the syntax checker that
with the planner ("semantics" in my lingo). But I could be wrong.

--
Reg me Please

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2007-11-15 19:28:17 Re: Variable LIMIT and OFFSET in SELECTs
Previous Message Ray Stell 2007-11-15 18:44:38 Cisco MDS support