The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!
How to see the source code of an overloaded stored procedure?

Hi, I have two stored procedures test() and test(x int) and I need to get the source code of only one of them.
select export_objects('', 'test'); returns the source code of both procedures, is there any way to differentiate them? I tried to write the procedure name in diffent ways, like 'test(int)' and 'test(x int)' but I have not found anything that works.
0
Answers
Looking into this. Definitely interesting as the export objects says the two items are a single row, so it doesn't know how ot differentiate them.
VMart=> select export_objects('','raiseXY2');
export_objects
------------------------------------------------------------------------------------------------------------CREATE PROCEDURE public.raiseXY2(x int, y varchar)
LANGUAGE 'PL/vSQL'
SECURITY INVOKER
AS '
BEGIN
RAISE NOTICE ''x = %'', x;
RAISE NOTICE ''y = %'', y;
-- some processing statements
END
';
CREATE PROCEDURE public.raiseXY2(x int)
LANGUAGE 'PL/vSQL'
SECURITY INVOKER
AS '
BEGIN
RAISE NOTICE ''x = %'', x;
-- some processing statements
END
';
SELECT MARK_DESIGN_KSAFE(0);
(1 row)
I have created a JIRA bug for the same.
VER-84041
Unable to export a single stored procedure when 2 procedures have same name but different arguments