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

Lines changed: 2 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy