Back to browse
GitHub Repository

A PostgreSQL extension that adds TypeScript as a procedural language

9 starsRust

A Postgres Extension to Write PostgreSQL Functions in TypeScript

by idd2·Mar 26, 2026·1 point·0 comments

AI Analysis

●●SolidWizardryNiche GemBig Brain

Deno runtime inside Postgres brings npm imports and sandboxing to stored procedures.

Strengths
  • Deno permission model provides sandboxing without custom security layers.
  • pgrx foundation ensures easier maintenance across Postgres versions.
  • Supports async/await and full TypeScript types unlike plv8.
Weaknesses
  • Alpha status means potential stability risks for production workloads.
  • Stored procedures remain an architectural anti-pattern for many teams.
Target Audience

Backend engineers, Database administrators

Similar To

plv8 · pljs

Post Description

Hi everyone! This is a PostgreSQL extension I've been working on that adds TypeScript procedural language support using the Deno runtime. It draws some inspiration from https://github.com/plv8/plv8 but aims to support full compatibility with TypeScript including es6 imports, async/await, and the entire node API surface area. It's written in Rust with pgrx.

Because it uses Deno under the hood, we get sandboxing "for free", and can enable or disable various features (filesystem, network etc...) via superuser Postgres GUCs.

It's still alpha quality software, but works reliably in my testing and I've implemented all of: - Typescript support - NPM Packages via deno import urls - Complex Postges types like Record and JSONB - An interface for calling back into Postgres

Try it out and open an issue with any feedback!

Similar Projects