提交 65e1d6a8 编写于 作者: H Heikki Linnakangas

Revert unnecessary GPDB changes to dead code.

In int8.c: No one compiles GPDB with !USE_FLOAT8_BYVAL. I guess it should
work in theory, but it hasn't been tested for ages. This makes int8.c
100% identical to upstream

In ruleutils.c: elog(ERROR) never returns, so this was dead code.
上级 b0c938c4
......@@ -689,9 +689,9 @@ int8inc(PG_FUNCTION_ARGS)
int64 *arg = (int64 *) PG_GETARG_POINTER(0);
int64 result;
result = arg + 1;
result = *arg + 1;
/* Overflow check */
if (result < 0 && arg > 0)
if (result < 0 && *arg > 0)
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("bigint out of range")));
......
......@@ -5809,10 +5809,7 @@ get_variable(Var *var, int levelsup, bool istoplevel, deparse_context *context)
tle = get_tle_by_resno(dpns->outer_tlist, var->varattno);
if (!tle)
{
elog(ERROR, "bogus varattno for OUTER_VAR var: %d", var->varattno);
return NULL;
}
Assert(netlevelsup == 0);
push_child_plan(dpns, dpns->outer_planstate, &save_dpns);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册