Re: hstore or jsonb ?
Bzzzz <lazyvirus@gmx.com>
From: Bzzzz <lazyvirus@gmx.com>
To: hubert depesz lubaczewski <depesz@depesz.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>,
pgsql-novice@lists.postgresql.org
Date: 2022-11-15T18:51:55Z
Lists: 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