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

Reply via email to