aboutsummaryrefslogtreecommitdiff
path: root/src/pl/plpython
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2022-10-07 13:13:27 +1300
committerDavid Rowley <drowley@postgresql.org>2022-10-07 13:13:27 +1300
commitcd4e8caaa0eb5c3d3b12a45b29035e7a4bdfa4a8 (patch)
tree1224839ecbcbd206305dc3bf12403ab3e42e3488 /src/pl/plpython
parent4289263cf263ba36e474728f4a02ceb086903f81 (diff)
downloadpostgresql-cd4e8caaa0eb5c3d3b12a45b29035e7a4bdfa4a8.tar.gz
postgresql-cd4e8caaa0eb5c3d3b12a45b29035e7a4bdfa4a8.zip
Fix final warnings produced by -Wshadow=compatible-local
I thought I had these in d8df67bb1, but per report from Andres Freund, I missed some. Reviewed-by: Andres Freund Discussion: https://postgr.es/m/20221005214052.c4tkudawyp5wxt3c@awork3.anarazel.de
Diffstat (limited to 'src/pl/plpython')
-rw-r--r--src/pl/plpython/plpy_cursorobject.c6
-rw-r--r--src/pl/plpython/plpy_exec.c2
-rw-r--r--src/pl/plpython/plpy_spi.c6
3 files changed, 6 insertions, 8 deletions
diff --git a/src/pl/plpython/plpy_cursorobject.c b/src/pl/plpython/plpy_cursorobject.c
index 6b6e7433453..57e8f8ec217 100644
--- a/src/pl/plpython/plpy_cursorobject.c
+++ b/src/pl/plpython/plpy_cursorobject.c
@@ -215,18 +215,18 @@ PLy_cursor_plan(PyObject *ob, PyObject *args)
PyObject *elem;
elem = PySequence_GetItem(args, j);
- PG_TRY();
+ PG_TRY(2);
{
bool isnull;
plan->values[j] = PLy_output_convert(arg, elem, &isnull);
nulls[j] = isnull ? 'n' : ' ';
}
- PG_FINALLY();
+ PG_FINALLY(2);
{
Py_DECREF(elem);
}
- PG_END_TRY();
+ PG_END_TRY(2);
}
portal = SPI_cursor_open(NULL, plan->plan, plan->values, nulls,
diff --git a/src/pl/plpython/plpy_exec.c b/src/pl/plpython/plpy_exec.c
index 150b3a5977f..923703535a7 100644
--- a/src/pl/plpython/plpy_exec.c
+++ b/src/pl/plpython/plpy_exec.c
@@ -375,8 +375,6 @@ PLy_exec_trigger(FunctionCallInfo fcinfo, PLyProcedure *proc)
rv = NULL;
else if (pg_strcasecmp(srv, "MODIFY") == 0)
{
- TriggerData *tdata = (TriggerData *) fcinfo->context;
-
if (TRIGGER_FIRED_BY_INSERT(tdata->tg_event) ||
TRIGGER_FIRED_BY_UPDATE(tdata->tg_event))
rv = PLy_modify_tuple(proc, plargs, tdata, rv);
diff --git a/src/pl/plpython/plpy_spi.c b/src/pl/plpython/plpy_spi.c
index 9a71a42c15f..6b9f8d5b438 100644
--- a/src/pl/plpython/plpy_spi.c
+++ b/src/pl/plpython/plpy_spi.c
@@ -236,18 +236,18 @@ PLy_spi_execute_plan(PyObject *ob, PyObject *list, long limit)
PyObject *elem;
elem = PySequence_GetItem(list, j);
- PG_TRY();
+ PG_TRY(2);
{
bool isnull;
plan->values[j] = PLy_output_convert(arg, elem, &isnull);
nulls[j] = isnull ? 'n' : ' ';
}
- PG_FINALLY();
+ PG_FINALLY(2);
{
Py_DECREF(elem);
}
- PG_END_TRY();
+ PG_END_TRY(2);
}
rv = SPI_execute_plan(plan->plan, plan->values, nulls,