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 1iDZ2F-0005ve-Od for pgsql-general@arkaria.postgresql.org; Thu, 26 Sep 2019 19:02:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iDZ2E-0005QJ-KG for pgsql-general@arkaria.postgresql.org; Thu, 26 Sep 2019 19:02:38 +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 1iDZ2E-0005QC-Ab for pgsql-general@lists.postgresql.org; Thu, 26 Sep 2019 19:02:38 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iDZ2A-0001NW-V5 for pgsql-general@postgresql.org; Thu, 26 Sep 2019 19:02:37 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D0C9F2067B; Thu, 26 Sep 2019 15:02:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 26 Sep 2019 15:02:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=6 PUeJIjFzIKouqqkmIITRf8eOURA2YvVOn1fUNIG30Q=; b=BBwuN1E/m//UXp90+ gyG8l8V23BcyXptkTLxBJJFpgIHdLUhJmRWneB1FzrDdKLPlBp4HyYVOC6+ckepm nYw3g5VA0g3TgYkhWhLaiGVVbbRhjt4FeyZ9xOFkTHUjya4m95n4TcTKMERt6Ac+ UQkpjZ5wI5ixKjWJqz3lH5VgfnhWQ5WT+g3Eg9ZOJK4ioi45v4E4UyedZXUQ94PM rNdzZIODl8X6Bx5LDHAZFKXFGPKwna7CNrdcRGQCMQzDc0H749hpVRWktOk2KK1r xoYPpbNdM2EolSRcOPsnRyDWYq4MpVdYRnAvbvZS8Nr0IrxKPhMtWYxgzIGU6w9h z2M9A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=6PUeJIjFzIKouqqkmIITRf8eOURA2YvVOn1fUNIG3 0Q=; b=F7MXAecGXzm2Ua6Nge2HItk2odR9/iDOEbCbgiEtCAc7q9KedKsguY8AJ 3RWn1qmmDtR65qJwsXQ3CkOKSDJW9u9CZvkC8T8vnfVPRg4rOTf6nzIcKhrtkmH5 MdO4swiVljMX6XZahsXm0fvQRRvlsN8khCVHlAuoAubblH9Kc6otn5WC4vLBeWNx SGNzx32yQJhoMVYo60i911WSuMQZlmxqmCHiAyaE2GfczlwwPQLbbKFhxEriliOB sECRJs4WJ5HQzAZVaxvtfhiHs055if4z/L2xvaPfMPzIfrJKO0cuhV4A24QOG7/X iKtFC18PmM/pzqhihTa614dkkpbtA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrfeeggddufedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucfkphepjedurddvuddvrddufeejrddvfeegnecurfgrrhgrmhepmhgrihhlfhhr ohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsth gvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.3] (unknown [71.212.137.234]) by mail.messagingengine.com (Postfix) with ESMTPA id 0466A80068; Thu, 26 Sep 2019 15:02:31 -0400 (EDT) Subject: Re: row_to_json white space To: Mark Lybarger References: <1a421353-66ef-018d-2f69-7b151ced5b82@aklaver.com> Cc: pgsql-general From: Adrian Klaver Message-ID: <6ab6bf56-03fd-14e2-30f8-381248fb54d8@aklaver.com> Date: Thu, 26 Sep 2019 12:02:31 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/26/19 11:54 AM, Mark Lybarger wrote: Ccing the list so folks know the problem is solved. > Problem is on my end.  My tool was showing the space removed and infact > it wasn't.  Copy paste from dbeaver to notepad++ shows the spaces are > preserved. > > On Thu, Sep 26, 2019 at 2:49 PM Adrian Klaver > wrote: > > On 9/26/19 10:54 AM, Mark Lybarger wrote: > > Hi, > > > > The row_to_json seems to strip white space: > > > > select ROW_to_json(q) from (select 'foo        a   bar' as TEST) q; > > > > any help on how to preserve? > > Like Rob I do not see it: > > test=# select version(); >                                        version > > ------------------------------------------------------------------------------------ >   PostgreSQL 11.5 on x86_64-pc-linux-gnu, compiled by gcc (SUSE Linux) > 4.8.5, 64-bit > (1 row) > > test=# select ROW_to_json(q) from (select 'foo        a   bar' as > TEST) q; >            row_to_json > ------------------------------- >   {"test":"foo        a   bar"} > (1 row) > > > Do you possibly have an overloaded function of the same > name(ROW_to_json())? > > > > > > Thanks! > > -mark- > > > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com