Re: cvs text to quoted cvs text - Mailing list pgsql-sql

From Pavel Stehule
Subject Re: cvs text to quoted cvs text
Date
Msg-id CAFj8pRAGbeOEJQMejkoV7p0bziwdLx5J1cX9ZW7G+NFgG7-Xhg@mail.gmail.com
Whole thread Raw
In response to Re: cvs text to quoted cvs text  (Michael Moore <michaeljmoore@gmail.com>)
Responses Re: cvs text to quoted cvs text
List pgsql-sql


2016-09-26 22:09 GMT+02:00 Michael Moore <michaeljmoore@gmail.com>:
Igor, not seeing how quote_literal will quote each element of the csv. It will quote the entire string, but not each element.

SELECT string_agg(quote_literal(v),',') from unnest('{AHOJ,NAZDAR}'::text[]) g(v);


Pavel, Interesting but unfortunately my dynamic sql is very complex, hundreds of lines, and a undetermined number of USING variables would be needed.

Thanks!

pgsql-sql by date:

Previous
From: Michael Moore
Date:
Subject: Re: cvs text to quoted cvs text
Next
From: Michael Moore
Date:
Subject: Re: cvs text to quoted cvs text