ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes:
> I tried fixing this by adding an 'if (SvUV(in))' clause to
> SV_to_JsonbValue, but I couldn't find a function to create a numeric
> value from an uint64. If it's not possible, should we error on UVs
> greater than PG_INT64_MAX?
I think you'd have to convert to text and back. That's kind of icky,
but it beats failing.
Or we could add a not-visible-to-SQL uint8-to-numeric function in
numeric.c. Not sure if this is enough use-case to justify that
though.
regards, tom lane