Commit 8722a1a0 authored by Tom Lane's avatar Tom Lane

Use the proper macro to convert a bool to a Datum.

The original coding was
	var->value = (Datum) state;
which is bogus, and then in commit 2f0f7b4b
it was "corrected" to
	var->value = PointerGetDatum(state);
which is a faithful translation but still wrong.

This seems purely cosmetic, though, so no need for a back-patch.

Pavel Stehule
parent 4a901813
...@@ -5850,8 +5850,7 @@ exec_simple_recheck_plan(PLpgSQL_expr *expr, CachedPlan *cplan) ...@@ -5850,8 +5850,7 @@ exec_simple_recheck_plan(PLpgSQL_expr *expr, CachedPlan *cplan)
} }
/* ---------- /* ----------
* exec_set_found Set the global found variable * exec_set_found Set the global found variable to true/false
* to true/false
* ---------- * ----------
*/ */
static void static void
...@@ -5860,7 +5859,7 @@ exec_set_found(PLpgSQL_execstate *estate, bool state) ...@@ -5860,7 +5859,7 @@ exec_set_found(PLpgSQL_execstate *estate, bool state)
PLpgSQL_var *var; PLpgSQL_var *var;
var = (PLpgSQL_var *) (estate->datums[estate->found_varno]); var = (PLpgSQL_var *) (estate->datums[estate->found_varno]);
var->value = PointerGetDatum(state); var->value = BoolGetDatum(state);
var->isnull = false; var->isnull = false;
} }
......
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