agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Olivier Leprêtre <o.lepretre@gmail.com>
To: pgsql-sql@postgresql.org
Subject: array problem with double quotes
Date: Sun, 14 Oct 2018 15:40:33 +0200
Message-ID: <5bc34756.1c69fb81.22161.822d@mx.google.com> (raw)
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
view thread (2+ messages) latest in thread
Message-ID: <5bc34756.1c69fb81.22161.822d@mx.google.com>
Permalink: ../5bc34756.1c69fb81.22161.822d@mx.google.com/
Also on: postgresql.org/message-id/5bc34756.1c69fb81.22161.822d@mx.google.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: o.lepretre@gmail.com
Subject: Re: array problem with double quotes
In-Reply-To: <5bc34756.1c69fb81.22161.822d@mx.google.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox