pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Alberto Soto Cordones <mario_soto@compuall.cl>
To: pgsql-sql@postgresql.org
Subject: FUNCTION ERROR
Date: Tue, 22 Apr 2003 17:17:26 -0400 (CLT)
Message-ID: <1786.192.168.1.100.1051046246.squirrel@www.compuall.cl> (raw)

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




view thread (14+ messages)  latest in thread

Message-ID: <1786.192.168.1.100.1051046246.squirrel@www.compuall.cl>
Permalink:  ../1786.192.168.1.100.1051046246.squirrel@www.compuall.cl/
Also on:    postgresql.org/message-id/1786.192.168.1.100.1051046246.squirrel@www.compuall.cl

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mario_soto@compuall.cl
  Subject: Re: FUNCTION ERROR
  In-Reply-To: <1786.192.168.1.100.1051046246.squirrel@www.compuall.cl>

* 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