Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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



>
> 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 :(



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group