Re: PROBLEM WITH FUNCTION - Mailing list pgsql-admin

From Tom Lane
Subject Re: PROBLEM WITH FUNCTION
Date
Msg-id 4040.1083554293@sss.pgh.pa.us
Whole thread Raw
In response to PROBLEM WITH FUNCTION  ("Mario Alberto Soto Cordones" <mario_soto@venezolanadeavaluos.com>)
List pgsql-admin
"Mario Alberto Soto Cordones" <mario_soto@venezolanadeavaluos.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

pgsql-admin by date:

Previous
From: "Mario Alberto Soto Cordones"
Date:
Subject: PROBLEM WITH FUNCTION
Next
From: Vikram Kulkarni
Date:
Subject: Regression tests: test stats loops indefinately...