* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.4 2001/06/01 18:17:44 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.5 2001/09/12 03:03:25 momjian Exp $
*
*********************************************************************
*/
{
DECLARE_EXC();
TriggerData *tdata;
- PyObject *pltname, *pltevent, *pltwhen, *pltlevel;
+ PyObject *pltname, *pltevent, *pltwhen, *pltlevel, *pltrelid;
PyObject *pltargs, *pytnew, *pytold;
PyObject *pltdata = NULL;
+ char *stroid;
enter();
PyDict_SetItemString(pltdata, "name", pltname);
Py_DECREF(pltname);
+ stroid = DatumGetCString(DirectFunctionCall1(oidout,
+ ObjectIdGetDatum(tdata->tg_relation->rd_id)));
+ pltrelid = PyString_FromString(stroid);
+ PyDict_SetItemString(pltdata, "relid", pltrelid);
+ Py_DECREF(pltrelid);
+ pfree(stroid);
+
+
+
if (TRIGGER_FIRED_BEFORE(tdata->tg_event))
pltwhen = PyString_FromString("BEFORE");
else if (TRIGGER_FIRED_AFTER(tdata->tg_event))