On Mon, Jun 09, 2014 at 12:36:30AM +1200, David Rowley wrote: > Currently pull_up_sublinks_qual_recurse only changes the plan for NOT > EXISTS queries and leaves NOT IN alone. The reason for this is because the > values returned by a subquery in the IN clause could have NULLs.
Awesome. I've had a brief look at the patch and other than a line of extraneous whitespace it looks sane. Since it is only testing on NOT IN queries I don't think there are any issues with it slowing down simple queries. I also note you can't prove "id+1" not null. At first I thought you might be able to prove this not null if the operator/function was strict, but then I realised that strict only means "null if input is null" not "output is only null if inputs are null". Pity. Nice work. -- Martijn van Oosterhout <klep...@svana.org> http://svana.org/kleptog/ > He who writes carelessly confesses thereby at the very outset that he does > not attach much importance to his own thoughts. -- Arthur Schopenhauer
Description: Digital signature