PostgreSQL Merges JSON_TABLE(), Incremental JSON Parser

Written by Michael Larabel in Programming on 4 April 2024 at 09:48 AM EDT. Add A Comment
PROGRAMMING
For years the PostgreSQL database server has been adding various JSON features while now the latest addition for dealing with JavaScript Object Notation (JSON) structured data is the JSON_TABLE() SQL function.

The JSON_TABLE() function allows for JSON data to be converted into a relational view that in turn can be used within FROM clauses and the like. JSON_TABLE() has been one of the last remaining JSON SQL functions not implemented by PostgreSQL MySQL / MariaDB, Oracle, and some other database solutions already offer a JSON_TABLE() function. From the new PostgreSQL documentation:
"JSON_TABLE is an SQL/JSON function which queries JSON data and presents the results as a relational view, which can be accessed as a regular SQL table. You can use JSON_TABLE inside the FROM clause of a SELECT, UPDATE, or DELETE and as data source in a MERGE statement."

The initial JSON_TABLE() support for PostgreSQL was merged today for Git. This in turn will be part of the next major release, PostgreSQL 17.

PostgreSQL logo


Also merged today is a non-recursive JSON parser for PostgreSQL. This alternative JSON parser for PostgreSQL can be used for incrementally parsing data but at the cost of being slower than the recursive descent parser.

Initially making use of that new JSON parser is code for incrementally parsing backup manifests. All of this code was merged today for PostgreSQL Git.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week