Re: function lookup using a "real" function call

From: raghu ram <raghuchennuru(at)gmail(dot)com>
To: Marc Mamin <M(dot)Mamin(at)intershop(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: function lookup using a "real" function call
Date: 2012-06-29 07:42:41
Message-ID: CALnrrJS9fMNQ25Q6gp5Um-80EF3s5-U_F1Lhoid0BcsTVow76Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 28, 2012 at 3:30 PM, Marc Mamin <M(dot)Mamin(at)intershop(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Patrick Schneider 2012-06-29 07:54:23 Conversion of columns during CSV Import
Previous Message tuanhoanganh 2012-06-29 07:15:50 Re: Postgresql 9.0.6 alway run VACUUM ANALYZE pg_catalog.pg_attribute