pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Shaozhong SHI <shishaozhong@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Create and access a dictionary type
Date: Wed, 5 Jan 2022 17:37:14 +0100
Message-ID: <39f8bf99-0cba-912f-8edf-40776954f631@enterprisedb.com> (raw)
In-Reply-To: <CA+i5JwYxD6ND8+WW+vLkO_9sst2wjbYJ6LtZxcZ=jOgm9qqiwg@mail.gmail.com>
References: <CA+i5JwYG_m7Ka2Sw_p9r5-3LrRqz=4HsuccX-7oz4+SMtbmvhA@mail.gmail.com>
	<c699f135-2326-0fda-6623-850da6101bc8@enterprisedb.com>
	<CA+i5JwYxD6ND8+WW+vLkO_9sst2wjbYJ6LtZxcZ=jOgm9qqiwg@mail.gmail.com>

On 1/5/22 14:36, Shaozhong SHI wrote:
> I just checked operators.  I could not find any operator to set a new 
> value given a key.
> 

I'd say jsonb_set is what you're looking for.

Postgres does not have a thing that'd match the Oracle feature exactly, 
you'll have to adjust your application to use what's available.

regards


-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





view thread (8+ messages)  latest in thread

Message-ID: <39f8bf99-0cba-912f-8edf-40776954f631@enterprisedb.com>
Permalink:  ../39f8bf99-0cba-912f-8edf-40776954f631@enterprisedb.com/
Also on:    postgresql.org/message-id/39f8bf99-0cba-912f-8edf-40776954f631@enterprisedb.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tomas.vondra@enterprisedb.com, shishaozhong@gmail.com
  Subject: Re: Create and access a dictionary type
  In-Reply-To: <39f8bf99-0cba-912f-8edf-40776954f631@enterprisedb.com>
  References: <CA+i5JwYG_m7Ka2Sw_p9r5-3LrRqz=4HsuccX-7oz4+SMtbmvhA@mail.gmail.com> <c699f135-2326-0fda-6623-850da6101bc8@enterprisedb.com> <CA+i5JwYxD6ND8+WW+vLkO_9sst2wjbYJ6LtZxcZ=jOgm9qqiwg@mail.gmail.com> <39f8bf99-0cba-912f-8edf-40776954f631@enterprisedb.com>

* 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