X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 87739D1E92A for ; Sun, 2 May 2004 16:04:00 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 81939-06 for ; Sun, 2 May 2004 16:03:38 -0300 (ADT) Received: from localhost.localdomain (WLL-23-pppoe181.t-net.net.ve [200.31.137.181]) by svr1.postgresql.org (Postfix) with ESMTP id 01F0DD1E85B for ; Sun, 2 May 2004 16:03:32 -0300 (ADT) Received: from localhost.localdomain (FWVasa [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id i42J1Uws018951 for ; Sun, 2 May 2004 15:01:39 -0400 Received: (from apache@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id i42J1F7a018949; Sun, 2 May 2004 15:01:15 -0400 X-Authentication-Warning: localhost.localdomain: apache set sender to mario_soto@venezolanadeavaluos.com using -f Received: from 200.31.137.181 (proxying for 192.168.0.100) (SquirrelMail authenticated user mario_soto) by mail.venezolanadeavaluos.com with HTTP; Sun, 2 May 2004 15:01:15 -0400 (VET) Message-ID: <48856.200.31.137.181.1083524475.squirrel@mail.venezolanadeavaluos.com> Date: Sun, 2 May 2004 15:01:15 -0400 (VET) Subject: PROBLEM WITH FUNCTION From: "Mario Alberto Soto Cordones" To: X-Priority: 1 Importance: High X-Mailer: SquirrelMail (version 1.2.10) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=4.4 tagged_above=0.0 required=5.0 tests=LINES_OF_YELLING, RCVD_IN_DYNABLOCK, RCVD_IN_NJABL, RCVD_IN_NJABL_DIALUP, RCVD_IN_SORBS, SUBJ_ALL_CAPS, X_PRIORITY_HIGH X-Spam-Level: **** X-Archive-Number: 200405/2 X-Sequence-Number: 13318 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