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: arne.sommerfelt@gmail.com
Subject: 8.14.5  jsonb subscripting
Date: Tue, 09 Apr 2024 09:31:40 +0000
Message-ID: <171265510066.682.7886492568248508496@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/datatype-json.html
Description:

Using subscripts with square brackets is not supported, one must use -> or 
#> operators
The given examples result in error:

SELECT ('{"a": 1}'::jsonb)['a'];

-- Extract nested object value by key path
SELECT ('{"a": {"b": {"c": 1}}}'::jsonb)['a']['b']['c'];

-- Extract array element by index
SELECT ('[1, "2", null]'::jsonb)[1];


view thread (15+ messages)  latest in thread

Message-ID: <171265510066.682.7886492568248508496@wrigleys.postgresql.org>
Permalink:  ../171265510066.682.7886492568248508496@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/171265510066.682.7886492568248508496@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, arne.sommerfelt@gmail.com
  Subject: Re: 8.14.5  jsonb subscripting
  In-Reply-To: <171265510066.682.7886492568248508496@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