how can i return multiple values from a function

From: srinivas <srinivaschowdary(at)essemm(dot)co(dot)in>
To: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: how can i return multiple values from a function
Date: 2001-09-25 11:35:39
Message-ID: 111F528ABE61D511BD3C0050DA5CA0A2C5FC@JAGUAR
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

i have tried retrieving multiple values using setof function but i
couldnt solve it.when i am trying using setof iam getting this as
output.

1 CREATE FUNCTION hobbies (varchar) RETURNS SETOF bank
2 AS 'SELECT * FROM bank
3 '
4 LANGUAGE 'sql';

~
output:
select hobbies('srinivas') as col;
col
-----------
137462096
137462096
(2 rows)

please let me know what is the alternative and if possible with a sample
piece of code.

cheers
chowdary.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tony Reina 2001-09-25 18:59:20 Re: [HACKERS] not on .hackers
Previous Message Michael Remme 2001-09-25 09:25:09 TEXT in select