1

I am thinking from the perspective that (I believe) jsonb is more efficient and can get indexed more easily.

1
  • I would decide this based on the type of queries that will be needed. Some things can't be done with jsonb and some things can't be done with arrays.
    – user1822
    Jan 24 at 6:57

1 Answer 1

1

There is no advantage in using a JSON type for a plain array, but I guess there is no big disadvantage either. Keep it simple and use text[].

2
  • For context, I was wondering if jsonb would produce better performance for typical checks, like checking if array contains value, than GIN index.
    – Gajus
    Jan 23 at 19:43
  • No, it should be about the same. Jan 23 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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