Re: PG_FUNCTION_ARGS: typeof arg ?

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: PG_FUNCTION_ARGS: typeof arg ?
Дата
Msg-id 3EF8B34E.8090608@joeconway.com
обсуждение исходный текст
Ответ на PG_FUNCTION_ARGS: typeof arg ?  (Nabil Sayegh <postgresql@e-trolley.de>)
Список pgsql-novice
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


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

Предыдущее
От: Nabil Sayegh
Дата:
Сообщение: PG_FUNCTION_ARGS: typeof arg ?
Следующее
От: Nabil Sayegh
Дата:
Сообщение: connectby() minor bug in errormessage