Search Postgresql Archives

stored proc help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux