Hi, is there a possibility to check the type of the nth argument of PG_FUNCTION_ARGS ? I'm trying to add another (optional) argument to a function that already has an optional one. So I need to know if the 4th arg is of type TEXT (or not of INT32). TIA -- e-Trolley Sayegh & John, Nabil Sayegh Tel.: 0700 etrolley /// 0700 38765539 Fax.: +49 69 8299381-8 PGP : http://www.e-trolley.de
Nabil Sayegh wrote: > is there a possibility to check the type of the nth argument of > PG_FUNCTION_ARGS ? > > I'm trying to add another (optional) argument to a function that already > has an optional one. > So I need to know if the 4th arg is of type TEXT (or not of INT32). There isn't a way to do it in 7.3, but you will be able to in 7.4 (and can on 7.4devel/cvs HEAD): /* * Get the type OID of a specific function argument (counting from 0) * * Returns InvalidOid if information is not available */ Oid get_fn_expr_argtype(FunctionCallInfo fcinfo, int argnum) Joe
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера