pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: ameenahsanma@gmail.com
Subject: Table 9-40. json and jsonb Operators - Data could be more informative
Date: Tue, 15 Oct 2019 03:53:07 +0000
Message-ID: <157111158709.25314.5025115144658634556@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.4/functions-json.html
Description:

In https://www.postgresql.org/docs/9.4/functions-json.html,

the table 9.40, json and jsonb operators 
lists '->>' and '#>>' operators and the difference written is the second one
go to the specific location.

I am not an expert in postgres!
But from my experience,
'#>>'  can also parse the data when it is a stringified JSON, having escape
charterers in it! 

for ex :
for a scalar value in jsonb : "{\"attr\":\"value\"}", from which we cannot
read keys or values as such,

Query : select (column #>> '{}') from table;
will give parsed json : {"attr" : "value"} from which keys and values can be
extracted.

please mention is there if it is right, as i struggled a lot to figure it
out!

PS: pardon my language, and my concern if it is not right!

Thank you!


view thread (2+ messages)  latest in thread

Message-ID: <157111158709.25314.5025115144658634556@wrigleys.postgresql.org>
Permalink:  ../157111158709.25314.5025115144658634556@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/157111158709.25314.5025115144658634556@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, ameenahsanma@gmail.com
  Subject: Re: Table 9-40. json and jsonb Operators - Data could be more informative
  In-Reply-To: <157111158709.25314.5025115144658634556@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox