informatica:base_de_datos:postgresql:postgresql_json
¡Esta es una revisión vieja del documento!
PostgreSQL JSON
select * from json_to_recordset( '{"a":{"b":[{"f1":2,"f2":4},{"f1":3,"f2":6}]}}'::json->'a'->'b' --inner table b ) as x("f1" int, "f2" int); --fields from table b
SELECT '{"sensor_id": "1234", "reading": {"temperature": 22.5, "unit": "C"}}'::jsonb -> 'reading' ->> 'unit' AS sensor_reading;
informatica/base_de_datos/postgresql/postgresql_json.1769560235.txt.gz · Última modificación: 2026/01/28 00:30 por admin
