Re: converting datum to numeric
От | Szymon Guz |
---|---|
Тема | Re: converting datum to numeric |
Дата | |
Msg-id | CAFjNrYsLOLjhbfQj5GXj+nqowXyWhebEQgcbap3ZGc-n0Qh=qg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: converting datum to numeric (Pavel Stehule <pavel.stehule@gmail.com>) |
Список | pgsql-hackers |
On 25 June 2013 08:51, Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hello
2013/6/25 Szymon Guz <mabewlun@gmail.com>:> Hi,numeric_out functions doesn't use C calling convention - it use own
> 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?
convention for support NULL values and some other informations.
DirectFunctionCall1 is simple function that transform C like call to
PostgreSQL call. You can do it directly, but you have to prepare
necessary structures."send" functions are used for binary protocol - so it is nonsense.
>
>
> 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).
>
Hi,
thanks for the information. So I will leave speeding it up for this moment.
thanks,
Szymon
В списке pgsql-hackers по дате отправления: