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

From Bzzzz
Subject Re: hstore or jsonb ?
Date
Msg-id 20221115195155.332eee6a@msi.defcon1.lan
Whole thread Raw
In response to Re: hstore or jsonb ?  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-novice
On Tue, 15 Nov 2022 18:32:24 +0100
hubert depesz lubaczewski <depesz@depesz.com> wrote:

> > 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/

Thanks for the URL, the difference is indeed quite large.

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

I didn't knew that (and it's not part of the official doc :/)

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

Yeah, it is a problem as some specs can contain a list, I discovered
that last night - so jsonb it'll be.

Jean-Yves



pgsql-novice by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: hstore or jsonb ?
Next
From: mahendrakar s
Date:
Subject: using libjansson in postgres extension