Waiting for PostgreSQL 11 – Add json(b)_to_tsvector function

On 7th of April 2018, Teodor Sigaev committed patch: Add json(b)_to_tsvector function   Jsonb has a complex nature so there isn’t best-for-everything way to convert it to tsvector for full text search. Current to_tsvector(json(b)) suggests to convert only string values, but it’s possible to index keys, numerics and even booleans value. To solve that json(b)_to_tsvector … Continue reading “Waiting for PostgreSQL 11 – Add json(b)_to_tsvector function”

Waiting for PostgreSQL 11 – Transforms for jsonb to PL/Python and to PL/Perl

On 28th of March 2018, Peter Eisentraut committed patch: Transforms for jsonb to PL/Python   Add a new contrib module jsonb_plpython that provide a transform between jsonb and PL/Python. jsonb values are converted to appropriate Python types such as dicts and lists, and vice versa.   Author: Anthony Bykov <a.bykov@postgrespro.ru> and then, on 3rd of … Continue reading “Waiting for PostgreSQL 11 – Transforms for jsonb to PL/Python and to PL/Perl”

Waiting for 9.5 – Rename jsonb_replace to jsonb_set and allow it to add new values

On 1st of June, Andrew Dunstan committed patch: Rename jsonb_replace to jsonb_set and allow it to add new values   The function is given a fourth parameter, which defaults to true. When this parameter is true, if the last element of the path is missing in the original json, jsonb_set creates it in the result … Continue reading “Waiting for 9.5 – Rename jsonb_replace to jsonb_set and allow it to add new values”

Waiting for 9.5 – Additional functions and operators for jsonb

On 12th of May, Andrew Dunstan committed patch: Additional functions and operators for jsonb   jsonb_pretty(jsonb) produces nicely indented json output. jsonb || jsonb concatenates two jsonb values. jsonb – text removes a key and its associated value from the json jsonb – int removes the designated array element jsonb – text[] removes a key … Continue reading “Waiting for 9.5 – Additional functions and operators for jsonb”

Waiting for 9.4 – Introduce jsonb, a structured format for storing json.

Portuguese Brazil Version On 23rd of March, Andrew Dunstan committed patch: Introduce jsonb, a structured format for storing json.   The new format accepts exactly the same data as the json type. However, it is stored in a format that does not require reparsing the orgiginal text in order to process it, making it much … Continue reading “Waiting for 9.4 – Introduce jsonb, a structured format for storing json.”

Waiting for 9.4 – New json functions.

On 28th of January, Andrew Dunstan committed patch: New json functions.   json_build_array() and json_build_object allow for the construction of arbitrarily complex json trees. json_object() turns a one or two dimensional array, or two separate arrays, into a json_object of name/value pairs, similarly to the hstore() function. json_object_agg() aggregates its two arguments into a single … Continue reading “Waiting for 9.4 – New json functions.”

Waiting for 9.3 – Add new JSON processing functions and parser API.

On 29th of March, Andrew Dunstan committed patch: Add new JSON processing functions and parser API.   The JSON parser is converted into a recursive descent parser, and exposed for use by other modules such as extensions. The API provides hooks for all the significant parser event such as the beginning and end of objects … Continue reading “Waiting for 9.3 – Add new JSON processing functions and parser API.”

Waiting for 9.3 – JSON generation improvements.

On 10th of March, Andrew Dunstan committed patch: JSON generation improvements.   This adds the following:   json_agg(anyrecord) -> json to_json(any) -> json hstore_to_json(hstore) -> json (also used as a cast) hstore_to_json_loose(hstore) -> json   The last provides heuristic treatment of numbers and booleans.   Also, in json generation, if any non-builtin type has a … Continue reading “Waiting for 9.3 – JSON generation improvements.”