1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

Detect case where an outer join can be reduced to a plain inner join

because there are WHERE clauses that will reject the null-extended rows.
Per suggestion from Brandon Craig Rhodes, 19-Nov-02.
This commit is contained in:
Tom Lane
2003-02-09 23:57:19 +00:00
parent 43785a434e
commit b5956a2f22
3 changed files with 378 additions and 15 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: prep.h,v 1.36 2003/02/08 20:20:55 tgl Exp $
* $Id: prep.h,v 1.37 2003/02/09 23:57:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,7 +28,8 @@ extern int join_collapse_limit;
extern Node *pull_up_IN_clauses(Query *parse, Node *node);
extern Node *pull_up_subqueries(Query *parse, Node *jtnode,
bool below_outer_join);
extern Node *preprocess_jointree(Query *parse, Node *jtnode);
extern void reduce_outer_joins(Query *parse);
extern Node *simplify_jointree(Query *parse, Node *jtnode);
extern Relids get_relids_in_jointree(Node *jtnode);
extern Relids get_relids_for_join(Query *parse, int joinrelid);