PLHaskell README

The project's README from github.com/ed-o-saurus/PLHaskell. As one markdown file: README.md.

PL/Haskell

This project is a "procedural language" extension of PostgreSQL allowing the execution of code in Haskell within SQL code. Despite the name, Haskell is, of course, not a procedural language as it is a functional language. However, "procedural language" is the term that PostgreSQL uses to describe languages that can be embedded in its SQL code.

The extension allows users, even unprivileged ones, to write, install, and run functions written in Haskell.

Copyright (C) 2026 Edward F. Behn, Jr.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Bugs and Features

Bug reports and feature requests should be submitted in the Github issues page.

Prerequisites

This document assumes that the reader is familiar with PostgreSQL (specifically procedural languages) and with the Haskell language.

Further Reading

PLHaskell (ed-o-saurus/PLHaskell)

Searching Database…

What is this?PL/Haskell is a PostgreSQL extension — a 'procedural language' — that lets you write, install, and run functions written in Haskell directly from SQL code.
Is this a standalone app or a PostgreSQL extension?It is not a separate application — it is a procedural-language extension that plugs into an existing PostgreSQL server, the same way PL/pgSQL or PL/Python do.
How do I build and install it into PostgreSQL?The README has a dedicated 'Build and Install' guide covering compiling the extension and loading it into your PostgreSQL instance.
Do I need GHC installed to use this?Yes — since every function is compiled Haskell code, you need the Glasgow Haskell Compiler (GHC) on the server; the docs even have a dedicated section on GHC version compatibility.
Can unprivileged database users safely run Haskell code with this?PL/Haskell is explicitly designed so that even unprivileged users can write, install, and run Haskell functions, with a separate 'Trust' section in the docs covering the security model around that.
Why call it a 'procedural language' if Haskell is functional?PostgreSQL uses 'procedural language' as its generic umbrella term for any language embeddable in SQL, regardless of its actual paradigm — that's why Haskell, a functional language, is still labeled a PL here.
Does it support multiple GHC versions?The docs include a dedicated 'GHC Version' section, implying version compatibility is tracked, but specific supported versions aren't detailed in the available README excerpt.
What are similar projects?kafgres, pg-jev, dataease, QloApps, unison, prql, postgres, cube
Size
0.6 MB
Stars
148
Age
4y
Commits · 90 Days