On Jun 1, 2010, at 10:39 , KaiGai Kohei wrote: > I have an idea that we add FuncExpr a new field (e.g nestlevel) to remember > where is originally put in the query, and prevent reordering over the nest > level of subqueries. > In above example, f_malicious() has nestlevel=0 because it is put on the top > level. > But f_policy() has nestlevel=1 because it is originally put on the second > level subquery. Then, the order_qual_clauses() will check nestlevel of the > scan filter prior to reorder them based on the cost estimation. > Even if we have multiple nestlevels, solution will be same. A FuncExpr with > larger nestlevel shall be invoked earlier than others.
Wouldn't the information leak go away if you stuck "OFFSET 0" at the end of the view? IIRC, that is the semi-offical way to create barriers for subquery flattening and such. best regards, Florian Pflug -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers