What considerations are involved in choosing between a jsonb column and a composite type column of the same structure?
For example, consider a column like that used in the Postgres documentation:
CREATE TYPE inventory_item AS ( name text, supplier_id integer, price numeric );
What are the tradeoffs involved between this approach vs a jsonb column mirroring this structure?
For example, I suspect that the composite type won't require storing the key names for every record, whereas the jsonb type would require this.