Re: Oracle Decode Function
От | Tom Lane |
---|---|
Тема | Re: Oracle Decode Function |
Дата | |
Msg-id | 25849.1027698217@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Oracle Decode Function (Marc Lavergne <mlavergne-pub@richlava.com>) |
Список | pgsql-hackers |
Marc Lavergne <mlavergne-pub@richlava.com> writes: >>> contrib/fulltextindex/fti.c uses variable numbers of arguments... > I see the code, but maybe I don't SEE the code. I'm only on my second > cup of coffee so I may be missing something but I am not betting any > money in it :) Fulltextindex appears to work because it's called within > a trigger but I don't think you can get the parser not to complain about > arguments when your function is not called internally by the trigger > manager. Right, fti.c is using a variable number of *trigger* arguments, which is a whole different can of worms. What you can do, if you are so inclined, is to rely on function overloading to make several pg_proc entries of the same name and different numbers of arguments that all point at the same underlying C function. Then the C function would have to check how many arguments it was actually passed. Slightly ugly, but doable. There is some stuff in fmgr.h that anticipates a future feature of real varargs function declarations ... but we don't support it yet. regards, tom lane
В списке pgsql-hackers по дате отправления: