1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-17 06:41:09 +03:00

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
This commit is contained in:
David Rowley
2022-10-07 13:13:27 +13:00
parent 4289263cf2
commit cd4e8caaa0
10 changed files with 32 additions and 43 deletions

View File

@ -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,

View File

@ -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);

View File

@ -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,