Creating a pure JSON table

suggest change

To 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 into the table and query it efficiently. The jsonb_path_ops operator class supports @> only, not every jsonb operator.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents