pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Juris <bubliks@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Error calling self-made plpgsql function "function XYZ(bigint) does not exist"
Date: Thu, 19 Jan 2006 14:39:47 +0200
Message-ID: <4f31e3850601190439s6b00f6bfj@mail.gmail.com> (raw)

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



view thread (7+ messages)  latest in thread

Message-ID: <4f31e3850601190439s6b00f6bfj@mail.gmail.com>
Permalink:  ../4f31e3850601190439s6b00f6bfj@mail.gmail.com/
Also on:    postgresql.org/message-id/4f31e3850601190439s6b00f6bfj@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bubliks@gmail.com
  Subject: Re: Error calling self-made plpgsql function "function XYZ(bigint) does not exist"
  In-Reply-To: <4f31e3850601190439s6b00f6bfj@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox