Received: from bjke.com (firewall-user@ganymede.bjke.com [144.210.8.38]) by hub.org (8.9.2/8.9.1) with ESMTP id MAA58601 for ; Fri, 5 Feb 1999 12:24:55 -0500 (EST) (envelope-from djackson@cpsgroup.com) Received: by bjke.com; id LAA00951; Fri, 5 Feb 1999 11:24:52 -0600 (CST) Received: from cpsmail.cpsgroup.com(144.210.12.11) by gauntlet.bjke.com via smap (4.1) id xmaa00340; Fri, 5 Feb 99 11:24:20 -0600 Received: by cpsmail with Internet Mail Service (5.0.1458.49) id ; Fri, 5 Feb 1999 11:26:28 -0600 Message-ID: From: "Jackson, DeJuan" To: Patrik Kudo , pgsql-sql@postgreSQL.org Subject: RE: [SQL] Function returning multiple rows? Date: Fri, 5 Feb 1999 11:26:25 -0600 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain Not currently. > -----Original Message----- > From: Patrik Kudo [mailto:kudo@partitur.se] > Sent: Friday, February 05, 1999 9:54 AM > To: pgsql-sql@postgreSQL.org > Subject: [SQL] Function returning multiple rows? > > > 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 >