4 ms·
I don't believe hstore supports nested structures, which would make it less than a drop in replacement for many NoSQL use cases. Native JSON support should fix
by tiwazz 13y ago
I don't believe hstore supports nested structures, which would make it less than a drop in replacement for many NoSQL use cases. Native JSON support should fix that though, so good news everyone!
http://www.postgresql.org/docs/devel/static/functions-json.html http://www.postgresql.org/docs/devel/static/functions-json.h...
- zapov 13y agoPostgres supports native nested structures. Well, as long as your structures are not circular. JSON everywhere is really a bad choice for most data structures. It's like having no structure at all.
- masklinn 13y agoWhich is pretty much what you want to build a schemaless nosql-on-postgres. Also, Posgres already has hstore (already mentioned) and XML columns, which are schemaless and "unstructured".
- zapov 13y agoWell, I'm arguing that flexible schema is better than no schema. And in practice schemaless is only about schema defined outside of database. It's a solution to the wrong problem.
- netghost 13y agohstore is just based on a text format, so if it doesn't support it normally, you could just cast the results of each query to a new hstore, something like `select (data -> foo)::hstore -> bar`. It's probably not a good idea though ;) You don't get any benefit of indices in that case, and I'm not sure what would happen with nulls.