Re: getting oid of function - Mailing list pgsql-hackers

From Neil Conway
Subject Re: getting oid of function
Date
Msg-id 1108439738.20206.47.camel@localhost.localdomain
Whole thread Raw
In response to Re: getting oid of function  (Sibtay Abbas <sibtay@gmail.com>)
Responses Re: getting oid of function  (Sibtay Abbas <sibtay@gmail.com>)
List pgsql-hackers
On Mon, 2005-02-14 at 17:02 +0500, Sibtay Abbas wrote:
> thank you for the detailed reply
> But what i wanted to know is that how can we actually get a function's
> oid from its
> name from within postgresql code itself

You'll want to query the syscache. Note that due to function
overloading, there may be multiple functions with the same name, so
you'll need to figure out which one ought to be invoked by using the
number and types of the parameters. See FuncnameGetCandidates() in
namespace.c for an example.

-Neil




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [pgsql-hackers] Allow GRANT/REVOKE permissions to be applied
Next
From: Bruce Momjian
Date:
Subject: Re: enforcing a plan (in brief)