Appears on
Articles15
Edge-compatible Serverless Driver for Postgres
Serverless computing has a range of benefits. It means quick and simple deployments with no servers to manage or maintain. It means true scalability, serving a large demand without breaking a sweat if and when you get it. (On the other hand, it also means pay-per-use, so you don’...
Quicker serverless Postgres connections
Neon’s serverless driver redirects the PostgreSQL TCP wire protocol over WebSockets. This makes ordinary, fully-functional PostgreSQL connections accessible from new environments — including serverless platforms like Cloudflare Workers and Vercel Edge Functions. A key feature of...
When LIMIT 9 works but LIMIT 10 hangs
I got a Slack message from colleagues at a major partner. They’d updated their dev environment to support WebSockets, so that Neon’s serverless driver could be used there, but then they’d run into a weird issue. The nub of it was this: This hangs: This works Reproducibly, the que...
Parsing JSON from Postgres in JS? Don’t get the wrong number
Back in 2010, my first production Postgres database used a couple of JSON columns to provide some flexibility around the main schema. From the point of view of the database, those columns were actually just text. But Postgres got a native JSON type soon after (with version 9.2 in...
MITM attacks are easier to avoid with psql (Postgres) 16
The psql client accepts a new connection string option in Postgres 16: ?sslrootcert=system. This new option makes it simpler than ever to connect a secure interactive session to your Neon database: You can use psql version 16 with this new option even if your Neon database is sti...
How to use NPM packages outside of Node
npm is bursting with useful libraries. But many of them assume they’re running in Node.js, and throw errors elsewhere. Based on his experience developing Neon’s serverless driver, George shows how you can run NPM packages in other places — such as Vercel Edge Functions, or even w...
Bringing psql’s \d to your web browser
Different database systems provide different ways to list or describe the things they hold. For instance, to find a particular table and column in MySQL, you run SHOW TABLES followed by SHOW COLUMNS FROM my_table. In SQLite, you do .tables and then .schema my_table. And in Postgr...
Export to CSV, JSON and XLSX from the Neon console
After spending a bit of time with Neon’s SQL Editor making \d and friends work, there were a couple of other things I wanted to bring to it, both related to the query results. The first was a simple expand-to-window control for the results pane, to get a better and less cramped l...
How and when to use btree_gist
The right indexes make big SQL queries fast. If you’ve been using Postgres for more than 5 minutes, you’re almost certainly familiar with the everyday B-Tree index. This can deal with data that has a one-dimensional ordering: numbers, timestamps, text, and so on. And if you’ve ha...
Build an end-to-end RAG pipeline entirely in psql using pgrag and DeepSeek
Retrieval-Augmented Generation (RAG) works by taking a user’s question, searching for information relevant to that question, and then including the retrieved information alongside the question in a prompt to an AI chat model: ChatGPT/Claude/DeepSeek, please answer question X usin...
@neondatabase/serverless hits 1.0.0
Neon’s serverless driver for JavaScript and TypeScript carries SQL queries over HTTP and WebSockets. It’s designed for use in environments where raw TCP connections aren’t available and/or low connection latencies are important. That includes V8 isolate-based serverless functions...
Why Postgres needs better connection security defaults
In this post: why are Postgres connections with sslmode=require insecure? How does Neon ensure secure connections? And what needs to happen to make secure Postgres connections the norm? It’s common to see sslmode=require on the end of a Postgres connection string. Maybe your own...
Introducing Elephantshark, a tool to monitor Postgres network traffic
Elephantshark helps you monitor, understand and troubleshoot Postgres network traffic: that’s Postgres servers, clients, drivers and ORMs talking to Postgres servers, proxies and poolers. Elephantshark sits between the two parties in a Postgres-protocol exchange, forwarding messa...
Zero-ETL lakehouses for Postgres people
Neon is made by Postgres people. Since Neon became part of Databricks, we Postgres people also find ourselves part of a larger organisation of enterprise data people. This post is about what I’ve learned as a result. It aims to explain ‘data lakehouses’ and related enterprise-dat...
Ctrl-C in psql gives me the heebie-jeebies
There are a few different reasons to hit the brakes on a Postgres query. Maybe it’s taking too long to finish. Maybe you realised you forgot to create an index that will make it orders of magnitude quicker. Maybe there’s some reason the results are no longer needed. Or maybe you,...
