postgresql/src
Tom Lane eb919e8fde Resurrect the "last ditch" code path in join_search_one_level().
This essentially reverts commit e54b10a62d,
in which I'd decided that the "last ditch" join logic was useless.  The
folly of that is now exposed by a report from Pavel Stehule: although the
function should always find at least one join in a self-contained join
problem, it can still fail to do so in a sub-problem created by artificial
from_collapse_limit or join_collapse_limit constraints.  Adjust the
comments to describe this, and simplify the code a bit to match the new
coding of the earlier loop in the function.

I'm not terribly happy about this: I still subscribe to the opinion stated
in the previous commit message that the "last ditch" code can obscure logic
bugs elsewhere.  But the alternative seems to be to complicate the earlier
tests for does-this-relation-have-a-join-clause to the point where they can
tell whether the join clauses link outside the current join sub-problem.
And that looks messy, slow, and possibly a source of bugs in itself.
In any case, now is not the time to be inserting experimental code into
9.2, so let's just go back to the time-tested solution.
2012-08-15 00:08:13 -04:00
..
backend Resurrect the "last ditch" code path in join_search_one_level(). 2012-08-15 00:08:13 -04:00
bin Support having multiple Unix-domain sockets per postmaster. 2012-08-10 17:27:15 -04:00
include More fixes for planner's handling of LATERAL. 2012-08-12 16:01:26 -04:00
interfaces Add runtime checks for number of query parameters passed to libpq functions. 2012-08-13 16:36:35 +03:00
makefiles Remove BSD/OS (BSDi) port. There are no known users upgrading to 2012-05-03 10:58:44 -04:00
pl Perform conversion from Python unicode to string/bytes object via UTF-8. 2012-08-06 14:09:50 +03:00
port Improve reporting of error situations in find_other_exec(). 2012-07-27 19:31:13 -04:00
template Remove BSD/OS (BSDi) port. There are no known users upgrading to 2012-05-03 10:58:44 -04:00
test Prevent access to external files/URLs via XML entity references. 2012-08-14 18:31:16 -04:00
timezone Update time zone data files to tzdata release 2012e. 2012-08-14 10:54:24 -04:00
tools Adjust pgtest coding to be less complex. 2012-08-10 16:46:02 -04:00
tutorial Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Make init-po and update-po recursive make targets 2012-06-29 14:01:54 +03:00
Makefile.shlib Remove BSD/OS (BSDi) port. There are no known users upgrading to 2012-05-03 10:58:44 -04:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
nls-global.mk Lots of doc corrections. 2012-04-23 22:43:09 -04:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00