X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 8B4B49DC973 for ; Thu, 19 Jan 2006 08:39:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 08487-02 for ; Thu, 19 Jan 2006 08:39:49 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.202]) by postgresql.org (Postfix) with ESMTP id BC8C99DC8A7 for ; Thu, 19 Jan 2006 08:39:43 -0400 (AST) Received: by zproxy.gmail.com with SMTP id 14so188821nzn for ; Thu, 19 Jan 2006 04:39:47 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=a2lPPR8/z6+EOTzVewzFeDywjLi8lrA329WObs+Fa2CkKmQ6zfixDabD584vM6A8s4MlIJRQNffM38m88O+b7r0ke556kDPLFezNhBo/oeBtj1VUtukxcopYFN9EISOSVNSsXbClzzUa9PDnOOs6MO47dPszOtArxb5DLV28IKY= Received: by 10.65.193.3 with SMTP id v3mr250358qbp; Thu, 19 Jan 2006 04:39:47 -0800 (PST) Received: by 10.65.212.8 with HTTP; Thu, 19 Jan 2006 04:39:47 -0800 (PST) Message-ID: <4f31e3850601190439s6b00f6bfj@mail.gmail.com> Date: Thu, 19 Jan 2006 14:39:47 +0200 From: Juris To: pgsql-sql@postgresql.org Subject: Error calling self-made plpgsql function "function XYZ(bigint) does not exist" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[UPPERCASE_25_50=0] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200601/127 X-Sequence-Number: 23916 Hi I have problem calling my function (prety easy): =3D=3D sql begin =3D=3D 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 =3D $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; =3D=3D sql end =3D=3D "ItemGroupRelationNode" is a complex type =3D=3D=3D=3D CREATE TYPE "ItemGroupRelationNode" AS ("ItemGroupId" int8, "ParentItemGroupId" int8); =3D=3D=3D=3D The result is: =3D=3D=3D=3D=3D=3D=3D=3D=3D select * from InventGroups_GetAllParents(0::int8) =3D=3D=3D=3D=3D=3D=3D 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