PROBLEM WITH FUNCTION

From: "Mario Alberto Soto Cordones" <mario_soto(at)venezolanadeavaluos(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: PROBLEM WITH FUNCTION
Date: 2004-05-02 19:01:15
Message-ID: 48856.200.31.137.181.1083524475.squirrel@mail.venezolanadeavaluos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

HI list,
i have a next function

CREATE OR REPLACE FUNCTION "public"."contador_distrito_activos" (numeric,
numeric, numeric) RETURNS SETOF "public"."ty_activo" AS'
declare
con bigint;
act bigint;
emp alias for $1;
sed alias for $2;
zon alias for $3;
begin
con := contador_distrito(1,2,5);
if (con > 0) then
act := ( select count(*) from activos where
activos.co_empresa = 1 and
activos.co_filial = 2 and
activos.co_zona = 5);
if act isnull then
act := 0;
end if;
else
con :=0;
act :=0;
end if;
return con , act;

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

But this function only return the value of con ;

any idea

Thank

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-05-03 03:18:13 Re: PROBLEM WITH FUNCTION
Previous Message pginfo 2004-05-02 08:41:47 freebsd performance