Q:

Concatenate a column from multiple rows into a single formatted string

I have rows like so:
roll_no
---------
0690543
0005331
0760745
0005271

And I want string like this :
"0690543.pdf" "0005331.pdf" "0760745.pdf" "0005271.pdf"

I have tried concat but unable to do so 

A:

You can use an aggregate function like string_agg, after first mangling the quotes and the .pdf extension to your column data. Use a space as your delimiter:
SELECT string_agg('"'||roll_no||'.pdf "', ' ') from myTable

SqlFiddle here

