Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8722a1a

Browse files
committed
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 2f0f7b4 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
1 parent 4a90181 commit 8722a1a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/pl/plpgsql/src/pl_exec.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -5850,8 +5850,7 @@ exec_simple_recheck_plan(PLpgSQL_expr *expr, CachedPlan *cplan)
58505850
}
58515851

58525852
/* ----------
5853-
* exec_set_found Set the global found variable
5854-
* to true/false
5853+
* exec_set_found Set the global found variable to true/false
58555854
* ----------
58565855
*/
58575856
static void
@@ -5860,7 +5859,7 @@ exec_set_found(PLpgSQL_execstate *estate, bool state)
58605859
PLpgSQL_var *var;
58615860

58625861
var = (PLpgSQL_var *) (estate->datums[estate->found_varno]);
5863-
var->value = PointerGetDatum(state);
5862+
var->value = BoolGetDatum(state);
58645863
var->isnull = false;
58655864
}
58665865

0 commit comments

Comments
 (0)