mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Remove unused constisset and constiscast fields of Const nodes. Clean
up code and documentation associated with Param nodes.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.52 2002/10/19 02:56:16 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.53 2002/11/25 21:29:39 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -29,8 +29,7 @@
|
||||
|
||||
/* note that pg_type.h hardwires size of bool as 1 ... duplicate it */
|
||||
#define MAKEBOOLCONST(val,isnull) \
|
||||
((Node *) makeConst(BOOLOID, 1, (Datum) (val), \
|
||||
(isnull), true, false, false))
|
||||
((Node *) makeConst(BOOLOID, 1, (Datum) (val), (isnull), true))
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.125 2002/11/24 21:52:14 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.126 2002/11/25 21:29:39 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2167,7 +2167,7 @@ network_prefix_quals(Var *leftop, Oid expr_op, Datum rightop)
|
||||
op = makeOper(opr1oid, InvalidOid, BOOLOID, false);
|
||||
expr = make_opclause(op, leftop,
|
||||
(Var *) makeConst(datatype, -1, opr1right,
|
||||
false, false, false, false));
|
||||
false, false));
|
||||
result = makeList1(expr);
|
||||
|
||||
/* create clause "key <= network_scan_last( rightop )" */
|
||||
@@ -2182,7 +2182,7 @@ network_prefix_quals(Var *leftop, Oid expr_op, Datum rightop)
|
||||
op = makeOper(opr2oid, InvalidOid, BOOLOID, false);
|
||||
expr = make_opclause(op, leftop,
|
||||
(Var *) makeConst(datatype, -1, opr2right,
|
||||
false, false, false, false));
|
||||
false, false));
|
||||
result = lappend(result, expr);
|
||||
|
||||
return result;
|
||||
@@ -2233,5 +2233,5 @@ string_to_const(const char *str, Oid datatype)
|
||||
Datum conval = string_to_datum(str, datatype);
|
||||
|
||||
return makeConst(datatype, ((datatype == NAMEOID) ? NAMEDATALEN : -1),
|
||||
conval, false, false, false, false);
|
||||
conval, false, false);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.57 2002/09/18 21:35:21 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.58 2002/11/25 21:29:40 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -183,9 +183,7 @@ expand_targetlist(List *tlist, int command_type,
|
||||
att_tup->attlen,
|
||||
(Datum) 0,
|
||||
true, /* isnull */
|
||||
att_tup->attbyval,
|
||||
false, /* not a set */
|
||||
false);
|
||||
att_tup->attbyval);
|
||||
if (!att_tup->attisdropped)
|
||||
new_expr = coerce_type_constraints(new_expr,
|
||||
atttype,
|
||||
@@ -198,9 +196,7 @@ expand_targetlist(List *tlist, int command_type,
|
||||
att_tup->attlen,
|
||||
(Datum) 0,
|
||||
true, /* isnull */
|
||||
att_tup->attbyval,
|
||||
false, /* not a set */
|
||||
false);
|
||||
att_tup->attbyval);
|
||||
else
|
||||
new_expr = (Node *) makeVar(result_relation,
|
||||
attrno,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.80 2002/09/18 21:35:21 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.81 2002/11/25 21:29:40 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -448,9 +448,7 @@ generate_setop_tlist(List *colTypes, int flag,
|
||||
sizeof(int4),
|
||||
Int32GetDatum(flag),
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false);
|
||||
true);
|
||||
tlist = lappend(tlist, makeTargetEntry(resdom, expr));
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.111 2002/11/15 02:50:07 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.112 2002/11/25 21:29:40 tgl Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@@ -36,8 +36,7 @@
|
||||
|
||||
/* note that pg_type.h hardwires size of bool as 1 ... duplicate it */
|
||||
#define MAKEBOOLCONST(val,isnull) \
|
||||
((Node *) makeConst(BOOLOID, 1, (Datum) (val), \
|
||||
(isnull), true, false, false))
|
||||
((Node *) makeConst(BOOLOID, 1, (Datum) (val), (isnull), true))
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -666,7 +665,8 @@ check_subplans_for_ungrouped_vars_walker(Node *node,
|
||||
|
||||
if (node == NULL)
|
||||
return false;
|
||||
if (IsA(node, Const) ||IsA(node, Param))
|
||||
if (IsA(node, Const) ||
|
||||
IsA(node, Param))
|
||||
return false; /* constants are always acceptable */
|
||||
|
||||
/*
|
||||
@@ -1286,8 +1286,8 @@ eval_const_expressions_mutator(Node *node, void *context)
|
||||
* Make the constant result node.
|
||||
*/
|
||||
return (Node *) makeConst(result_typeid, resultTypLen,
|
||||
const_val, const_is_null,
|
||||
resultTypByVal, false, false);
|
||||
const_val, const_is_null,
|
||||
resultTypByVal);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1734,7 +1734,7 @@ simplify_op_or_func(Expr *expr, List *args)
|
||||
*/
|
||||
return (Expr *) makeConst(result_typeid, resultTypLen,
|
||||
const_val, const_is_null,
|
||||
resultTypByVal, false, false);
|
||||
resultTypByVal);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user