diff options
Diffstat (limited to 'contrib/jsonb_plpython')
-rw-r--r-- | contrib/jsonb_plpython/jsonb_plpython.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/jsonb_plpython/jsonb_plpython.c b/contrib/jsonb_plpython/jsonb_plpython.c index 08a7598aae3..645238f15b3 100644 --- a/contrib/jsonb_plpython/jsonb_plpython.c +++ b/contrib/jsonb_plpython/jsonb_plpython.c @@ -325,8 +325,13 @@ PLyNumber_ToJsonbValue(PyObject *obj, JsonbValue *jbvNum) PG_TRY(); { - num = DatumGetNumeric(DirectFunctionCall3(numeric_in, - CStringGetDatum(str), 0, -1)); + Datum numd; + + numd = DirectFunctionCall3(numeric_in, + CStringGetDatum(str), + ObjectIdGetDatum(InvalidOid), + Int32GetDatum(-1)); + num = DatumGetNumeric(numd); } PG_CATCH(); { |