Re: [HACKERS] getting oid of function

2005-02-15 Thread Sibtay Abbas
How would this differ from PERFORM? I think perform goes through the SQL by using SPI to execute the function, where as this statement will invoke a plpgsql function without going through the sql ( :-) ..in case i manage to add this statement ) thankz alot for your replies regards Sibtay On

Re: [HACKERS] getting oid of function

2005-02-14 Thread Michael Fuhr
On Mon, Feb 14, 2005 at 12:47:44PM +0500, Sibtay Abbas wrote: Is it possible to get the oid of a function on the basis of its name?. One way is to cast the function name to regproc (or, with arguments, to regprocedure) and then to oid: SELECT 'atan'::regproc::oid; SELECT

Re: [HACKERS] getting oid of function

2005-02-14 Thread Sibtay Abbas
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 Actually i ve introduced a new statement in plpgsql, that supports calling a plpgsql function from within a plpgsql function for example

Re: [HACKERS] getting oid of function

2005-02-14 Thread Michael Fuhr
On Mon, Feb 14, 2005 at 05:02:19PM +0500, Sibtay Abbas wrote: Actually i ve introduced a new statement in plpgsql, that supports calling a plpgsql function from within a plpgsql function for example CALL function_name( params); How would this differ from PERFORM? -- Michael Fuhr

Re: [HACKERS] getting oid of function

2005-02-14 Thread Neil Conway
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

[HACKERS] getting oid of function

2005-02-13 Thread Sibtay Abbas
Hello all Is it possible to get the oid of a function on the basis of its name?. The scenario which i am currently facing is that i have the function name, now i want search the pg_proc system catalog on the basis of the function name and retrieve its Oid. Another confusion which i am facing is