X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 570C7476302 for ; Tue, 22 Apr 2003 17:12:38 -0400 (EDT) Received: from lautaro.compuall.cl (50-126-125.leased.cust.tie.cl [200.50.126.125]) by postgresql.org (Postfix) with ESMTP id BA5E2474E42 for ; Tue, 22 Apr 2003 17:12:29 -0400 (EDT) Received: from lautaro.compuall.cl (lautaro [127.0.0.1]) by lautaro.compuall.cl (8.12.8/8.12.5) with ESMTP id h3MLHRmD003331 for ; Tue, 22 Apr 2003 17:17:27 -0400 Received: (from apache@localhost) by lautaro.compuall.cl (8.12.8/8.12.5/Submit) id h3MLHQ5j003329; Tue, 22 Apr 2003 17:17:26 -0400 X-Authentication-Warning: lautaro.compuall.cl: apache set sender to mario_soto@compuall.cl using -f Received: from 192.168.1.100 (SquirrelMail authenticated user mario_soto) by www.compuall.cl with HTTP; Tue, 22 Apr 2003 17:17:26 -0400 (CLT) Message-ID: <1786.192.168.1.100.1051046246.squirrel@www.compuall.cl> Date: Tue, 22 Apr 2003 17:17:26 -0400 (CLT) Subject: FUNCTION ERROR From: "Mario Alberto Soto Cordones" To: X-Priority: 1 Importance: High X-Mailer: SquirrelMail (version 1.2.10) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, hits=-4.6 required=5.0 tests=BAYES_10,SUBJ_ALL_CAPS,X_AUTH_WARNING,X_PRIORITY_HIGH version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/317 X-Sequence-Number: 13018 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 =3D $1 and cuseduni =3D $2 and cucaruni =3D $3 and cuasiuni=3D $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