5 ms·
Using JSON with PostgreSQL
- PeterZaitsev 5y agoFeatures review and benchmarks of various ways to store JSON in PostgreSQL
- riedel 5y agoI found it quite annoying that jsonb does not support /u0000 in strings.
- jackhalford 5y agoI was looking for a way to pretty print json in postgres today, the simplest I came up with is a 'json_mode.sql' script: \t on \pset pager always \pset format unaligned \setenv PAGER 'jq .' then all selects of a json column are readable.
- ttfkam 5y agoWhy not: jsonb_pretty(jsonb) → text or jsonb_to_record(jsonb) → record jsonb_to_recordset(jsonb) → setof record https://www.postgresql.org/docs/current/functions-json.html https://www.postgresql.org/docs/current/functions-json.html
- jackhalford 5y agoI came across this while googling but it seems the jsonb_pretty function isn't available in my postgres