Thread: how to get argument number

how to get argument number

From
"帅猛"
Date:
  I create a funtion with C ,i want to know how many argument number i have got;
which macro i can use?,PG_GETARGV_INT16 or other macro ? thanks!


        
        shuaimeng@db.pku.edu.cn
          2002-12-01



Re: how to get argument number

From
Tom Lane
Date:
"=?GB2312?Q?=CB=A7=C3=CD?=" <shuaimeng@db.pku.edu.cn> writes:
>   I create a funtion with C ,i want to know how many argument number i have got;
> which macro i can use?,PG_GETARGV_INT16 or other macro ? thanks!

PG_NARGS()

Of course, this will only be useful if you make multiple pg_proc entries
pointing at the same C function.

            regards, tom lane