Re: hstore or jsonb ? - Mailing list pgsql-novice

From hubert depesz lubaczewski
Subject Re: hstore or jsonb ?
Date
Msg-id Y3PNKGcmO12JByZ4@depesz.com
Whole thread Raw
In response to Re: hstore or jsonb ?  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: hstore or jsonb ?  (Bzzzz <lazyvirus@gmx.com>)
List pgsql-novice
On Tue, Nov 15, 2022 at 06:02:51PM +0100, Laurenz Albe wrote:
> On Tue, 2022-11-15 at 09:39 +0100, hubert depesz lubaczewski wrote:
> > > "hstore" is obsolete; don't use it.
> > 
> > Do you have any support for this claim?
> 
> No.
> 
> But is there anything that hstore can that JSON cannot?

It's faster for some things:
https://www.depesz.com/2021/04/21/getting-value-from-dynamic-column-in-pl-pgsql-triggers/

And it can be trivially used to check for differences in update
triggers:
hstore(NEW) - hstore(OLD)

It's "abusability" is lower thanks to lack of nesting.

depesz



pgsql-novice by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: hstore or jsonb ?
Next
From: Bzzzz
Date:
Subject: Re: hstore or jsonb ?