On 3/14/06, Michael Fuhr <mike@fuhr.org> wrote:
> On Tue, Mar 14, 2006 at 07:21:51AM -0800, Nick Johnson wrote:
> > On 14/03/2006, at 12:05 AM, Michael Fuhr wrote:
> > >Why do you need to do this? What problem are you trying to solve?
> >
> > I want to associate Postgres functions with rows of a table (eg, a
> > table column of datatype regproc or regprocedure) and be able to
> > execute the function associated with that row in a query.
>
> Could you post an example? Others might be interested in seeing
> an application of something like that.
If you go a ways back on the performance list you can see an example.
It's very simple: there are C functions which you can call which take
the oid and parameters. Then you can do clever things like do
callbacks in plpgsql a function taking the function argument as a
string and looking up its oid.
to the original poster...it's probably possible. one way would be to
sanity check pg_proc on the C side (at the least, check the # args).
there might be better/faster ways though
Merlin