Re: returning an array as a list fo single-column rows? - Mailing list pgsql-sql

From Pavel Stehule
Subject Re: returning an array as a list fo single-column rows?
Date
Msg-id 162867790712231345w7c01493fv90517ba2dc9a90ff@mail.gmail.com
Whole thread Raw
In response to Re: returning an array as a list fo single-column rows?  (Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>)
Responses returning an array as a list of single-column rows... (different approach)
List pgsql-sql
>
> Yes I thought about it, but would rather have Pg do the array splitting.
> For instance if the separator occurs in an array element there is no
> built-in escaping:
>
> % select array_to_string(array['ee','dd','rr','f|f'],'|');
>  array_to_string
>  -----------------
>   ee|dd|rr|f|f

if you have not some special char, then unpack is one possible solution

theoretically you can use text output

postgres=# select array['aa','aaa,j']::text;     array
-----------------{aa,"aaa,j"}
(1 row)

but nothing nice parse it :(


pgsql-sql by date:

Previous
From: Louis-David Mitterrand
Date:
Subject: Re: returning an array as a list fo single-column rows?
Next
From:
Date:
Subject: returning an array as a list of single-column rows... (different approach)