Re: PROBLEM WITH FUNCTION

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mario Alberto Soto Cordones" <mario_soto(at)venezolanadeavaluos(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: PROBLEM WITH FUNCTION
Date: 2004-05-03 03:18:13
Message-ID: 4040.1083554293@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Mario Alberto Soto Cordones" <mario_soto(at)venezolanadeavaluos(dot)com> writes:
> CREATE OR REPLACE FUNCTION "public"."contador_distrito_activos" (numeric,
> numeric, numeric) RETURNS SETOF "public"."ty_activo" AS'
> declare
> con bigint;
> act bigint;
> ...
> return con , act;

plpgsql has no shorthand for constructing a rowtype result, as you seem
to be expecting here. Declare a variable of type ty_activo, fill it in,
and return it.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Vikram Kulkarni 2004-05-03 05:19:42 Regression tests: test stats loops indefinately...
Previous Message Mario Alberto Soto Cordones 2004-05-02 19:01:15 PROBLEM WITH FUNCTION