pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergei Kornilov <sk@zsrv.org>
To: Eugene Pazhitnov <pazhitnov@gmail.com>
To: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: jsonb merge with update ... on conflict do
Date: Tue, 01 Jun 2021 14:58:04 +0300
Message-ID: <469851622548513@mail.yandex.ru> (raw)
In-Reply-To: <CAGfKbExSO8SWxGUM+=1fxeZaNHknvmfBiqqVyQ2zMNFbQSm1Nw@mail.gmail.com>
References: <CAGfKbExSO8SWxGUM+=1fxeZaNHknvmfBiqqVyQ2zMNFbQSm1Nw@mail.gmail.com>

Hello
You meant 

... do update set price=test.price || '{"CA":20}'::jsonb;

? Or possibly

... do update set price=test.price || EXCLUDED.price;

?
In other words, why did you expect the result {"CA":20,"RU":10} ?

regards, Sergei





view thread (3+ messages)  latest in thread

Message-ID: <469851622548513@mail.yandex.ru>
Permalink:  ../469851622548513@mail.yandex.ru/
Also on:    postgresql.org/message-id/469851622548513@mail.yandex.ru

 · 

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-bugs@postgresql.org
  Cc: sk@zsrv.org, pazhitnov@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: jsonb merge with update ... on conflict do
  In-Reply-To: <469851622548513@mail.yandex.ru>

* 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