Commit 2ae51c86 authored by Tom Lane's avatar Tom Lane

Minor cleanups and code beautification; eliminate some

routines that are now dead code.
parent 4a1c5cb9
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.35 1999/07/24 23:21:12 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.36 1999/08/10 03:00:14 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -51,28 +51,29 @@ static Oid hashjoinop(Expr *clause); ...@@ -51,28 +51,29 @@ static Oid hashjoinop(Expr *clause);
void void
make_var_only_tlist(Query *root, List *tlist) make_var_only_tlist(Query *root, List *tlist)
{ {
List *tlist_vars = NIL; List *tlist_vars = pull_var_clause((Node *) tlist);
List *l = NIL;
List *tvar = NIL;
foreach(l, tlist) add_vars_to_targetlist(root, tlist_vars);
{ freeList(tlist_vars);
TargetEntry *entry = (TargetEntry *) lfirst(l); }
tlist_vars = nconc(tlist_vars, pull_var_clause(entry->expr)); /*
} * add_vars_to_targetlist
* For each variable appearing in the list, add it to the relation's
* targetlist if not already present. Rel nodes will also be created
* if not already present.
*/
static void
add_vars_to_targetlist(Query *root, List *vars)
{
List *temp;
/* now, the target list only contains Var nodes */ foreach(temp, vars)
foreach(tvar, tlist_vars)
{ {
Var *var = (Var *) lfirst(tvar); Var *var = (Var *) lfirst(temp);
Index varno; RelOptInfo *rel = get_base_rel(root, var->varno);
RelOptInfo *result;
varno = var->varno;
result = get_base_rel(root, varno);
add_var_to_tlist(result, var); add_var_to_tlist(rel, var);
} }
} }
...@@ -87,31 +88,30 @@ make_var_only_tlist(Query *root, List *tlist) ...@@ -87,31 +88,30 @@ make_var_only_tlist(Query *root, List *tlist)
void void
add_missing_vars_to_tlist(Query *root, List *tlist) add_missing_vars_to_tlist(Query *root, List *tlist)
{ {
int varno = 1;
List *l; List *l;
int varno;
varno = 1;
foreach(l, root->rtable) foreach(l, root->rtable)
{ {
RangeTblEntry *rte = (RangeTblEntry *) lfirst(l); RangeTblEntry *rte = (RangeTblEntry *) lfirst(l);
Relids relids; Relids relids;
RelOptInfo *result;
Var *var;
relids = lconsi(varno, NIL); relids = lconsi(varno, NIL);
if (rte->inFromCl && !rel_member(relids, root->base_rel_list)) if (rte->inFromCl && !rel_member(relids, root->base_rel_list))
{ {
RelOptInfo *rel;
Var *var;
/* add it to base_rel_list */
rel = get_base_rel(root, varno);
/* give it a dummy tlist entry for its OID */
var = makeVar(varno, ObjectIdAttributeNumber, var = makeVar(varno, ObjectIdAttributeNumber,
OIDOID, -1, 0, varno, ObjectIdAttributeNumber); OIDOID, -1, 0, varno, ObjectIdAttributeNumber);
/* add it to base_rel_list */ add_var_to_tlist(rel, var);
result = get_base_rel(root, varno);
add_var_to_tlist(result, var);
} }
pfree(relids); pfree(relids);
varno++; varno++;
} }
return;
} }
/***************************************************************************** /*****************************************************************************
...@@ -239,26 +239,6 @@ add_join_info_to_rels(Query *root, RestrictInfo *restrictinfo, ...@@ -239,26 +239,6 @@ add_join_info_to_rels(Query *root, RestrictInfo *restrictinfo,
} }
} }
/*
* add_vars_to_targetlist
* For each variable appearing in a clause, add it to the relation's
* targetlist if not already present.
*/
static void
add_vars_to_targetlist(Query *root, List *vars)
{
List *temp;
foreach(temp, vars)
{
Var *var = (Var *) lfirst(temp);
RelOptInfo *rel = get_base_rel(root, var->varno);
if (tlistentry_member(var, rel->targetlist) == NULL)
add_var_to_tlist(rel, var);
}
}
/***************************************************************************** /*****************************************************************************
* *
* JOININFO * JOININFO
...@@ -269,7 +249,7 @@ add_vars_to_targetlist(Query *root, List *vars) ...@@ -269,7 +249,7 @@ add_vars_to_targetlist(Query *root, List *vars)
* set_joininfo_mergeable_hashable * set_joininfo_mergeable_hashable
* Set the MergeJoinable or HashJoinable field for every joininfo node * Set the MergeJoinable or HashJoinable field for every joininfo node
* (within a rel node) and the mergejoinorder or hashjoinop field for * (within a rel node) and the mergejoinorder or hashjoinop field for
* each restrictinfo node(within a joininfo node) for all relations in a * each restrictinfo node (within a joininfo node) for all relations in a
* query. * query.
* *
* Returns nothing. * Returns nothing.
...@@ -277,43 +257,43 @@ add_vars_to_targetlist(Query *root, List *vars) ...@@ -277,43 +257,43 @@ add_vars_to_targetlist(Query *root, List *vars)
void void
set_joininfo_mergeable_hashable(List *rel_list) set_joininfo_mergeable_hashable(List *rel_list)
{ {
List *x, List *x;
*y,
*z;
RelOptInfo *rel;
JoinInfo *joininfo;
RestrictInfo *restrictinfo;
Expr *clause;
foreach(x, rel_list) foreach(x, rel_list)
{ {
rel = (RelOptInfo *) lfirst(x); RelOptInfo *rel = (RelOptInfo *) lfirst(x);
List *y;
foreach(y, rel->joininfo) foreach(y, rel->joininfo)
{ {
joininfo = (JoinInfo *) lfirst(y); JoinInfo *joininfo = (JoinInfo *) lfirst(y);
List *z;
foreach(z, joininfo->jinfo_restrictinfo) foreach(z, joininfo->jinfo_restrictinfo)
{ {
restrictinfo = (RestrictInfo *) lfirst(z); RestrictInfo *restrictinfo = (RestrictInfo *) lfirst(z);
clause = restrictinfo->clause; Expr *clause = restrictinfo->clause;
if (is_joinable((Node *) clause)) if (is_joinable((Node *) clause))
{ {
MergeOrder *sortop = (MergeOrder *) NULL;
Oid hashop = (Oid) NULL;
if (_enable_mergejoin_) if (_enable_mergejoin_)
sortop = mergejoinop(clause);
if (sortop)
{ {
restrictinfo->mergejoinorder = sortop; MergeOrder *sortop = mergejoinop(clause);
joininfo->mergejoinable = true; if (sortop)
{
restrictinfo->mergejoinorder = sortop;
joininfo->mergejoinable = true;
}
} }
if (_enable_hashjoin_) if (_enable_hashjoin_)
hashop = hashjoinop(clause);
if (hashop)
{ {
restrictinfo->hashjoinoperator = hashop; Oid hashop = hashjoinop(clause);
joininfo->hashjoinable = true; if (hashop)
{
restrictinfo->hashjoinoperator = hashop;
joininfo->hashjoinable = true;
}
} }
} }
} }
...@@ -323,8 +303,8 @@ set_joininfo_mergeable_hashable(List *rel_list) ...@@ -323,8 +303,8 @@ set_joininfo_mergeable_hashable(List *rel_list)
/* /*
* mergejoinop * mergejoinop
* Returns the mergejoin operator of an operator iff 'clause' is * Returns a MergeOrder node for 'clause' iff 'clause' is mergejoinable,
* mergejoinable, i.e., both operands are single vars and the operator is * i.e., both operands are single vars and the operator is
* a mergejoinable operator. * a mergejoinable operator.
*/ */
static MergeOrder * static MergeOrder *
...@@ -346,7 +326,7 @@ mergejoinop(Expr *clause) ...@@ -346,7 +326,7 @@ mergejoinop(Expr *clause)
/* caution: is_opclause accepts more than I do, so check it */ /* caution: is_opclause accepts more than I do, so check it */
if (!right) if (!right)
return NULL; /* unary opclauses need not apply */ return NULL; /* unary opclauses need not apply */
if (!IsA(left, Var) ||!IsA(right, Var)) if (!IsA(left, Var) || !IsA(right, Var))
return NULL; return NULL;
opno = ((Oper *) clause->oper)->opno; opno = ((Oper *) clause->oper)->opno;
...@@ -374,8 +354,8 @@ mergejoinop(Expr *clause) ...@@ -374,8 +354,8 @@ mergejoinop(Expr *clause)
/* /*
* hashjoinop * hashjoinop
* Returns the hashjoin operator of an operator iff 'clause' is * Returns the hashjoin operator iff 'clause' is hashjoinable,
* hashjoinable, i.e., both operands are single vars and the operator is * i.e., both operands are single vars and the operator is
* a hashjoinable operator. * a hashjoinable operator.
*/ */
static Oid static Oid
...@@ -393,7 +373,7 @@ hashjoinop(Expr *clause) ...@@ -393,7 +373,7 @@ hashjoinop(Expr *clause)
/* caution: is_opclause accepts more than I do, so check it */ /* caution: is_opclause accepts more than I do, so check it */
if (!right) if (!right)
return InvalidOid; /* unary opclauses need not apply */ return InvalidOid; /* unary opclauses need not apply */
if (!IsA(left, Var) ||!IsA(right, Var)) if (!IsA(left, Var) || !IsA(right, Var))
return InvalidOid; return InvalidOid;
return op_hashjoinable(((Oper *) clause->oper)->opno, return op_hashjoinable(((Oper *) clause->oper)->opno,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.44 1999/08/09 00:51:24 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.45 1999/08/10 03:00:15 tgl Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -78,7 +78,8 @@ bool ...@@ -78,7 +78,8 @@ bool
is_opclause(Node *clause) is_opclause(Node *clause)
{ {
return (clause != NULL && return (clause != NULL &&
nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == OP_EXPR); IsA(clause, Expr) &&
((Expr *) clause)->opType == OP_EXPR);
} }
/* /*
...@@ -147,7 +148,7 @@ bool ...@@ -147,7 +148,7 @@ bool
is_funcclause(Node *clause) is_funcclause(Node *clause)
{ {
return (clause != NULL && return (clause != NULL &&
nodeTag(clause) == T_Expr && IsA(clause, Expr) &&
((Expr *) clause)->opType == FUNC_EXPR); ((Expr *) clause)->opType == FUNC_EXPR);
} }
...@@ -183,9 +184,9 @@ make_funcclause(Func *func, List *funcargs) ...@@ -183,9 +184,9 @@ make_funcclause(Func *func, List *funcargs)
bool bool
or_clause(Node *clause) or_clause(Node *clause)
{ {
return clause != NULL && return (clause != NULL &&
nodeTag(clause) == T_Expr && IsA(clause, Expr) &&
((Expr *) clause)->opType == OR_EXPR; ((Expr *) clause)->opType == OR_EXPR);
} }
/* /*
...@@ -220,7 +221,7 @@ bool ...@@ -220,7 +221,7 @@ bool
not_clause(Node *clause) not_clause(Node *clause)
{ {
return (clause != NULL && return (clause != NULL &&
nodeTag(clause) == T_Expr && IsA(clause, Expr) &&
((Expr *) clause)->opType == NOT_EXPR); ((Expr *) clause)->opType == NOT_EXPR);
} }
...@@ -269,7 +270,7 @@ bool ...@@ -269,7 +270,7 @@ bool
and_clause(Node *clause) and_clause(Node *clause)
{ {
return (clause != NULL && return (clause != NULL &&
nodeTag(clause) == T_Expr && IsA(clause, Expr) &&
((Expr *) clause)->opType == AND_EXPR); ((Expr *) clause)->opType == AND_EXPR);
} }
...@@ -319,27 +320,10 @@ make_ands_implicit(Expr *clause) ...@@ -319,27 +320,10 @@ make_ands_implicit(Expr *clause)
return lcons(clause, NIL); return lcons(clause, NIL);
} }
/*****************************************************************************
* CASE clause functions
*****************************************************************************/
/*
* case_clause
*
* Returns t iff its argument is a 'case' clause: (CASE { expr }).
*
*/
bool
case_clause(Node *clause)
{
return (clause != NULL &&
nodeTag(clause) == T_CaseExpr);
}
/***************************************************************************** /*****************************************************************************
* * * *
* * * General clause-manipulating routines *
* * * *
*****************************************************************************/ *****************************************************************************/
...@@ -374,20 +358,21 @@ pull_constant_clauses(List *quals, List **constantQual) ...@@ -374,20 +358,21 @@ pull_constant_clauses(List *quals, List **constantQual)
/* /*
* clause_relids_vars * clause_relids_vars
* Retrieves relids and vars appearing within a clause. * Retrieves distinct relids and vars appearing within a clause.
* Returns ((relid1 relid2 ... relidn) (var1 var2 ... varm)) where
* vars appear in the clause this is done by recursively searching
* through the left and right operands of a clause.
*
* Returns the list of relids and vars.
* *
* '*relids' is set to an integer list of all distinct "varno"s appearing
* in Vars within the clause.
* '*vars' is set to a list of all distinct Vars appearing within the clause.
* Var nodes are considered distinct if they have different varno
* or varattno values. If there are several occurrences of the same
* varno/varattno, you get a randomly chosen one...
*/ */
void void
clause_get_relids_vars(Node *clause, Relids *relids, List **vars) clause_get_relids_vars(Node *clause, Relids *relids, List **vars)
{ {
List *clvars = pull_var_clause(clause); List *clvars = pull_var_clause(clause);
List *var_list = NIL;
List *varno_list = NIL; List *varno_list = NIL;
List *var_list = NIL;
List *i; List *i;
foreach(i, clvars) foreach(i, clvars)
...@@ -397,7 +382,7 @@ clause_get_relids_vars(Node *clause, Relids *relids, List **vars) ...@@ -397,7 +382,7 @@ clause_get_relids_vars(Node *clause, Relids *relids, List **vars)
Assert(var->varlevelsup == 0); Assert(var->varlevelsup == 0);
if (!intMember(var->varno, varno_list)) if (!intMember(var->varno, varno_list))
varno_list = lappendi(varno_list, var->varno); varno_list = lconsi(var->varno, varno_list);
foreach(vi, var_list) foreach(vi, var_list)
{ {
Var *in_list = (Var *) lfirst(vi); Var *in_list = (Var *) lfirst(vi);
...@@ -407,7 +392,7 @@ clause_get_relids_vars(Node *clause, Relids *relids, List **vars) ...@@ -407,7 +392,7 @@ clause_get_relids_vars(Node *clause, Relids *relids, List **vars)
break; break;
} }
if (vi == NIL) if (vi == NIL)
var_list = lappend(var_list, var); var_list = lcons(var, var_list);
} }
freeList(clvars); freeList(clvars);
...@@ -424,22 +409,10 @@ clause_get_relids_vars(Node *clause, Relids *relids, List **vars) ...@@ -424,22 +409,10 @@ clause_get_relids_vars(Node *clause, Relids *relids, List **vars)
int int
NumRelids(Node *clause) NumRelids(Node *clause)
{ {
List *vars = pull_var_clause(clause); List *varno_list = pull_varnos(clause);
List *var_list = NIL; int result = length(varno_list);
List *i;
int result;
foreach(i, vars) freeList(varno_list);
{
Var *var = (Var *) lfirst(i);
if (!intMember(var->varno, var_list))
var_list = lconsi(var->varno, var_list);
}
result = length(var_list);
freeList(vars);
freeList(var_list);
return result; return result;
} }
...@@ -468,7 +441,7 @@ is_joinable(Node *clause) ...@@ -468,7 +441,7 @@ is_joinable(Node *clause)
* One side of the clause (i.e. left or right operands) must either be * One side of the clause (i.e. left or right operands) must either be
* a var node ... * a var node ...
*/ */
if (IsA(leftop, Var) ||IsA(rightop, Var)) if (IsA(leftop, Var) || IsA(rightop, Var))
return true; return true;
/* /*
...@@ -480,36 +453,6 @@ is_joinable(Node *clause) ...@@ -480,36 +453,6 @@ is_joinable(Node *clause)
return false; return false;
} }
/*
* qual_clause_p
*
* Returns t iff 'clause' is a valid qualification clause.
*
* For now we accept only "var op const" or "const op var".
*/
bool
qual_clause_p(Node *clause)
{
Node *leftop,
*rightop;
if (!is_opclause(clause))
return false;
leftop = (Node *) get_leftop((Expr *) clause);
rightop = (Node *) get_rightop((Expr *) clause);
if (!rightop)
return false; /* unary opclauses need not apply */
/* How about Param-s ? - vadim 02/03/98 */
if (IsA(leftop, Var) &&IsA(rightop, Const))
return true;
if (IsA(rightop, Var) &&IsA(leftop, Const))
return true;
return false;
}
/* /*
* fix_opids * fix_opids
* Calculate opid field from opno for each Oper node in given tree. * Calculate opid field from opno for each Oper node in given tree.
...@@ -644,24 +587,16 @@ static int is_single_func(Node *node) ...@@ -644,24 +587,16 @@ static int is_single_func(Node *node)
{ {
if (is_funcclause(node)) if (is_funcclause(node))
{ {
List *vars = pull_var_clause(node); List *varnos = pull_varnos(node);
if (vars != NIL) if (length(varnos) == 1)
{ {
int funcvarno = ((Var *) lfirst(vars))->varno; int funcvarno = lfirsti(varnos);
List *v;
/* need to check that all args of func are same relation */ freeList(varnos);
foreach(v, lnext(vars))
{
if (((Var *) lfirst(v))->varno != funcvarno)
{
funcvarno = 0;
break;
}
}
freeList(vars);
return funcvarno; return funcvarno;
} }
freeList(varnos);
} }
return 0; return 0;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.37 1999/08/09 05:34:13 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.38 1999/08/10 03:00:15 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -285,37 +285,31 @@ copy_vars(List *target, List *source) ...@@ -285,37 +285,31 @@ copy_vars(List *target, List *source)
List * List *
flatten_tlist(List *tlist) flatten_tlist(List *tlist)
{ {
List *vlist = pull_var_clause((Node *) tlist);
int last_resdomno = 1; int last_resdomno = 1;
List *new_tlist = NIL; List *new_tlist = NIL;
List *tl; List *v;
foreach(tl, tlist) foreach(v, vlist)
{ {
TargetEntry *tl_entry = (TargetEntry *) lfirst(tl); Var *var = lfirst(v);
List *vlist = pull_var_clause((Node *) get_expr(tl_entry));
List *v;
foreach(v, vlist) if (! tlistentry_member(var, new_tlist))
{ {
Var *var = lfirst(v); Resdom *r;
if (! tlistentry_member(var, new_tlist)) r = makeResdom(last_resdomno++,
{ var->vartype,
Resdom *r; var->vartypmod,
NULL,
r = makeResdom(last_resdomno++, (Index) 0,
var->vartype, (Oid) 0,
var->vartypmod, false);
NULL, new_tlist = lappend(new_tlist,
(Index) 0, makeTargetEntry(r, (Node *) var));
(Oid) 0,
false);
new_tlist = lappend(new_tlist,
makeTargetEntry(r, (Node *) var));
}
} }
freeList(vlist);
} }
freeList(vlist);
return new_tlist; return new_tlist;
} }
...@@ -334,20 +328,8 @@ flatten_tlist(List *tlist) ...@@ -334,20 +328,8 @@ flatten_tlist(List *tlist)
List * List *
flatten_tlist_vars(List *full_tlist, List *flat_tlist) flatten_tlist_vars(List *full_tlist, List *flat_tlist)
{ {
List *result = NIL; return (List *) flatten_tlist_vars_mutator((Node *) full_tlist,
List *x; flat_tlist);
foreach(x, full_tlist)
{
TargetEntry *tle = lfirst(x);
result = lappend(result,
makeTargetEntry(tle->resdom,
flatten_tlist_vars_mutator((Node *) get_expr(tle),
flat_tlist)));
}
return result;
} }
static Node * static Node *
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.21 1999/07/15 22:39:32 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.22 1999/08/10 03:00:15 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -15,12 +15,10 @@ ...@@ -15,12 +15,10 @@
#include "postgres.h" #include "postgres.h"
#include "optimizer/clauses.h" #include "optimizer/clauses.h"
#include "optimizer/var.h" #include "optimizer/var.h"
static bool pull_varnos_walker(Node *node, List **listptr); static bool pull_varnos_walker(Node *node, List **listptr);
static bool contain_var_clause_walker(Node *node, void *context); static bool contain_var_clause_walker(Node *node, void *context);
static bool pull_var_clause_walker(Node *node, List **listptr); static bool pull_var_clause_walker(Node *node, List **listptr);
...@@ -111,22 +109,23 @@ pull_var_clause_walker(Node *node, List **listptr) ...@@ -111,22 +109,23 @@ pull_var_clause_walker(Node *node, List **listptr)
/* /*
* var_equal * var_equal
* *
* The only difference between this an equal() is that this does not * This is like equal() except that it does NOT test varnoold and
* test varnoold and varoattno. * varoattno. Also, it will not compare non-Var nodes.
* *
* Returns t iff two var nodes correspond to the same attribute. * Returns t iff two var nodes correspond to the same attribute.
*/ */
bool bool
var_equal(Var *var1, Var *var2) var_equal(Var *var1, Var *var2)
{ {
if (IsA(var1, Var) &&IsA(var2, Var) && if (var1 != NULL && IsA(var1, Var) &&
(((Var *) var1)->varno == ((Var *) var2)->varno) && var2 != NULL && IsA(var2, Var) &&
(((Var *) var1)->vartype == ((Var *) var2)->vartype) && var1->varno == var2->varno &&
(((Var *) var1)->vartypmod == ((Var *) var2)->vartypmod) && var1->varattno == var2->varattno &&
(((Var *) var1)->varlevelsup == ((Var *) var2)->varlevelsup) && var1->vartype == var2->vartype &&
(((Var *) var1)->varattno == ((Var *) var2)->varattno)) var1->vartypmod == var2->vartypmod &&
var1->varlevelsup == var2->varlevelsup)
{ {
Assert(((Var *) var1)->varlevelsup == 0); Assert(var1->varlevelsup == 0); /* XXX why do this here??? */
return true; return true;
} }
else else
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: clauses.h,v 1.25 1999/08/09 00:51:23 tgl Exp $ * $Id: clauses.h,v 1.26 1999/08/10 03:00:12 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -37,13 +37,10 @@ extern Expr *make_andclause(List *andclauses); ...@@ -37,13 +37,10 @@ extern Expr *make_andclause(List *andclauses);
extern Expr *make_ands_explicit(List *andclauses); extern Expr *make_ands_explicit(List *andclauses);
extern List *make_ands_implicit(Expr *clause); extern List *make_ands_implicit(Expr *clause);
extern bool case_clause(Node *clause);
extern List *pull_constant_clauses(List *quals, List **constantQual); extern List *pull_constant_clauses(List *quals, List **constantQual);
extern void clause_get_relids_vars(Node *clause, Relids *relids, List **vars); extern void clause_get_relids_vars(Node *clause, Relids *relids, List **vars);
extern int NumRelids(Node *clause); extern int NumRelids(Node *clause);
extern bool is_joinable(Node *clause); extern bool is_joinable(Node *clause);
extern bool qual_clause_p(Node *clause);
extern List *fix_opids(List *clauses); extern List *fix_opids(List *clauses);
extern void get_relattval(Node *clause, int targetrelid, extern void get_relattval(Node *clause, int targetrelid,
int *relid, AttrNumber *attno, int *relid, AttrNumber *attno,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment