Ken Johanson <pg-user(at)kensystem(dot)com> writes:
> Sorry Tom, I just missed you and responded on list, also asking if there
> were a test implied in adjusting the query. Anyway, here is trimmed-down
> DDL.
Well, if I just load this script into an empty DB in 8.2-CVS-tip and
then run the given query, it does what I'd expect (return a zero-row
result). If the same case fails for you, that suggests we fixed it.
If increasing join_collapse_limit to 9 or more makes the problem go away
for you, that would be additional evidence that what you are seeing is
the same problem already diagnosed. That might be a usable workaround
for you until 8.2.7 comes out...
regards, tom lane