Re: ​function arguments are not PG_FUNCTION_ARGS, how to pass Node *escontext

2023-06-26 Thread Andrew Dunstan
On 2023-06-26 Mo 09:45, jian he wrote: On Mon, Jun 26, 2023 at 9:32 PM jian he wrote: > > On Mon, Jun 26, 2023 at 7:50 PM Andrew Dunstan wrote: > > > > > > On 2023-06-26 Mo 07:20, jian he wrote: > > > > static > > Datum return_numeric_datum(char *token) > > { > >     Datum   numd; > >  

Re: ​function arguments are not PG_FUNCTION_ARGS, how to pass Node *escontext

2023-06-26 Thread jian he
On Mon, Jun 26, 2023 at 9:32 PM jian he wrote: > > On Mon, Jun 26, 2023 at 7:50 PM Andrew Dunstan wrote: > > > > > > On 2023-06-26 Mo 07:20, jian he wrote: > > > > static > > Datum return_numeric_datum(char *token) > > { > > Datum numd; > > Node*escontext; > > > > if (!DirectInp

Re: ​function arguments are not PG_FUNCTION_ARGS, how to pass Node *escontext

2023-06-26 Thread jian he
On Mon, Jun 26, 2023 at 7:50 PM Andrew Dunstan wrote: > > > On 2023-06-26 Mo 07:20, jian he wrote: > > static > Datum return_numeric_datum(char *token) > { > Datum numd; > Node*escontext; > > if (!DirectInputFunctionCallSafe(numeric_in, token, >

Re: ​function arguments are not PG_FUNCTION_ARGS, how to pass Node *escontext

2023-06-26 Thread Andrew Dunstan
On 2023-06-26 Mo 07:20, jian he wrote: static Datum return_numeric_datum(char *token) { Datum numd; Node*escontext; if (!DirectInputFunctionCallSafe(numeric_in, token, InvalidOid, -1, escontext,

​function arguments are not PG_FUNCTION_ARGS, how to pass Node *escontext

2023-06-26 Thread jian he
hi. simple question The following one works. Datum test_direct_inputcall(PG_FUNCTION_ARGS) { char*token = PG_GETARG_CSTRING(0); Datum numd; if (!DirectInputFunctionCallSafe(numeric_in, token,