"chris r." <chricki(at)gmx(dot)net> writes:
>> Nothing; that looks like a planner bug to me. Please submit a
>> self-contained test case.
> I ported the entire schema to my test DB server and could not reproduce
> the error there. Note that probably recreating the view solves this
> issue. Given this, how should I proceed to create a test case? Any
> tutorial on this? (I'm not too familiar with all this yet.)
It's possibly statistics-dependent; make sure you have the same stats
targets on both DBs, and try re-analyzing a few times. Check other
planner parameters are the same, too.
regards, tom lane