aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/joinpath.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-01-23 02:22:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-01-23 02:22:34 +0000
commit5b7a866b98c30f4463a68671a6ef4d64c03b3559 (patch)
tree20bab9b7518c59b99cb4224eb84bd2e5d545b3ae /src/backend/optimizer/path/joinpath.c
parent3a4589056d8d5c2a14e426770776107312988ef4 (diff)
downloadpostgresql-5b7a866b98c30f4463a68671a6ef4d64c03b3559.tar.gz
postgresql-5b7a866b98c30f4463a68671a6ef4d64c03b3559.zip
The result of a FULL or RIGHT join can't be assumed to be sorted by the
left input's sorting, because null rows may be inserted at various points. Per report from Ferenc Lutischá¸n.
Diffstat (limited to 'src/backend/optimizer/path/joinpath.c')
-rw-r--r--src/backend/optimizer/path/joinpath.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c
index 65c7690af47..0a2619d8f5e 100644
--- a/src/backend/optimizer/path/joinpath.c
+++ b/src/backend/optimizer/path/joinpath.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.91 2004/12/31 22:00:04 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.91.4.1 2005/01/23 02:22:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -271,7 +271,8 @@ sort_inner_and_outer(Query *root,
cur_mergeclauses,
innerrel);
/* Build pathkeys representing output sort order. */
- merge_pathkeys = build_join_pathkeys(root, joinrel, outerkeys);
+ merge_pathkeys = build_join_pathkeys(root, joinrel, jointype,
+ outerkeys);
/*
* And now we can make the path.
@@ -431,7 +432,7 @@ match_unsorted_outer(Query *root,
* as a nestloop, and even if some of the mergeclauses are
* implemented by qpquals rather than as true mergeclauses):
*/
- merge_pathkeys = build_join_pathkeys(root, joinrel,
+ merge_pathkeys = build_join_pathkeys(root, joinrel, jointype,
outerpath->pathkeys);
if (nestjoinOK)