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 1iDYpV-0005L6-M2 for pgsql-general@arkaria.postgresql.org; Thu, 26 Sep 2019 18:49:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iDYpT-00030D-Rl for pgsql-general@arkaria.postgresql.org; Thu, 26 Sep 2019 18:49:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iDYpS-000306-2o for pgsql-general@lists.postgresql.org; Thu, 26 Sep 2019 18:49:27 +0000 Received: from [66.111.4.28] (helo=out4-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iDYpP-0004Zu-4Y for pgsql-general@postgresql.org; Thu, 26 Sep 2019 18:49:25 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 03E7821448; Thu, 26 Sep 2019 14:49:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 26 Sep 2019 14:49:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=I paj3i8Iso3Xo1M4rMxiHuj9EOgcQdkAI6wqjWWiP0M=; b=ZijbQbBCL5BhsrDkW v4NNtvQSrlDzKBUcbIjfH6DKlXjz3pck6P86jS8/Eg0ZMULS8f/ia8K2DJ6ktfEf xVOtFr2ffFi6ER0eRV08uTPQ6QuRG0fQ7EFIFQX4XImhF9d0rXQDEeUMJuPyUOjj uoSTTxROTZXWFzcor0gDSRTF2G1oa4hTByoK9v3UAJhfCcSpTaJVkCz0F+aNnPo1 mH6SI8phEmvjByx24mDLLlVIq3IQVvmVroHe4N9q4kXHVOuVPARshxMiOzX/LX4R 6MGlxVIwZ4ldkk5zkF6772K8foDIoefGQHvN3nrsk6h28QD+iRWXJaPsoV2AX4hu O8oeQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=Ipaj3i8Iso3Xo1M4rMxiHuj9EOgcQdkAI6wqjWWiP 0M=; b=UyeSah5lQ9PyPhAGB9QGwe0KSxzYoQc1DKz7sANfkNsYcszadtHRIO75n DV/QzcqgLtrQMLbOe5qSw5mxrtZytvLAGDoRTzl3N/1bfS/sKkm7Djz0Yi7CSTiF d8mgrb3sZNhqBi+HZXHvTHrf6+E5Lua8XVwVFgpGlP867XFN88B5zO3nFgUWb5W5 7SwPR0n2Tu99iLETCKwhIbtnZlPjM2jwDZWPB5nsYDsmnBpY24bsXMwtBx7gQImW 23yc1UTxmywpuEbN20acM61+bi9IHYctJ38DcQCWKcf24096wM2ZrlLojpFYsVEX 641MTBFeBN6v9DShF8Mh/OiMD9tAQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrfeeggdduvdelucetufdoteggodetrfdotf 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 203A380063; Thu, 26 Sep 2019 14:49:11 -0400 (EDT) Subject: Re: row_to_json white space To: Mark Lybarger , pgsql-general@postgresql.org References: From: Adrian Klaver Message-ID: <1a421353-66ef-018d-2f69-7b151ced5b82@aklaver.com> Date: Thu, 26 Sep 2019 11:49:10 -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 X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.28 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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