Creating a pure JSON table
suggest changeTo create a pure JSON table you need to provide a single field with the type JSONB
:
CREATE TABLE mytable (data JSONB NOT NULL);
You should also create a basic index:
CREATE INDEX mytable_idx ON mytable USING gin (data jsonb_path_ops);
At this point you can insert data in to the table and query it efficiently.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents