mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Re-run pgindent with updated list of typedefs. (Updated README should
avoid this problem in the future.)
This commit is contained in:
@ -54,7 +54,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.188 2007/11/15 21:14:35 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.189 2007/11/15 22:25:15 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -112,12 +112,12 @@ typedef struct
|
||||
{
|
||||
PlannerInfo *root;
|
||||
QualCost total;
|
||||
} cost_qual_eval_context;
|
||||
} cost_qual_eval_context;
|
||||
|
||||
static MergeScanSelCache *cached_scansel(PlannerInfo *root,
|
||||
RestrictInfo *rinfo,
|
||||
PathKey * pathkey);
|
||||
static bool cost_qual_eval_walker(Node *node, cost_qual_eval_context * context);
|
||||
PathKey *pathkey);
|
||||
static bool cost_qual_eval_walker(Node *node, cost_qual_eval_context *context);
|
||||
static Selectivity approx_selectivity(PlannerInfo *root, List *quals,
|
||||
JoinType jointype);
|
||||
static Selectivity join_in_selectivity(JoinPath *path, PlannerInfo *root);
|
||||
@ -1593,7 +1593,7 @@ cost_mergejoin(MergePath *path, PlannerInfo *root)
|
||||
* run mergejoinscansel() with caching
|
||||
*/
|
||||
static MergeScanSelCache *
|
||||
cached_scansel(PlannerInfo *root, RestrictInfo *rinfo, PathKey * pathkey)
|
||||
cached_scansel(PlannerInfo *root, RestrictInfo *rinfo, PathKey *pathkey)
|
||||
{
|
||||
MergeScanSelCache *cache;
|
||||
ListCell *lc;
|
||||
@ -1891,7 +1891,7 @@ cost_qual_eval_node(QualCost *cost, Node *qual, PlannerInfo *root)
|
||||
}
|
||||
|
||||
static bool
|
||||
cost_qual_eval_walker(Node *node, cost_qual_eval_context * context)
|
||||
cost_qual_eval_walker(Node *node, cost_qual_eval_context *context)
|
||||
{
|
||||
if (node == NULL)
|
||||
return false;
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/path/equivclass.c,v 1.5 2007/11/15 21:14:35 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/path/equivclass.c,v 1.6 2007/11/15 22:25:15 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -26,32 +26,32 @@
|
||||
#include "utils/lsyscache.h"
|
||||
|
||||
|
||||
static EquivalenceMember *add_eq_member(EquivalenceClass * ec,
|
||||
static EquivalenceMember *add_eq_member(EquivalenceClass *ec,
|
||||
Expr *expr, Relids relids,
|
||||
bool is_child, Oid datatype);
|
||||
static void generate_base_implied_equalities_const(PlannerInfo *root,
|
||||
EquivalenceClass * ec);
|
||||
EquivalenceClass *ec);
|
||||
static void generate_base_implied_equalities_no_const(PlannerInfo *root,
|
||||
EquivalenceClass * ec);
|
||||
EquivalenceClass *ec);
|
||||
static void generate_base_implied_equalities_broken(PlannerInfo *root,
|
||||
EquivalenceClass * ec);
|
||||
EquivalenceClass *ec);
|
||||
static List *generate_join_implied_equalities_normal(PlannerInfo *root,
|
||||
EquivalenceClass * ec,
|
||||
EquivalenceClass *ec,
|
||||
RelOptInfo *joinrel,
|
||||
RelOptInfo *outer_rel,
|
||||
RelOptInfo *inner_rel);
|
||||
static List *generate_join_implied_equalities_broken(PlannerInfo *root,
|
||||
EquivalenceClass * ec,
|
||||
EquivalenceClass *ec,
|
||||
RelOptInfo *joinrel,
|
||||
RelOptInfo *outer_rel,
|
||||
RelOptInfo *inner_rel);
|
||||
static Oid select_equality_operator(EquivalenceClass * ec,
|
||||
static Oid select_equality_operator(EquivalenceClass *ec,
|
||||
Oid lefttype, Oid righttype);
|
||||
static RestrictInfo *create_join_clause(PlannerInfo *root,
|
||||
EquivalenceClass * ec, Oid opno,
|
||||
EquivalenceMember * leftem,
|
||||
EquivalenceMember * rightem,
|
||||
EquivalenceClass * parent_ec);
|
||||
EquivalenceClass *ec, Oid opno,
|
||||
EquivalenceMember *leftem,
|
||||
EquivalenceMember *rightem,
|
||||
EquivalenceClass *parent_ec);
|
||||
static void reconsider_outer_join_clause(PlannerInfo *root,
|
||||
RestrictInfo *rinfo,
|
||||
bool outer_on_left);
|
||||
@ -313,7 +313,7 @@ process_equivalence(PlannerInfo *root, RestrictInfo *restrictinfo,
|
||||
* add_eq_member - build a new EquivalenceMember and add it to an EC
|
||||
*/
|
||||
static EquivalenceMember *
|
||||
add_eq_member(EquivalenceClass * ec, Expr *expr, Relids relids,
|
||||
add_eq_member(EquivalenceClass *ec, Expr *expr, Relids relids,
|
||||
bool is_child, Oid datatype)
|
||||
{
|
||||
EquivalenceMember *em = makeNode(EquivalenceMember);
|
||||
@ -554,7 +554,7 @@ generate_base_implied_equalities(PlannerInfo *root)
|
||||
*/
|
||||
static void
|
||||
generate_base_implied_equalities_const(PlannerInfo *root,
|
||||
EquivalenceClass * ec)
|
||||
EquivalenceClass *ec)
|
||||
{
|
||||
EquivalenceMember *const_em = NULL;
|
||||
ListCell *lc;
|
||||
@ -603,7 +603,7 @@ generate_base_implied_equalities_const(PlannerInfo *root,
|
||||
*/
|
||||
static void
|
||||
generate_base_implied_equalities_no_const(PlannerInfo *root,
|
||||
EquivalenceClass * ec)
|
||||
EquivalenceClass *ec)
|
||||
{
|
||||
EquivalenceMember **prev_ems;
|
||||
ListCell *lc;
|
||||
@ -685,7 +685,7 @@ generate_base_implied_equalities_no_const(PlannerInfo *root,
|
||||
*/
|
||||
static void
|
||||
generate_base_implied_equalities_broken(PlannerInfo *root,
|
||||
EquivalenceClass * ec)
|
||||
EquivalenceClass *ec)
|
||||
{
|
||||
ListCell *lc;
|
||||
|
||||
@ -775,7 +775,7 @@ generate_join_implied_equalities(PlannerInfo *root,
|
||||
*/
|
||||
static List *
|
||||
generate_join_implied_equalities_normal(PlannerInfo *root,
|
||||
EquivalenceClass * ec,
|
||||
EquivalenceClass *ec,
|
||||
RelOptInfo *joinrel,
|
||||
RelOptInfo *outer_rel,
|
||||
RelOptInfo *inner_rel)
|
||||
@ -944,7 +944,7 @@ generate_join_implied_equalities_normal(PlannerInfo *root,
|
||||
*/
|
||||
static List *
|
||||
generate_join_implied_equalities_broken(PlannerInfo *root,
|
||||
EquivalenceClass * ec,
|
||||
EquivalenceClass *ec,
|
||||
RelOptInfo *joinrel,
|
||||
RelOptInfo *outer_rel,
|
||||
RelOptInfo *inner_rel)
|
||||
@ -973,7 +973,7 @@ generate_join_implied_equalities_broken(PlannerInfo *root,
|
||||
* Returns InvalidOid if no operator can be found for this datatype combination
|
||||
*/
|
||||
static Oid
|
||||
select_equality_operator(EquivalenceClass * ec, Oid lefttype, Oid righttype)
|
||||
select_equality_operator(EquivalenceClass *ec, Oid lefttype, Oid righttype)
|
||||
{
|
||||
ListCell *lc;
|
||||
|
||||
@ -1003,10 +1003,10 @@ select_equality_operator(EquivalenceClass * ec, Oid lefttype, Oid righttype)
|
||||
*/
|
||||
static RestrictInfo *
|
||||
create_join_clause(PlannerInfo *root,
|
||||
EquivalenceClass * ec, Oid opno,
|
||||
EquivalenceMember * leftem,
|
||||
EquivalenceMember * rightem,
|
||||
EquivalenceClass * parent_ec)
|
||||
EquivalenceClass *ec, Oid opno,
|
||||
EquivalenceMember *leftem,
|
||||
EquivalenceMember *rightem,
|
||||
EquivalenceClass *parent_ec)
|
||||
{
|
||||
RestrictInfo *rinfo;
|
||||
ListCell *lc;
|
||||
@ -1553,8 +1553,8 @@ find_eclass_clauses_for_index_join(PlannerInfo *root, RelOptInfo *rel,
|
||||
/*
|
||||
* Found one, so try to generate a join clause. This is like
|
||||
* generate_join_implied_equalities_normal, except simpler since
|
||||
* our only preference item is to pick a Var on the outer side.
|
||||
* We only need one join clause per index col.
|
||||
* our only preference item is to pick a Var on the outer side. We
|
||||
* only need one join clause per index col.
|
||||
*/
|
||||
foreach(lc3, cur_ec->ec_members)
|
||||
{
|
||||
@ -1750,7 +1750,7 @@ has_relevant_eclass_joinclause(PlannerInfo *root, RelOptInfo *rel1)
|
||||
* from actually being generated.
|
||||
*/
|
||||
bool
|
||||
eclass_useful_for_merging(EquivalenceClass * eclass,
|
||||
eclass_useful_for_merging(EquivalenceClass *eclass,
|
||||
RelOptInfo *rel)
|
||||
{
|
||||
ListCell *lc;
|
||||
|
@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.224 2007/11/15 21:14:35 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.225 2007/11/15 22:25:15 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -52,7 +52,7 @@ typedef struct
|
||||
List *quals; /* the WHERE clauses it uses */
|
||||
List *preds; /* predicates of its partial index(es) */
|
||||
Bitmapset *clauseids; /* quals+preds represented as a bitmapset */
|
||||
} PathClauseUsage;
|
||||
} PathClauseUsage;
|
||||
|
||||
|
||||
static List *find_usable_indexes(PlannerInfo *root, RelOptInfo *rel,
|
||||
@ -774,8 +774,8 @@ choose_bitmap_and(PlannerInfo *root, RelOptInfo *rel,
|
||||
static int
|
||||
path_usage_comparator(const void *a, const void *b)
|
||||
{
|
||||
PathClauseUsage *pa = *(PathClauseUsage * const *) a;
|
||||
PathClauseUsage *pb = *(PathClauseUsage * const *) b;
|
||||
PathClauseUsage *pa = *(PathClauseUsage *const *) a;
|
||||
PathClauseUsage *pb = *(PathClauseUsage *const *) b;
|
||||
Cost acost;
|
||||
Cost bcost;
|
||||
Selectivity aselec;
|
||||
@ -1569,7 +1569,7 @@ matches_any_index(RestrictInfo *rinfo, RelOptInfo *rel, Relids outer_relids)
|
||||
* This is also exported for use by find_eclass_clauses_for_index_join.
|
||||
*/
|
||||
bool
|
||||
eclass_matches_any_index(EquivalenceClass * ec, EquivalenceMember * em,
|
||||
eclass_matches_any_index(EquivalenceClass *ec, EquivalenceMember *em,
|
||||
RelOptInfo *rel)
|
||||
{
|
||||
ListCell *l;
|
||||
|
@ -11,7 +11,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/path/pathkeys.c,v 1.90 2007/11/15 21:14:36 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/path/pathkeys.c,v 1.91 2007/11/15 22:25:15 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -37,12 +37,12 @@
|
||||
#define MUST_BE_REDUNDANT(eclass) \
|
||||
((eclass)->ec_has_const && !(eclass)->ec_below_outer_join)
|
||||
|
||||
static PathKey *makePathKey(EquivalenceClass * eclass, Oid opfamily,
|
||||
static PathKey *makePathKey(EquivalenceClass *eclass, Oid opfamily,
|
||||
int strategy, bool nulls_first);
|
||||
static PathKey *make_canonical_pathkey(PlannerInfo *root,
|
||||
EquivalenceClass * eclass, Oid opfamily,
|
||||
EquivalenceClass *eclass, Oid opfamily,
|
||||
int strategy, bool nulls_first);
|
||||
static bool pathkey_is_redundant(PathKey * new_pathkey, List *pathkeys);
|
||||
static bool pathkey_is_redundant(PathKey *new_pathkey, List *pathkeys);
|
||||
static PathKey *make_pathkey_from_sortinfo(PlannerInfo *root,
|
||||
Expr *expr, Oid ordering_op,
|
||||
bool nulls_first,
|
||||
@ -50,7 +50,7 @@ static PathKey *make_pathkey_from_sortinfo(PlannerInfo *root,
|
||||
bool canonicalize);
|
||||
static Var *find_indexkey_var(PlannerInfo *root, RelOptInfo *rel,
|
||||
AttrNumber varattno);
|
||||
static bool right_merge_direction(PlannerInfo *root, PathKey * pathkey);
|
||||
static bool right_merge_direction(PlannerInfo *root, PathKey *pathkey);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
@ -65,7 +65,7 @@ static bool right_merge_direction(PlannerInfo *root, PathKey * pathkey);
|
||||
* convenience routine to build the specified node.
|
||||
*/
|
||||
static PathKey *
|
||||
makePathKey(EquivalenceClass * eclass, Oid opfamily,
|
||||
makePathKey(EquivalenceClass *eclass, Oid opfamily,
|
||||
int strategy, bool nulls_first)
|
||||
{
|
||||
PathKey *pk = makeNode(PathKey);
|
||||
@ -89,7 +89,7 @@ makePathKey(EquivalenceClass * eclass, Oid opfamily,
|
||||
*/
|
||||
static PathKey *
|
||||
make_canonical_pathkey(PlannerInfo *root,
|
||||
EquivalenceClass * eclass, Oid opfamily,
|
||||
EquivalenceClass *eclass, Oid opfamily,
|
||||
int strategy, bool nulls_first)
|
||||
{
|
||||
PathKey *pk;
|
||||
@ -155,7 +155,7 @@ make_canonical_pathkey(PlannerInfo *root,
|
||||
* pointer comparison is enough to decide whether canonical ECs are the same.
|
||||
*/
|
||||
static bool
|
||||
pathkey_is_redundant(PathKey * new_pathkey, List *pathkeys)
|
||||
pathkey_is_redundant(PathKey *new_pathkey, List *pathkeys)
|
||||
{
|
||||
EquivalenceClass *new_ec = new_pathkey->pk_eclass;
|
||||
ListCell *lc;
|
||||
@ -1392,7 +1392,7 @@ pathkeys_useful_for_merging(PlannerInfo *root, RelOptInfo *rel, List *pathkeys)
|
||||
* for merging its target column.
|
||||
*/
|
||||
static bool
|
||||
right_merge_direction(PlannerInfo *root, PathKey * pathkey)
|
||||
right_merge_direction(PlannerInfo *root, PathKey *pathkey)
|
||||
{
|
||||
ListCell *l;
|
||||
|
||||
|
Reference in New Issue
Block a user