Received: from sun.syzygy.net (sun.syzygy.net [195.26.96.2]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA45884 for ; Mon, 6 Mar 2000 10:53:57 -0500 (EST) (envelope-from k.morris@bitbull.com) Received: from lonexapps01.syzygy.net (mailpost.syzygy.net [195.26.97.156]) by sun.syzygy.net (8.8.5/8.8.5) with ESMTP id PAA26327 for ; Mon, 6 Mar 2000 15:53:55 GMT Received: by mailpost.syzygy.net with Internet Mail Service (5.0.1460.8) id ; Mon, 6 Mar 2000 15:54:45 -0000 Message-ID: <30C64922AF42D311A96D00A0C91D0B107EB54D@mailpost.syzygy.net> From: Kief Morris To: "'pgsql-sql@postgresql.org'" Subject: Returning multiple rows in functions Date: Mon, 6 Mar 2000 15:54:42 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1460.8) Content-Type: text/plain I'm missing something in the docs - how can I write a function that returns multiple rows? I want to do the equivalent of: select name from user_category where id = 21; 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? Thanks, Kief