summaryrefslogtreecommitdiffstats
path: root/src/pl/plpython
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl/plpython')
-rw-r--r--src/pl/plpython/plpy_exec.c12
-rw-r--r--src/pl/plpython/po/ru.po18
2 files changed, 17 insertions, 13 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);
diff --git a/src/pl/plpython/po/ru.po b/src/pl/plpython/po/ru.po
index b632dba..82efe98 100644
--- a/src/pl/plpython/po/ru.po
+++ b/src/pl/plpython/po/ru.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: plpython (PostgreSQL current)\n"
"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
-"POT-Creation-Date: 2023-11-03 09:09+0300\n"
+"POT-Creation-Date: 2024-05-04 10:36+0300\n"
"PO-Revision-Date: 2023-05-05 06:34+0300\n"
"Last-Translator: Alexander Lakhin <exclusion@gmail.com>\n"
"Language-Team: Russian <pgsql-ru-general@postgresql.org>\n"
@@ -156,22 +156,22 @@ msgstr ""
msgid "while creating return value"
msgstr "при создании возвращаемого значения"
-#: plpy_exec.c:926
+#: plpy_exec.c:930
#, c-format
msgid "TD[\"new\"] deleted, cannot modify row"
msgstr "элемент TD[\"new\"] удалён -- изменить строку нельзя"
-#: plpy_exec.c:931
+#: plpy_exec.c:935
#, c-format
msgid "TD[\"new\"] is not a dictionary"
msgstr "TD[\"new\"] - не словарь"
-#: plpy_exec.c:956
+#: plpy_exec.c:960
#, c-format
msgid "TD[\"new\"] dictionary key at ordinal position %d is not a string"
msgstr "ключ словаря TD[\"new\"] с порядковым номером %d не является строкой"
-#: plpy_exec.c:963
+#: plpy_exec.c:967
#, c-format
msgid ""
"key \"%s\" found in TD[\"new\"] does not exist as a column in the triggering "
@@ -180,22 +180,22 @@ msgstr ""
"ключу \"%s\", найденному в TD[\"new\"], не соответствует столбец в строке, "
"обрабатываемой триггером"
-#: plpy_exec.c:968
+#: plpy_exec.c:972
#, c-format
msgid "cannot set system attribute \"%s\""
msgstr "присвоить значение системному атрибуту \"%s\" нельзя"
-#: plpy_exec.c:973
+#: plpy_exec.c:977
#, c-format
msgid "cannot set generated column \"%s\""
msgstr "присвоить значение генерируемому столбцу \"%s\" нельзя"
-#: plpy_exec.c:1031
+#: plpy_exec.c:1035
#, c-format
msgid "while modifying trigger row"
msgstr "при изменении строки в триггере"
-#: plpy_exec.c:1089
+#: plpy_exec.c:1093
#, c-format
msgid "forcibly aborting a subtransaction that has not been exited"
msgstr "принудительное прерывание незавершённой подтранзакции"