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

Поиск
Список
Период
Сортировка
От jian he
Тема Re: ​function arguments are not PG_FUNCTION_ARGS, how to pass Node *escontext
Дата
Msg-id CACJufxF6uS4oT7U1Nj-6ypfJtQwv5toZSgoqYZ=sb1a+EHwtAg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ​function arguments are not PG_FUNCTION_ARGS, how to pass Node *escontext  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: ​function arguments are not PG_FUNCTION_ARGS, how to pass Node *escontext  (jian he <jian.universality@gmail.com>)
Список pgsql-hackers
On Mon, Jun 26, 2023 at 7:50 PM Andrew Dunstan <andrew@dunslane.net> 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,
>                                     InvalidOid, -1,
>                                     escontext,
>                                     &numd));
>         elog(INFO,"something is wrong");
>     return numd;
> }
>
>
> To start with, the semicolon at the end of that if appears bogus. The elog is indented to look like it's conditioned
bythe if but the semicolon makes it not be. 
>
> There are compiler switches in modern gcc at least that help you detect things like this.
>
>
> cheers
>
>
> andrew
>
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com


sorry. It was my mistake.

>     Node    *escontext;
>     if (!DirectInputFunctionCallSafe(numeric_in, token,
>                                     InvalidOid, -1,
>                                     escontext,
>                                     &numd))
>         elog(INFO,"something is wrong");

I wonder about the implication of just declaring Node *escontext in here.
In this DirectInputFunctionCallSafe, what does escontext point to.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: logical decoding and replication of sequences, take 2
Следующее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: [Patch] Use *other* indexes on the subscriber when REPLICA IDENTITY is FULL