1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Get rid of COERCE_DONTCARE.

We don't need this hack any more.
This commit is contained in:
Tom Lane
2012-10-12 13:35:00 -04:00
parent 427fd88552
commit a29f7ed554
7 changed files with 16 additions and 18 deletions

View File

@@ -431,13 +431,13 @@ canonicalize_ec_expression(Expr *expr, Oid req_type, Oid req_collation)
req_type,
-1,
req_collation,
COERCE_DONTCARE);
COERCE_IMPLICIT_CAST);
else if (exprCollation((Node *) expr) != req_collation)
expr = (Expr *) makeRelabelType(expr,
req_type,
exprTypmod((Node *) expr),
req_collation,
COERCE_DONTCARE);
COERCE_IMPLICIT_CAST);
}
return expr;

View File

@@ -982,7 +982,7 @@ generate_setop_tlist(List *colTypes, List *colCollations,
exprType(expr),
exprTypmod(expr),
colColl,
COERCE_DONTCARE);
COERCE_IMPLICIT_CAST);
}
tle = makeTargetEntry((Expr *) expr,

View File

@@ -2789,7 +2789,7 @@ eval_const_expressions_mutator(Node *node,
relabel->resulttype = exprType(arg);
relabel->resulttypmod = exprTypmod(arg);
relabel->resultcollid = collate->collOid;
relabel->relabelformat = COERCE_DONTCARE;
relabel->relabelformat = COERCE_IMPLICIT_CAST;
relabel->location = collate->location;
/* Don't create stacked RelabelTypes */
@@ -3625,7 +3625,7 @@ simplify_function(Oid funcid, Oid result_type, int32 result_typmod,
fexpr.funcid = funcid;
fexpr.funcresulttype = result_type;
fexpr.funcretset = func_form->proretset;
fexpr.funcformat = COERCE_DONTCARE;
fexpr.funcformat = COERCE_EXPLICIT_CALL;
fexpr.funccollid = result_collid;
fexpr.inputcollid = input_collid;
fexpr.args = args;
@@ -3959,7 +3959,7 @@ evaluate_function(Oid funcid, Oid result_type, int32 result_typmod,
newexpr->funcid = funcid;
newexpr->funcresulttype = result_type;
newexpr->funcretset = false;
newexpr->funcformat = COERCE_DONTCARE; /* doesn't matter */
newexpr->funcformat = COERCE_EXPLICIT_CALL; /* doesn't matter */
newexpr->funccollid = result_collid; /* doesn't matter */
newexpr->inputcollid = input_collid;
newexpr->args = args;
@@ -4089,7 +4089,7 @@ inline_function(Oid funcid, Oid result_type, Oid result_collid,
fexpr->funcid = funcid;
fexpr->funcresulttype = result_type;
fexpr->funcretset = false;
fexpr->funcformat = COERCE_DONTCARE; /* doesn't matter */
fexpr->funcformat = COERCE_EXPLICIT_CALL; /* doesn't matter */
fexpr->funccollid = result_collid; /* doesn't matter */
fexpr->inputcollid = input_collid;
fexpr->args = args;