New gopgext tool builds PostgreSQL extensions from Go using TinyGo
A newly released tool called gopgext lets developers write PostgreSQL extensions in Go rather than C. Annotating a function with a //gopgext:function comment causes the tool to automatically generate the necessary C glue code, install scripts and control files, compiling the result via TinyGo. The project's creators label it experimental and warn against production use.
GoKawiil's interpretation of the reporting above, not reported fact.
Writing database extensions typically requires C, a barrier for many developers; a Go-based toolchain could lower that barrier and expand who can extend PostgreSQL. However, because generated code runs inside the database server process itself, the project's own warning suggests that bugs in the Go runtime or generated glue code could crash the server or corrupt data, which is why it is not yet recommended for production systems.
- gopgext generates PostgreSQL extensions from annotated Go functions using TinyGo
- It automatically produces C glue code, install scripts and control files
- The maintainers explicitly warn it is experimental and unsafe for production use
Source: jespino.github.io, 2026-11-21
Published there as: “PostgreSQL Extensions in Go”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.