Search Postgresql Archives

Re: function lookup using a "real" function call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Thu, Jun 28, 2012 at 3:30 PM, Marc Mamin <M.Mamin@xxxxxxxxxxxx> 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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux