In Postgresql, the hstore and json datatypes seem to have very similar use cases. When would you choose to use one vs. the other? Initial thoughts:

  • You can nest with json; you can't with hstore
  • Functions for parsing json won't be available until 9.3

closed as not a real question by RolandoMySQLDBA, ypercubeᵀᴹ, dezso, StanleyJohns, Mark Storey-Smith May 3 '13 at 8:53

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    And your question is? – dezso May 2 '13 at 18:10
  • 1
    read here, but even if it was validity checking alone, that is a 'good thing' – Jack Douglas May 2 '13 at 18:13
  • sorry! copied and pasted the wrong thing – alan May 2 '13 at 18:23
  • 1
    I think the last comment (it's depesz's) describes the answer very well here: depesz.com/2013/03/30/… – dezso May 2 '13 at 18:33
  • question seems pretty clear to me @dezso – ckarbass Sep 11 '14 at 1:37

Taken from http://www.depesz.com/2013/03/30/waiting-for-9-3-add-new-json-processing-functions-and-parser-api/ per dezso's comment:

Given current limitations for both datatypes, I would say that they should be used in different scenarios:

if you want indexable searches, and you’re fine with “no-nesting” limitation: use hstore. if you need nested, complicated structures, and don’t care about indexing – use json. and if you need the best from both world – you’ll have to wait to see what, and when, the future will bring.

  • What about in 9.3? – ckarbass Sep 12 '14 at 3:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.