On Fri, 8 Jun 2018 at 13:27, Geoff Winkless <pgsqladmin@xxxxxxxx> wrote: > numeric_in looks like it might do what I want but to do that I would > have to build a FunctionCallInfo struct to do that, and I'm not 100% > clear how to do that either :( Answering my own question, looks like res = DatumGetNumeric(DirectFunctionCall3(numeric_in, CStringGetDatum(buf), 0, -1)); should do it, judging from https://api.pgxn.org/src/orafce/orafce-3.6.1/convert.c Geoff