Hi
I have problem calling my function (prety easy):
== sql begin ==
CREATE OR REPLACE FUNCTION "InventGroups_GetAllParents"(int8)
RETURNS SETOF "ItemGroupRelationNode" AS
$BODY$declare
R RECORD;
SR RECORD;
begin
FOR R IN select ItemGroupId, ParentItemGroupId
from InventGroups where ItemGroupId = $1 and ItemGroupId > 0
LOOP
RETURN NEXT R;
--FOR SR IN select * from InventGroups_GetAllParents(
R.ParentItemGroupId::int8 )
--LOOP
-- RETURN NEXT SR;
--END LOOP;
END LOOP;
RETURN;
end;$BODY$
LANGUAGE 'plpgsql' VOLATILE;
== sql end ==
"ItemGroupRelationNode" is a complex type
====
CREATE TYPE "ItemGroupRelationNode" AS
("ItemGroupId" int8,
"ParentItemGroupId" int8);
====
The result is:
=========
select * from InventGroups_GetAllParents(0::int8)
=======
ERROR: function inventgroups_getallparents(bigint) does not exist
HINT: No function matches the given name and argument types. You may
need to add explicit type casts.
Thanks for responce
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org