array problem with double quotes

Olivier Leprêtre <[email protected]> Sun, 14 Oct 2018 15:40:33 +0200
Newsgroups gmane.comp.db.postgresql.sql
Message-ID <[email protected]>
Hi,

 

Is there a way to create arrays without postgres adding double quotes when
there are commas ? 

 

select v1,v2 from (values ('co',array[['ab'],['ab,da']])) sub (v1,v2)

 

returns 

"v1";"v2"

"co";"{{ab},{"ab,da"}}"

 

where I wanted 

 

"co";"{{ab},{ab,da}}"

 

to match with the result of an array_agg which returns {ab,da}

 

In my case I then can't have {ab,da} @> {"ab,da"}

 

 

Thanks,

 

Olivier



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus