Обсуждение: function lookup using a "real" function call

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

function lookup using a "real" function call

От
"Marc Mamin"
Дата:
Hello,

Is it possible to find out the (list of) function oids from a function
call?

e.g. select MYFUNC('foo', 1234)

=> someting like

select * from get_function_oids($$MYFUNC('foo', 1234)$$)


best regards,

Marc Mamin


Re: function lookup using a "real" function call

От
raghu ram
Дата:


On Thu, Jun 28, 2012 at 3:30 PM, Marc Mamin <M.Mamin@intershop.de> wrote:

Hello,

Is it possible to find out the (list of) function oids from a function
call?

e.g. select MYFUNC('foo', 1234)

=> someting like

select * from get_function_oids($$MYFUNC('foo', 1234)$$)



Below approach provides information of the OID of the function::

postgres=# create function myfunc(int) returns int as 'select $1' language sql;
CREATE FUNCTION

postgres=# SELECT 'myfunc(int)'::regprocedure::oid;
  oid  
-------
 24612
(1 row)


postgres=# select 24612::regprocedure;
  regprocedure   
-----------------
 myfunc(integer) 



--

Thanks & Regards,

Raghu Ram