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, «процедурный язык», позволяющее писать, устанавливать и выполнять написанные на Haskell функции прямо из SQL-кода.
Это отдельное приложение или расширение 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