Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hIevm-0000WD-8E for pgsql-bugs@arkaria.postgresql.org; Mon, 22 Apr 2019 19:48:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hIevk-0006Kh-RI for pgsql-bugs@arkaria.postgresql.org; Mon, 22 Apr 2019 19:48:44 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hIevk-0006HV-IS for pgsql-bugs@lists.postgresql.org; Mon, 22 Apr 2019 19:48:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hIevi-0004f6-BO for pgsql-bugs@lists.postgresql.org; Mon, 22 Apr 2019 19:48:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x3MJmcif023857; Mon, 22 Apr 2019 15:48:38 -0400 From: Tom Lane To: "Voillequin, Jean-Marc" cc: pgsql-bugs@lists.postgresql.org Subject: Re: xpath insert unexpected newlines In-reply-to: <8718.1555683683@sss.pgh.pa.us> References: <1EC8157EB499BF459A516ADCF135ADCE3A23A9CA@LON-WGMSX712.ad.moodys.net> <8718.1555683683@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 19 Apr 2019 10:21:23 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23855.1555962518.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 22 Apr 2019 15:48:38 -0400 Message-ID: <23856.1555962518@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > [ redirecting to pgsql-bugs ] > "Voillequin, Jean-Marc" writes: >> It seems that xpath function add unexpected newlines in the xml element= s it returns as array: > I tried this: > - bytes =3D xmlNodeDump(buf, NULL, cur_copy, 0, 1); > + bytes =3D xmlNodeDump(buf, NULL, cur_copy, 0, 0); > and that makes the discrepancy go away (both results are printed without > any added whitespace). > Thoughts? [ crickets ] Hearing nothing, I propose to change this in HEAD but not back-patch. It still seems like a bug, but given the lack of previous complaints, I'm not sure we'd get plaudits for changing this behavior in back branches. regards, tom lane