Reading and writing types

One drawback of the current design is that all the tags and all the fields are stored in a JSONB structure. JSON is a great format if you want to have an open format where you can add new fields as necessary and even have more structured data than what you have in plain columns, …
Continue reading Reading and writing types

Parsing InfluxDB Line Protocol

In the previous post you could see how to create a background worker that received data over a socket as well as how to spawn a new background worker. In this post you will see how to write a simple parser for the InfluxDB Line Protocol and also get an introduction into PostgreSQL Memory Contexts and the Set-Returning Function (SRF) interface and learn how to write a function that returns multiple tuples.

The Nobel Art of Writing PostgreSQL Extensions

Some things in the PostgreSQL code base is very straightforward, while other things can be more tricky to follow. I find that some areas are always not well-documented and understanding the rationale and reasoning behind a solution can require some research.

If you’re a developer that is interested in database internals and database implementations in general—or PostgreSQL internals in particular—this blog is for you.

In this post you will get an introduction to the structure of extensions and how to write an extension with a simple C function returning a complex type.