Re: cvs text to quoted cvs text

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Michael Moore <michaeljmoore(at)gmail(dot)com>
Cc: postgres list <pgsql-sql(at)postgresql(dot)org>
Subject: Re: cvs text to quoted cvs text
Date: 2016-09-26 20:13:40
Message-ID: CAFj8pRAGbeOEJQMejkoV7p0bziwdLx5J1cX9ZW7G+NFgG7-Xhg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

2016-09-26 22:09 GMT+02:00 Michael Moore <michaeljmoore(at)gmail(dot)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!
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Moore 2016-09-26 22:05:02 Re: cvs text to quoted cvs text
Previous Message Michael Moore 2016-09-26 20:09:08 Re: cvs text to quoted cvs text