Re: hstore or jsonb ?

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Bzzzz <lazyvirus(at)gmx(dot)com>, pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: Re: hstore or jsonb ?
Date: 2022-11-15 17:32:24
Message-ID: Y3PNKGcmO12JByZ4@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bzzzz 2022-11-15 18:51:55 Re: hstore or jsonb ?
Previous Message Laurenz Albe 2022-11-15 17:02:51 Re: hstore or jsonb ?