X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 829CA4761D3 for ; Tue, 4 Mar 2003 12:42:21 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 45452-09 for ; Tue, 4 Mar 2003 12:42:19 -0500 (EST) Received: from icreativa.com.mx (unknown [216.117.128.204]) by postgresql.org (Postfix) with ESMTP id BCB294761F6 for ; Tue, 4 Mar 2003 12:42:19 -0500 (EST) Received: from iclab04.icreativalab.com.mx (dsl-200-67-3-42.prodigy.net.mx [200.67.3.42]) by icreativa.com.mx (8.12.8/8.12.8) with ESMTP id h24HgNxD019146 for ; Tue, 4 Mar 2003 12:42:24 -0500 Content-Type: text/plain; charset="us-ascii" From: Fernando Organization: Ingenieria Creativa To: pgsql-sql@postgresql.org Subject: SETOF Date: Tue, 4 Mar 2003 11:44:44 -0600 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200303041144.44800.fernando@icreativa.com.mx> X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/118 X-Sequence-Number: 12158 Hi, I am using Postgresql version 7.2.2=20 I made a small function... CREATE FUNCTION ejem1(varchar) RETURNS SETOF to varchar as'=20 SELECT names from mi_tabla WHERE city =3D $1; '=20 language ' SQL ';=20 ejem1=20 ------------ Sergio=20 Carlos=20 Fernando=20 When wanting to obtain several columns I do this...=20 CREATE FUNCTION ejem2(varchar) RETURNS SETOF mi_tabla as'=20 SELECT * from mi_tabla WHERE city =3D $1;'=20 language ' SQL ';=20 ejem2=20 --------------- 137956448=20 137956448=20 137956448=20 The number of registries that return is the correct, the question is, becau= se=20 it does not return the fields of the table, and that is what in its place= =20 this showing to me...=20 Greetings and thank you very much!=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20