Actual function name

Поиск
Список
Период
Сортировка
Искать

Actual function name

От:
Gaetano Mendola <mendola@bigfoot.com>
Дата:
Hi all,
is there a way to know the name of current function,
somethink like $0 for a shell script ?


Regards
Gaetano Mendola

Re: Actual function name

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Gaetano Mendola writes:

> is there a way to know the name of current function,
> somethink like $0 for a shell script ?

In a C function, you can get the OID of the function from
fcinfo->flinfo->fn_oid.  From that you can get the name and the argument
types.

-- 
Peter Eisentraut   peter_e@gmx.net

Re: Actual function name

От:
Gaetano Mendola <mendola@bigfoot.com>
Дата:
Peter Eisentraut wrote:

 > Gaetano Mendola writes:
 >
 >
 >>is there a way to know the name of current function,
 >>somethink like $0 for a shell script ?
 >
 >
 > In a C function, you can get the OID of the function from
 > fcinfo->flinfo->fn_oid.  From that you can get the name and the argument
 > types.
 >

I'm inside a plpgsql function unfortunately, I was confident on use $0 
but on postgres 7.3.X doesn't work.

I think that may be is a TODO ?


Gaetano


FAQ