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 1iKuo8-0006e3-6I for pgsql-docs@arkaria.postgresql.org; Thu, 17 Oct 2019 01:42:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iKuo5-0006HI-VY for pgsql-docs@arkaria.postgresql.org; Thu, 17 Oct 2019 01:42:25 +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 1iKuo5-0006Gt-O7 for pgsql-docs@lists.postgresql.org; Thu, 17 Oct 2019 01:42:25 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKuo2-0007lh-Du for pgsql-docs@lists.postgresql.org; Thu, 17 Oct 2019 01:42:24 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 423FD20E7B; Wed, 16 Oct 2019 21:42:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 16 Oct 2019 21:42:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=VdPmisnYkjq1msrYNjN3f/TCPa5 IvIrH05suHrHE+Jk=; b=SnjSNUYOEXA5nnKJzh4f3sN553nTbyEJCfBfn7soht1 f+wTrLJoxYpEtr8MYICnGBLORFlAjQidJ0lgUUsr0/BDu5r6CdFrsowbU08+ysWu KdIIHXzphk0pamwUj0vOr0tIP9K9NOdD6i+4oqlxClXlwOrl9UJ/zMmIDDMh7BvH dMbN89N9MXNGPSujs0TXk3q/Vh45dmHO7c4yvW48Gg7yHwhdFjphSU63Qe9OvWtv FlI8Y5/yr25AV5K0A1QQG3gfX/bi39vnmYXh6EWLgIpZfnrspZPrzqxMQOwH7sTN bYphzdLLBD9OqNlByXXlMM6kI1/VgKf2xjfF1xzXiVw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=VdPmis nYkjq1msrYNjN3f/TCPa5IvIrH05suHrHE+Jk=; b=EwMYhi8GWkfqTtwMt/wh6j rHjATk6N4xX6LQKkNh9dSwqNyXHwGR8ywm6w3E/SSr/o8kBBTcJzNEpUdliRzj2P DtkbtKRbKV4mBd6iabnE+be3jqfA7SoXZaxdhu+RuhNgvy1AGaJjH6lXOM0p9qdn ZsmSvZGy7CD+VkyOjGkWTEny91Y0eW4B/nbu6f8kYP8g7baZ4XTNhKRm4vXN8g3Q pJytXuKRGa1q2g7+YfYbgVPW8nCPpVHcESxjyigcPkq5B53JjQGFBd1xVYanrNpg 9MoWxRT1nN5GiP5vCetAYbOmUH9+GkFZVGfGwUzf9t/K6HO2PyLgMc1so23W3Fqg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrjeeigdegjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhepfffhvf fukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhi vghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecukfhppeduuddurddutd dvrddukedtrddukeehnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehp rghquhhivghrrdighiiinecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id B504980059; Wed, 16 Oct 2019 21:42:19 -0400 (EDT) Date: Thu, 17 Oct 2019 10:42:16 +0900 From: Michael Paquier To: ameenahsanma@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: Table 9-40. json and jsonb Operators - Data could be more informative Message-ID: <20191017014216.GE5605@paquier.xyz> References: <157111158709.25314.5025115144658634556@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/aVve/J9H4Wl5yVO" Content-Disposition: inline In-Reply-To: <157111158709.25314.5025115144658634556@wrigleys.postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --/aVve/J9H4Wl5yVO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 15, 2019 at 03:53:07AM +0000, PG Doc comments form wrote: > the table 9.40, json and jsonb operators=20 > lists '->>' and '#>>' operators and the difference written is the second = one > go to the specific location. >=20 > I am not an expert in postgres! > But from my experience, > '#>>' can also parse the data when it is a stringified JSON, having esca= pe > charterers in it! Input is always welcome, thanks! > for ex : > for a scalar value in jsonb : "{\"attr\":\"value\"}", from which we cannot > read keys or values as such, >=20 > Query : select (column #>> '{}') from table; > will give parsed json : {"attr" : "value"} from which keys and values can= be > extracted. >=20 > please mention is there if it is right, as i struggled a lot to figure it > out! >=20 > PS: pardon my language, and my concern if it is not right! Perhaps this could be improved. How would you shape that as a patch? =46rom the source tree you would need to change the table around the section "Processing and Creating JSON Data" in src/sgml/func.sgml. -- Michael --/aVve/J9H4Wl5yVO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl2nxvgACgkQnvQgOdby QH2lOg//dVSIWne0JJpVkd57JJm+r+WfDKnBtOxx+/e8JI44kq0tYdKeIw4sj5k/ blEJ5xvEVA+2+WpIqAjrwHcMXNMHJwHBhL0wmNVOqmBASil00VBtB5kEFcRQbM4A Hd6okNMfA0/hQanrudJri5Y6UCuYG0h9WC2VHJJiJP3u35pt9tKeAmLZ0Txh0abl obspQCrciMd6FsM61R+vgUPpaul9dFhnfw6ARncgYRU3y18NRto07j94TW/i2clQ tMkXnscA9URXqf64FpJ+hUj7ezN3oRAwxnVk5q2C8e5nfZ7deCWZJrDeGE1rMPPU rvhy2xSqfv5otOUM8lp6YLxR8URbXQCEHQvPDONaIt6+cNuFwWLT1QF/Kv5CTPiH EbYLG/WyUGnrZkq7UH9bn5HNKW8/tZh+hoj+KLKUEcOE+8lJ6WCihlfrj46Owrmi WrO52ODKSKhDbERHL5Gl4cUaQT/fOWdX3veL/H1SLnHn7Sa5Xy4MVoufisY/zIaB VE7YEwzcApSVyteIdlSjMvWcI1Qqbe43GY0Up6TEqteGXDy5F0ZGDJNjSUYDFyYo HMXwtebkw/7Aju7RLlFi61r7774ANhUwEL8IEGcSHbgx2PAbsGKWLd+3QHuzmDO6 9zpU37tD8Hlmr2TCK5MRjy9hs3+X8J4cYvHFOfiDZOr0W5jo/MQ= =ZCIT -----END PGP SIGNATURE----- --/aVve/J9H4Wl5yVO--