Thank you for your thoughts!
Indeed, safety is maybe not really an issue. This is not exposed to “users” or the “internet” or such… I guess I was asking for sort of “malpractice” but also then, this question maybe is just not really relevant
It could be that jsonb_path_exists
doesn’t support indexes, I have to digg into this, first I am planning to do a small “experiment” without further optimization. I am doing this “on purpose” to test if such datastorage could be a replacement for my ageing mongodb solution. I am also open to innovative ideas (graphdb or such), but I thought I give the “normal” solution with postgres a chance but try to still keep the good parts from previous solutions. As I am integrating different datasources (files, differend DB’s, later kafka) I try to find a principle which is very modular and does not need too complicated db specific “migrations” or modeling. But I know that this “dream” is often destroyed by reality (or at least I think I have read that this is an antipattern quite often already).
I’ll do the performance part first, because now I am sort of “afraid” but then this with the “named parameters” sounds interesting. It is good to know that you don’t see a reason why this “cannot work” with fragments.
Many thanks!