Re: OID of current function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Cc: Thomas Hallgren <thhal(at)mailblocks(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: OID of current function
Date: 2005-01-12 16:48:58
Message-ID: 28202.1105548538@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Jim C. Nasby" <decibel(at)decibel(dot)org> writes:
> What I find somewhat interesting is every other database I've used that
> exposes some kind of 'object ID' has a set of functions to map between
> an object name and it's ID, and vice-versa.

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

regression=# SELECT 'myfunc(int)'::regprocedure::oid;
oid
--------
431373
(1 row)

regression=# select 431373::regprocedure;
regprocedure
-----------------
myfunc(integer)
(1 row)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2005-01-12 17:09:52 Re: Bug in pg_dump in 7.4.6?
Previous Message bsimon 2005-01-12 16:15:57 Debugging SPI C functions