Trusted Language Extensions for Postgres
Trusted Language Extensions (TLEs), enabled by AWS's pg_tle extension, let Postgres extensions written in trusted languages like SQL, pl/pgsql, plv8 or pl/rust be installed from any database client via pgtle.install_extension(), without filesystem access on the server. Because C extensions are dynamically linked into the Postgres process with raw memory access, cloud providers vet them slowly. Trusted languages obey Postgres security rules, so TLEs can be distributed safely. Supabase and AWS RDS (Postgres 14.5+) both ship pg_tle, and Supabase's dbdev registry uses pgsql-http to install TLEs from a REST API using only SQL.
Related posts
- dbdev: PostgreSQL Package Manager
Supabase mediumAdeptdatabase.dev (dbdev) is a read-only preview of a package manager for PostgreSQL, playing the role npm or cargo play for other languages. It installs SQL packages as native Postgres extensions via pg_tle and pgsql-http, so they work on hosted platforms without filesystem access. On top of Postgres's own extension rules it enforces major.minor.patch semver and namespaces packages by publisher handle to prevent name and typo squatting. Example packages include an index advisor built on hypopg, PostgREST header tooling and a LangChain hybrid-search backend; the main limitation is that packages must be Trusted Language Extensions, a gap pl/rust narrows.
- Bring Your Own Extensions to Serverless PostgreSQL
Neon easyNovice
Neon now supports private and custom Postgres extensions in its serverless platform via Dynamic Extension Loading, available in beta on request. Extensions are built in a separate repository and stored in S3, configured per user in the control plane. Compute instances download control files at startup and fetch library files lazily when extension functions are first called, so extensions can be added without restarting compute. Neon plans to move default extensions into this storage too, shrinking the compute image and speeding up cold starts while reducing the attack surface in a multi-tenant environment.
- Shipping psql without psql: a pure-TypeScript Postgres client in neonctl
Neon mediumAdept
neonctl now embeds a pure-TypeScript reimplementation of psql that activates when no native psql is on the PATH. It covers the REPL, all backslash commands, output formats, connection options, SCRAM and TLS, with no native dependencies, and it was written almost entirely by Claude Code under human review. Correctness rests on a conformance harness that fetches PostgreSQL's own regression scripts and diffs output byte-for-byte against a containerized server across PG 14–18, plus an adversarial security review that caught plausible-looking bugs such as a silent sslmode downgrade and a skippable SCRAM mutual-auth check. Lessons include regression-suite hidden setup (prerequisite tables, injected settings), fixing the first diff mismatch rather than the last, and runtime-dependent TLS behavior (BoringSSL under Bun vs OpenSSL under Node).
- Postgres Language Server: Initial Release
Supabase mediumAdeptPostgres Language Server is an LSP implementation for Postgres offering autocompletion, syntax error highlighting, type-checking via PREPARE/EXPLAIN against a live database, and a Squawk-inspired linter, available for VSCode, Neovim and as a CLI. Its architecture treats each SQL statement as an independent compilation unit with the database schema as the source of truth. A custom Pratt-parser statement splitter falls back to semicolons and double newlines. libpg_query handles precise parsing of valid SQL, while tree-sitter covers incomplete input for autocompletion. On edits, only changed statements are invalidated and later statements just have their ranges shifted, so cached ASTs survive. Completions are scored from a lazily loaded in-memory schema cache, so no database query is needed per keystroke.
- postgres.new: In-browser Postgres with an AI interface
Supabase mediumAdeptdatabase.build (formerly postgres.new) runs unlimited Postgres databases entirely in the browser via PGlite, a WASM build of Postgres, paired with GPT-4o that has full autonomy over the disposable database. The LLM imports CSVs, generates Chart.js charts, builds ER diagrams from real DDL, and does in-browser semantic search using pgvector and Transformers.js. SQL errors are fed back to the model so it can self-correct, and embeddings are stored in a meta table and referenced by ID to avoid sending large vectors to the model. PGlite relies on Postgres's single-user mode plus wire protocol support, a /dev/blob virtual device for COPY, and IndexedDB/OPFS persistence. A new TypeScript library, pg-gateway, handles the startup/auth handshake so standard Postgres clients can connect to PGlite deployments.