/jsonb_delete

Hstore style delete - operator for jsonb in PostgreSQL

Primary LanguageC

jsonb_delete

Provides simple deletion of matching key-value pairs at the top level of PostgreSQL jsonb types.

When the jsonb type was added in PostgreSQL 9.4 many modifying operators and functions were unimplemented, and although most operators have been added in PostgreSQL 9.5 there is still no quick way of getting the difference of two jsonb types at the top level.

  • deletion using - operator
  • jsonb_delete(jsonb, jsonb)
CREATE EXTENSION jsonb_delete;

Was originally part of this repository, but as of PostgreSQL 9.5 there's equivalent functionality of the other parts available in core (For PostgreSQL 9.4 you can get the 9.5 functionality here).