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…

这是什么?PL/Haskell 是一个 PostgreSQL 扩展——一种“过程语言”——让你可以直接在 SQL 代码里编写、安装并运行以 Haskell 写成的函数。
这是独立应用,还是 PostgreSQL 扩展?它不是独立的应用——它是一个插入现有 PostgreSQL 服务器的过程语言扩展,和 PL/pgSQL、PL/Python 一样。
如何构建并安装到 PostgreSQL 中?README 中有专门的 “Build and Install” 指南,涵盖扩展的编译以及加载到 PostgreSQL 实例的方法。
使用它需要安装 GHC 吗?需要——由于每个函数都是编译后的 Haskell 代码,服务器上必须有 Glasgow Haskell Compiler(GHC);文档中甚至有专门章节讲 GHC 版本兼容性。
无特权的数据库用户能安全地用它运行 Haskell 代码吗?PL/Haskell 的明确设计目标就是让无特权用户也能编写、安装和运行 Haskell 函数,文档中另有单独的 “Trust” 章节介绍与之相关的安全模型。
Haskell 是函数式语言,为什么还叫“过程语言”?PostgreSQL 把“过程语言”用作所有可嵌入 SQL 的语言的通用统称,无论其实际范式是什么——这就是为什么函数式语言 Haskell 在这里仍被标为 PL。
它支持多个 GHC 版本吗?文档中有专门的 “GHC Version” 章节,暗示对版本兼容性有所跟踪,但在现有的 README 摘录中并未详细列出具体支持的版本。
What are similar projects?kafgres, pg-jev, dataease, QloApps, unison, prql, postgres, cube
Size
0.6 MB
Stars
148
Age
4y
Commits · 90 Days