Concatenating multiple fetches into a single string - Mailing list pgsql-sql

From Kumar
Subject Concatenating multiple fetches into a single string
Date
Msg-id 024a01c3b802$d9afac40$7502a8c0@hdsc.com
Whole thread Raw
Responses Re: Concatenating multiple fetches into a single string  (Tomasz Myrta <jasiek@klaster.net>)
List pgsql-sql
Dear Friends,
 
I am doing a migration from SQL server to Postgres SQL. A simple select fetches the following names.
 
select full_name FROM project_members where project_members.project_role_id in (' + @p_res_ids + ') ;
 
Let us say if the results are
 
full_name
---------------
David
Postgres
plpgsql
 
I need to send the out put as David,Postgres,Plsql -- one string, concatenates the fetches from multiple rows. This was handled in SQL server with a cursor.
 
Can this be handled only by sql manipulation or need to use cursors. If i use cursor in postgres, what is the equivalent of MS SQL Statement
WHILE @@FETCH_STATUS = 0.
 
please shed some light pls.

pgsql-sql by date:

Previous
From: "Richard Sydney-Smith"
Date:
Subject: Ooops ! :( Recovery techniques
Next
From: Tomasz Myrta
Date:
Subject: Re: Concatenating multiple fetches into a single string