Search Postgresql Archives

Re: Variable LIMIT and OFFSET in SELECTs

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

 



On Thu, Nov 15, 2007 at 06:08:20PM +0100, Reg Me Please wrote:
> Your remarks make a lot of sense. Of course.

good! it's interesting to see how things like this fit together.

> But then why allowing the LIMIT and the OFFSET as coming from function 
> argument evaluations?

I believe the query is planned by ignoring the LIMIT and OFFSET.

> Isn't this breaking the planner?
> Of course I would say no, as in my case it's just working fine, only
> more complex to write that the "simpler" way.

Strictly speaking, I don't see why you couldn't put an IMMUTABLE
expression into a LIMIT or OFFSET.  The query could be planned, by
ignoring the LIMIT and OFFSET, and then when the actual query was
executed they would be evaluated and the results fed into the right
places.  I guess it's not been a problem before so nobody's spent the
time/effort to write all the code.


  Sam

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[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