diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 05:05:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 05:05:26 +0000 |
commit | e75d99818dd3940be997520e64db8c9e3b207e39 (patch) | |
tree | 0003ca0de74fcc8d18433e34ea68d2e7aaf06b7c /src/pl/plpython/plpy_exec.c | |
parent | Releasing progress-linux version 15.6-0+deb12u1~progress6.99u1. (diff) | |
download | postgresql-15-e75d99818dd3940be997520e64db8c9e3b207e39.tar.xz postgresql-15-e75d99818dd3940be997520e64db8c9e3b207e39.zip |
Merging upstream version 15.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/pl/plpython/plpy_exec.c')
-rw-r--r-- | src/pl/plpython/plpy_exec.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/pl/plpython/plpy_exec.c b/src/pl/plpython/plpy_exec.c index 993a4e2..953c2d4 100644 --- a/src/pl/plpython/plpy_exec.c +++ b/src/pl/plpython/plpy_exec.c @@ -691,7 +691,7 @@ PLy_trigger_build_args(FunctionCallInfo fcinfo, PLyProcedure *proc, HeapTuple *r *pltrelid, *plttablename, *plttableschema, - *pltargs = NULL, + *pltargs, *pytnew, *pytold, *pltdata; @@ -715,6 +715,11 @@ PLy_trigger_build_args(FunctionCallInfo fcinfo, PLyProcedure *proc, HeapTuple *r return NULL; } } + else + { + Py_INCREF(Py_None); + pltargs = Py_None; + } PG_TRY(); { @@ -858,7 +863,7 @@ PLy_trigger_build_args(FunctionCallInfo fcinfo, PLyProcedure *proc, HeapTuple *r PyObject *pltarg; /* pltargs should have been allocated before the PG_TRY block. */ - Assert(pltargs); + Assert(pltargs && pltargs != Py_None); for (i = 0; i < tdata->tg_trigger->tgnargs; i++) { @@ -872,8 +877,7 @@ PLy_trigger_build_args(FunctionCallInfo fcinfo, PLyProcedure *proc, HeapTuple *r } else { - Py_INCREF(Py_None); - pltargs = Py_None; + Assert(pltargs == Py_None); } PyDict_SetItemString(pltdata, "args", pltargs); Py_DECREF(pltargs); |