Re: [GENERAL] Push predicate down in view containing window function

2013-11-15 Thread Merlin Moncure
On Fri, Nov 15, 2013 at 12:43 AM, Philippe Girolami wrote: > Ok so is there a way i can do something similar ? Would a function returning > rows and taking the extra predicate 'values' as parameters be as optimized as > the 'good' query in my first email ? There is only one way I know of to do

Re: [GENERAL] Push predicate down in view containing window function

2013-11-14 Thread Philippe Girolami
Ok so is there a way i can do something similar ? Would a function returning rows and taking the extra predicate 'values' as parameters be as optimized as the 'good' query in my first email ? Thanks. Tom Lane a écrit : Philippe Girolami writes: > Hello, > Using postgres 9.1.9, I have a view

Re: [GENERAL] Push predicate down in view containing window function

2013-11-14 Thread Tom Lane
Philippe Girolami writes: > Hello, > Using postgres 9.1.9, I have a view that uses a window function. I then query > that view with a predicate on one of the columns. Unfortunately, the > predicate doesn't get pushed down into the view. > Given that the predicate applies to a column that's being