mirror of
https://github.com/postgres/postgres.git
synced 2025-11-25 12:03:53 +03:00
Revert: Remove useless self-joins
This commit revertsd3d55ce571and subsequent fixes2b26a69455,93c85db3b5,b44a1708ab,b7f315c9d7,8a8ed916f7,b5fb6736ed,0a93f803f4,e0477837ce,a7928a57b9,5ef34a8fc3,30b4955a46,8c441c0827,028b15405b,fe093994db,489072ab7a, and466979ef03. We are quite late in the release cycle and new bugs continue to appear. Even though we have fixes for all known bugs, there is a risk of throwing many bugs to end users. The plan for self-join elimination would be to do more review and testing, then re-commit in the early v18 cycle. Reported-by: Tom Lane Discussion: https://postgr.es/m/2422119.1714691974%40sss.pgh.pa.us
This commit is contained in:
@@ -72,9 +72,6 @@ extern void create_index_paths(PlannerInfo *root, RelOptInfo *rel);
|
||||
extern bool relation_has_unique_index_for(PlannerInfo *root, RelOptInfo *rel,
|
||||
List *restrictlist,
|
||||
List *exprlist, List *oprlist);
|
||||
extern bool relation_has_unique_index_ext(PlannerInfo *root, RelOptInfo *rel,
|
||||
List *restrictlist, List *exprlist,
|
||||
List *oprlist, List **extra_clauses);
|
||||
extern bool indexcol_is_bool_constant_for_query(PlannerInfo *root,
|
||||
IndexOptInfo *index,
|
||||
int indexcol);
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
/* GUC parameters */
|
||||
#define DEFAULT_CURSOR_TUPLE_FRACTION 0.1
|
||||
extern PGDLLIMPORT double cursor_tuple_fraction;
|
||||
extern PGDLLIMPORT bool enable_self_join_removal;
|
||||
|
||||
/* query_planner callback to compute query_pathkeys */
|
||||
typedef void (*query_pathkeys_callback) (PlannerInfo *root, void *extra);
|
||||
@@ -109,11 +108,6 @@ extern bool query_is_distinct_for(Query *query, List *colnos, List *opids);
|
||||
extern bool innerrel_is_unique(PlannerInfo *root,
|
||||
Relids joinrelids, Relids outerrelids, RelOptInfo *innerrel,
|
||||
JoinType jointype, List *restrictlist, bool force_cache);
|
||||
extern bool innerrel_is_unique_ext(PlannerInfo *root, Relids joinrelids,
|
||||
Relids outerrelids, RelOptInfo *innerrel,
|
||||
JoinType jointype, List *restrictlist,
|
||||
bool force_cache, List **uclauses);
|
||||
extern List *remove_useless_self_joins(PlannerInfo *root, List *jointree);
|
||||
|
||||
/*
|
||||
* prototypes for plan/setrefs.c
|
||||
|
||||
Reference in New Issue
Block a user