Andreas Pflug <Andreas.Pflug@web.de> writes:
> As the example shows even
> columns that are never used will be taken into account when checking
> has_nullable_targetlist.
It's not really practical to do otherwise, as the code that needs to
check this doesn't have access to a list of the columns actually used.
Even if we kluged things up enough to make it possible to find that out,
that would merely mean that *some* of your queries wouldn't have a
problem.
What about improving the intelligence of the nullability check --- or do
you have non-strict expressions in there?
regards, tom lane