Hi, I need to store a global pointer for plpython usage. This is a PyObject* which can be initialized per session I think
Where should I keep such a pointer?
Hi,
you probably could use a global variable, similar to PLy_interp_globals that's defined in plpy_main.c.
Another method would be to expose the Decimal constructor in the plpy module. You could modify plpy_plpymodule.c to import decimal and expose the Decimal constructor as plpy.Decimal.
Best, Jan
I think I'd rather go with the first solution, as this function should not be accessible inside the plpython function. That's what I was thinking about as well, but I wasn't sure.