FUNCTION ERROR

From: "Mario Alberto Soto Cordones" <mario_soto(at)compuall(dot)cl>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: FUNCTION ERROR
Date: 2003-04-22 21:17:26
Message-ID: 1786.192.168.1.100.1051046246.squirrel@www.compuall.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi.
i have a big problem with a function.

i create a type unidades
CREATE TYPE unidades AS (codigo numeric(3,0),
descripcion text);

and i create a function get_unidades
CREATE FUNCTION get_unidades(int4, int4, int4, int4) RETURNS
typeof
unidades AS '
SELECT cucoduni, cudesuni
FROM cumauni
WHERE cuempuni = $1 and
cuseduni = $2 and
cucaruni = $3 and
cuasiuni= $4
; ' LANGUAGE 'sql';

when execute this function

select * from get_contenidos(10,1,15,17,31,12)
as (codigo numeric(3,0),
descripcion text)

SAY

ERROR: ExecMakeTableFunctionResult: Invalid result from function returning
tuple

ANY IDEA

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2003-04-22 21:24:20 Re: FUNCTION ERROR
Previous Message DUDLEY,DONALD (HP-Boise,ex1) 2003-04-22 15:57:33 SQL Reserved words