Re: getting oid of function

From: Neil Conway <neilc(at)samurai(dot)com>
To: Sibtay Abbas <sibtay(at)gmail(dot)com>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: getting oid of function
Date: 2005-02-15 03:55:38
Message-ID: 1108439738.20206.47.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-02-15 03:56:42 Re: enforcing a plan (in brief)
Previous Message Bruce Momjian 2005-02-15 03:53:59 Re: [pgsql-hackers] Allow GRANT/REVOKE permissions to be applied