Received: from bastuba.partitur.se (bastuba.partitur.se [193.219.246.194]) by hub.org (8.9.2/8.9.1) with ESMTP id KAA48308 for ; Fri, 5 Feb 1999 10:54:11 -0500 (EST) (envelope-from kudo@partitur.se) Received: from partitur.se (tb303.partitur.se [193.219.246.230]) by bastuba.partitur.se (8.8.8/8.8.8) with ESMTP id QAA18089 for ; Fri, 5 Feb 1999 16:54:10 +0100 (CET) (envelope-from kudo@partitur.se) Sender: kudo@partitur.se Message-ID: <36BB1422.E9C4FF0E@partitur.se> Date: Fri, 05 Feb 1999 16:54:10 +0100 From: Patrik Kudo Organization: Partitur Informationsteknik X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-STABLE i386) X-Accept-Language: sv,en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Function returning multiple rows? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, I've been trying to create a function which returns multiple rows, but I can't get it working. I'm I doing something wrong, or is it not possible? This is my setup: create table groups (userid int4, grp int4); CREATE FUNCTION usersingroup(int4) RETURNS int4 AS 'SELECT userid FROM groups WHERE grp = $1;' LANGUAGE 'sql'; When doing a SELECT usersingroup(100); I only get the first row. Is there any way to get all the rows? Regards, Patrik Kudo kudo@partitur.se