How can I literally Database Insert such JSON without actually going through the traditional Database Insert dialog and selecting the fields? It's not feasible to manually build the Database Insert as the columns may vary over time and I'd rather just throw in the JSON representation. We're talking about a lot of columns here (+50) and growing, so you can guess it's not going to be easy to deal with changing Database Inserts to add/edit new fields in the middle of the already existing 50 columns
It seems it's possible to do so for a subtable, but what about for a main table?
Sorry, haven’t tried anything like that…this dataset stays relative stable, so I haven’t faced the challenge of constantly changing schema. Still, generated columns might be easier for you than the standard stuff if there is no back door for you.
We have a medical system that stores patient data in PostGres - there’s hundreds of fields in each category and they vary from patient to patient dependent on the forms they complete. I use JSON columns for each category within the patient data and that JSON is comprised of both individual fields and embedded JSON arrays.
We do pick some fields out occasionally for use in indexing or otherwise.
We also include many of these fields for search / indexing by adding them to search tables and full text search using gin/gist columms and tsvectors. We had been using elastic search but the gin/gist capability is equally performant on 5M+ records.