0

I have a issue on updating json type column element value;

UPDATE employer SET address->>'locality' = 'NYC' where "Id"='30'

address is jsonb type column and have following elements

{"region": "", "locality": "", "postal-code": "", "country-name": "CAN", "street-address": ""}

So how can I update locality element in this address column ?

Note ; Im using postgres 9.4

Thank you

Gayan
  • 1,425
  • 4
  • 21
  • 41
  • 1
    http://stackoverflow.com/questions/26703476/how-to-perform-update-operations-on-columns-of-type-jsonb-in-postgres-9-4 – Andreas Oct 22 '15 at 16:58

1 Answers1

0

There is no option for me to update jsonB element. I need to update whole jsonb object.

Thanks

Gayan
  • 1,425
  • 4
  • 21
  • 41