converting datum to numeric - Mailing list pgsql-hackers

From Szymon Guz
Subject converting datum to numeric
Date
Msg-id CAFjNrYv7_bBWHz8cAXAmeLGw9zJoiWqVp2W8BU4Tz5ivGxeuWQ@mail.gmail.com
Whole thread
Responses Re: converting datum to numeric
List pgsql-hackers
Hi,
I've got a couple of questions.

I was using numeric_out like this:

DatumGetCString(DirectFunctionCall1(numeric_out, d));

Why do I have to use DirectFunctionCall1 instead of calling numeric_out?


I was suggested to use numeric_send instead of numeric_out, however when changing the function names in the above example, the whole expression returns 8. Always 8. I check with:

char *x = DatumGetCString(DirectFunctionCall1(numeric_send, d));
PLy_elog(NOTICE, x).


And my main question: is there any documentation about those internal functions, which use and when etc?

thanks
Szymon

pgsql-hackers by date:

Previous
From: Hari Babu
Date:
Subject: Re: fixing pg_ctl with relative paths
Next
From: Simon Riggs
Date:
Subject: Re: [RFC] Minmax indexes