Error calling self-made plpgsql function "function XYZ(bigint) does not exist"

From: Juris <bubliks(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Error calling self-made plpgsql function "function XYZ(bigint) does not exist"
Date: 2006-01-19 12:39:47
Message-ID: 4f31e3850601190439s6b00f6bfj@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Glaesemann 2006-01-19 12:48:30 Re: Error calling self-made plpgsql function "function XYZ(bigint) does not exist"
Previous Message Michael Glaesemann 2006-01-18 23:39:16 Re: stored procedures for complex SELECTs