pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Alberto Soto Cordones <mario_soto@venezolanadeavaluos.com>
To: pgsql-admin@postgresql.org
Subject: PROBLEM WITH FUNCTION
Date: Sun, 2 May 2004 15:01:15 -0400 (VET)
Message-ID: <48856.200.31.137.181.1083524475.squirrel@mail.venezolanadeavaluos.com> (raw)

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





view thread (2+ messages)  latest in thread

Message-ID: <48856.200.31.137.181.1083524475.squirrel@mail.venezolanadeavaluos.com>
Permalink:  ../48856.200.31.137.181.1083524475.squirrel@mail.venezolanadeavaluos.com/
Also on:    postgresql.org/message-id/48856.200.31.137.181.1083524475.squirrel@mail.venezolanadeavaluos.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mario_soto@venezolanadeavaluos.com
  Subject: Re: PROBLEM WITH FUNCTION
  In-Reply-To: <48856.200.31.137.181.1083524475.squirrel@mail.venezolanadeavaluos.com>
  References: <48856.200.31.137.181.1083524475.squirrel@mail.venezolanadeavaluos.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