public inbox for [email protected]  
help / color / mirror / Atom feed
From: Erik Rijkers <[email protected]>
To: Jonathan S. Katz <[email protected]>
To: PostgreSQL Advocacy <[email protected]>
Subject: Re: PostgreSQL 14 Beta 1 release announcement draft
Date: Tue, 18 May 2021 12:33:24 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>


14beta1.md mentions subscripting:

"PostgreSQL 14 now adds a general subscripting framework for retrieving
information in nested objects. For example, using the `JSONB` data type 
with,
you now are able to retrieve nested info just using the `.` operator (e.g.
`this.now.works.to.retrieve.this.json.data`)."

Is this correct?  I thought the provided JSON subscripting functionality is:

select
     jsonb_pretty(js)
   , js['this']
   , js['this']['now']
   , js['this']['now']['works']
   , js['this']['now']['works'][1]
from
   (values ('{"this": { "now": {"works": [1,2] } } }'::jsonb)) as f(js)
;
       jsonb_pretty      |             js             | js         |   
js   | js
------------------------+----------------------------+-------------------+--------+----
  {                     +| {"now": {"works": [1, 2]}} | {"works": [1, 
2]} | [1, 2] | 2
      "this": {         +| |                   |        |
          "now": {      +| |                   |        |
              "works": [+| |                   |        |
                  1,    +| |                   |        |
                  2     +| |                   |        |
              ]         +| |                   |        |
          }             +| |                   |        |
      }                 +| |                   |        |
  }                      | |                   |        |
(1 row)

Where can the `.` operator be used in JSON(B)? What did I miss?


Erik Rijkers


On 5/17/21 5:01 PM, Erik Rijkers wrote:
> On 5/17/21 4:15 PM, Jonathan S. Katz wrote:
>> Please see the attached draft for the PostgreSQL 14 Beta 1 release
>> announcement this week.
>
> [..]
>
> Here are a few changes:
>
>
> when the `async_capable` flag is it.  should be:
>
> when the `async_capable` flag is set.
>
>
> can on foreign tables.   should be:
> on foreign tables.
>
>
> using the `JSONB` data type with,   should be:  using the `JSONB` data 
> type,
>
>
> Admittedly I am not a native speaker but that I do not understand
>
> 'bubble' is perhaps reason to rephrase?
>
>
> command in can now   should be:
> command can now
>
>
> Thank you,
>
> Erik Rijkers
>
>
>
>
>





view thread (12+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: PostgreSQL 14 Beta 1 release announcement draft
  In-Reply-To: <[email protected]>

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

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