Re: OID of current function - Mailing list pgsql-general

From Tom Lane
Subject Re: OID of current function
Date
Msg-id 28202.1105548538@sss.pgh.pa.us
Whole thread Raw
In response to Re: OID of current function  ("Jim C. Nasby" <decibel@decibel.org>)
List pgsql-general
"Jim C. Nasby" <decibel@decibel.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

pgsql-general by date:

Previous
From: bsimon@loxane.com
Date:
Subject: Debugging SPI C functions
Next
From: Greg Stark
Date:
Subject: Re: Bug in pg_dump in 7.4.6?