function return multiple value - Mailing list pgsql-general

From Harry Yau
Subject function return multiple value
Date
Msg-id 3AE7D1C8.86756865@regaltronic.com
Whole thread Raw
List pgsql-general
Dear:
    I wanna create a function that return a multiple rows in to a single
row.
example:
CREATE FUNCTION GETNAME() RETURNS SETOF VARCHAR AS 'SELECT NAME FROM
TEST;' LANGUAGE 'SQL';

when i call this function it return:
----------
peter
susan
john

but I wonder is it possible to make it to return something like
---------------------
peter    susan    john

I have to use this result to print in quick report.
THANK YOU VERY MUCH

Harry Yau


pgsql-general by date:

Previous
From: Nils Zonneveld
Date:
Subject: Re: Newbie struggling to set $PGDATA
Next
From: Berényi Gábor
Date:
Subject: Seral field value after INSERT !