PL/pgSQL is an imperative language extension that is implemented as an interpreter
layered on-top of PostgreSQL. This introduces friction during execution because
for each embedded statement, an executor must be instantiated, run, and finally
purged. In our research, we have developed methods to eliminate this problem by
Compiling PL/SQL Away,
which generates a single SQL query.
In this thesis, we investigate what happens when we compile
C functions, thus eliminating the interpretation overhead of
This project requires knowledge about
C development as well as knowledge of
PostgreSQL system internals.