3 ms·
I've found Postgres' Hstore type useful for this, too. I often create a "metadata" hstore field on a table and use it for random bits of data I don't want to c
by marcus_holmes 2y ago
I've found Postgres' Hstore type useful for this, too.
I often create a "metadata" hstore field on a table and use it for random bits of data I don't want to create an actual field for yet. When I find that the application needs that bit of data and in a certain format, I'll move it into an actual field.
- cryptonector 2y agohstore is basically the flat precursor to JSONB, and IMO it's as good as obsolete. I wouldn't use hstore in a new project, just JSONB.
- marcus_holmes 2y agoI get that, but I think the temptation to add too much structure to the JSONB would be too great; this is just a temporary or prototype field, so it just needs a name and a value. Hstore works great for this.
- cryptonector 2y agoAnd I get that, but also hstore is ugly. Just be disciplined :)