Received: from merganser.its.uu.se (merganser.its.uu.se [130.238.6.236]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA49633 for ; Mon, 6 Mar 2000 11:22:16 -0500 (EST) (envelope-from peter@localhost.its.uu.se) Received: from regulus.its.uu.se ([130.238.7.19]:62258 "EHLO regulus.its.uu.se") by merganser.its.uu.se with ESMTP id ; Mon, 6 Mar 2000 17:21:25 +0100 Received: from peter (helo=localhost) by regulus.its.uu.se with local-esmtp (Exim 3.02 #2) id 12S0JB-0000IN-00; Mon, 06 Mar 2000 17:24:37 +0100 Date: Mon, 6 Mar 2000 17:24:37 +0100 (CET) From: Peter Eisentraut To: Kief Morris cc: "'pgsql-sql@postgresql.org'" Subject: Re: [SQL] Returning multiple rows in functions In-Reply-To: <30C64922AF42D311A96D00A0C91D0B107EB54D@mailpost.syzygy.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: Peter Eisentraut Kief Morris writes: > I create the following function: > > create function getid (int4) returns text as 'select name from mytable > where id = $1;' language 'sql'; > > ... but it only returns the first matching row. Is there > a way to return all the matching rows? No. Perhaps making a view would fit your application. -- Peter Eisentraut Sernanders väg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden