stored proc help

From: "Jason Tesser" <JTesser(at)nbbc(dot)edu>
To: <pgsql-general(at)postgresql(dot)org>
Subject: stored proc help
Date: 2005-07-13 18:28:45
Message-ID: AA9E9C9ACAFCA545A33A9F6E1E88353E06968E@titus.nmi.northlandministries.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have the following store dproc but when I run it I am getting the
error

ERROR: invalid input syntax for integer: "(1)"

CONTEXT: PL/pgSQL function "irispermissionget" line 9 at return next

What am I doing wrong?

CREATE OR REPLACE FUNCTION "public"."irispermissionget" (username
varchar, pass varchar) RETURNS SETOF integer AS

$body$

declare

returnRec Record;

begin

for returnRec in select cast(irisuserpermission.permissionid as integer)

from irisuserpermission INNER JOIN public.irisuser ON
(public.irisuserpermission.irisuserid = public.irisuser.id)

where irisuser.user = username and irisuser.password = pass

loop

return next returnRec;

end loop;

return;

end;

$body$

LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2005-07-13 18:29:13 Re: fts error
Previous Message Doug Hall 2005-07-13 18:26:28 Re: Slow delete