and here it's the simple code :
select string_agg(prod,' | ') FROM
(SELECT product as prod FROM tblproducts ORDER BY product )MAIN;
select string_agg(prod,' | ') FROM
(SELECT product as prod FROM tblproducts ORDER BY product )MAIN;
gswin32c -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOUTPUTFILE=pdfresult.pdf pdf1.pdf pdf2.pdf pdf3.pdf