Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBgdW-0004Rv-0g for pgsql-sql@arkaria.postgresql.org; Sun, 14 Oct 2018 13:40:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gBgdS-0007an-9z for pgsql-sql@arkaria.postgresql.org; Sun, 14 Oct 2018 13:40:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBgdS-0007ad-1C for pgsql-sql@lists.postgresql.org; Sun, 14 Oct 2018 13:40:46 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gBgdP-0002er-Dk for pgsql-sql@postgresql.org; Sun, 14 Oct 2018 13:40:45 +0000 Received: by mail-wr1-x42b.google.com with SMTP id d2-v6so18214725wro.7 for ; Sun, 14 Oct 2018 06:40:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:from:to:subject:date:mime-version:thread-index :content-language; bh=kCdiz8Z4L/H7+vtQz7S0cLDC9TYBbyCmdeJkBaFb4jk=; b=AfPWKN1rFS7YXpSs91T6b39jze3HJBJAgWAj4tKdp2khAkxobk9LohKQKBMjm1SykG afuHZeRwPZmWBvzl3ueLiHkjlZqAx9yljsMhmTWgIPiPge6WvD8Prxq/AkyB7yw7W0v5 C2sWnIudAsjQAmzsMn0Ne7Se1zbrzD5TQ28tdnKbY++6woXzrVGEX9GVc095c1QSjLm6 leFFilEXvt4zcbdMZrgSSYSMxPPeEwdzJZhoTav27M7gUK9d8nj2dyx1NM7UUHtnVsHD L15sQqjCIFqCOHYGh9S6M/d7GTHkWcmXBWwnbJjPPRp18MjZzrypAIRStvQFTnZCbzvc TnoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:from:to:subject:date:mime-version :thread-index:content-language; bh=kCdiz8Z4L/H7+vtQz7S0cLDC9TYBbyCmdeJkBaFb4jk=; b=QI1/FoRPxS1YckcoVnVtLxoaDsY04Bi/t8nz4a/XVALoFSQMCJ/IbUNeUPtWWaeysw ONtgzsR8awMJcKBj1Wyo+DUJQYBONEbPUr8D6UgBhw3Tv3HRDkKGDM3XkNXI7mdqRYVV t8XNEDQ2Val1cPvC7ytNmCfL8Jz7M4NOtrP5+cxk0gBD/CysWza+y512gQnw2pSoYDkJ JTv4Mix4yLwNRz3AdoL63El0ZbX9g7XJS1xp6xcK0rvShPVhBkWZEMaNcHKYg5li5PNf cB/5m+sLjHaHnjF5i6wRG9rJbSvsj3pdsnipCUQyrkO19IKxFvc4+NEwbjRM9Guw4a9N ZQWA== X-Gm-Message-State: ABuFfohCPrN009lgyEE4xyU9hqfPRP1c99HIA3Oagg0fcIjgCazwK/dV zSlqZKGcksWIxrV6R+BELdhFRbah X-Google-Smtp-Source: ACcGV63fN/2rPzn+eiNB7y/37ViUpeKPiTwIjhVhjgngyzF7XXsSo19SMc9acs3crE0qRIbpiyc3UA== X-Received: by 2002:a5d:6b4f:: with SMTP id x15-v6mr10922708wrw.304.1539524439196; Sun, 14 Oct 2018 06:40:39 -0700 (PDT) Received: from PADOUE (mau78-1-88-184-109-217.fbx.proxad.net. [88.184.109.217]) by smtp.gmail.com with ESMTPSA id z12-v6sm6657747wrv.46.2018.10.14.06.40.37 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Oct 2018 06:40:38 -0700 (PDT) Message-ID: <5bc34756.1c69fb81.22161.822d@mx.google.com> X-Google-Original-Message-ID: <01c901d463c3$7be9cf00$73bd6d00$@lepretre@gmail.com> From: =?iso-8859-1?Q?Olivier_Lepr=EAtre?= To: Subject: array problem with double quotes Date: Sun, 14 Oct 2018 15:40:33 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01CA_01D463D4.3F729F00" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdRjw0mYcMus5QoXTHmDNFYybA2B1A== Content-Language: fr X-Antivirus: Avast (VPS 181014-0, 14/10/2018), Outbound message X-Antivirus-Status: Clean List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. ------=_NextPart_000_01CA_01D463D4.3F729F00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 =E9lectronique a =E9t=E9 v=E9rifi=E9e p= ar le logiciel antivirus Avast. https://www.avast.com/antivirus ------=_NextPart_000_01CA_01D463D4.3F729F00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

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

&q= uot;v1";"v2"

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

 

where I wanted

 

"co&q= uot;;"{{ab},{ab,da}}"

<= span lang=3DEN-US style=3D'font-size:10.0pt;font-family:"Verdana","sans-ser= if"'> 

to match with t= he result of an array_agg which returns {ab,da}

 

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

 

 

T= hanks,

 <= /span>

Olivier


3D"" Garant= i sans virus. www.avast.com
= ------=_NextPart_000_01CA_01D463D4.3F729F00--