Wednesday, 11 September 2013

How to get Postgres function name as well as function specific name from pg_catalog.pg_proc?

How to get Postgres function name as well as function specific name from
pg_catalog.pg_proc?

Since Postgres supports function overloading, getting function name as
well as function specific name(System generated without duplicates) is
more meaning full.
Assume i have 2 functions in the name as Func1 which are overloaded as
shown below,
CREATE FUNCTION "Schema"."Func1"(IN param1 INTEGER,
IN Param2 CHAR)
RETURNS INTEGER
AS $BODY$
begin
return param1+1;
end $BODY$
LANGUAGE PLPGSQL;@
CREATE FUNCTION "Schema"."Func1"(IN param1 INTEGER)
RETURNS INTEGER
AS $BODY$
begin
return param1+1;
end $BODY$
LANGUAGE PLPGSQL;@
How do i load the functions as well as input parameters correctly from
pg_catalog.pg_proc. With the help of information_schema.routines, there is
a way to load function 1)specific_name 2) routine_name
But many other attributes are missing in information_schema.routines like
1) isWindow function 2) isStrict function 3) isProRetSet function
So is there some other means to get the function specific_name from
pg_catalog.....

No comments:

Post a Comment