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.”

New way to search PostgreSQL documentation

PostgreSQL documentation is, generally speaking, great. But it isn’t the easiest thing to search in. Over the years I memorized urls to certain docs, but there is a limit to it. What’s more, there are certain inconsistencies. For example – most pages that describe program have name that starts with app-. But not all. Some … Continue reading “New way to search PostgreSQL documentation”

Waiting for PostgreSQL 16 – Add test scaffolding for soft error reporting from input functions.

Title: On 9th of December 2022, Tom Lane committed patch: Add test scaffolding for soft error reporting from input functions.   pg_input_is_valid() returns boolean, while pg_input_error_message() returns the primary error message if the input is bad, or NULL if the input is OK. The main reason for having two functions is so that we can … Continue reading “Waiting for PostgreSQL 16 – Add test scaffolding for soft error reporting from input functions.”

What is LATERAL, what is it for, and how can one use it?

Lately in couple of places I recommended people that they can solve their problem with queries using LATERAL. In some cases recipient of such suggestion indicated that they had no idea what LATERAL is. Which made me think that it might be good idea to write more about them (lateral queries)… Also – I know … Continue reading “What is LATERAL, what is it for, and how can one use it?”

Changes on explain.depesz.com – extracted query from auto-explain plans

Some time ago James Courtney reported missing functionality. Specifically, when one uses auto-explain, logged explains contain query text. So, when such explain is then pasted on explain.depesz.com, it stands to reason that it should be able to extract the query on its own, without having to manually extract it and put it in query box. … Continue reading “Changes on explain.depesz.com – extracted query from auto-explain plans”