<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-use-postgres-at-the-edge-fumsdngf0" -->

---
title: How to use Postgres at the Edge | daily.dev
description: Neon's serverless Postgres driver enables database access from edge environments like Vercel Edge Functions, which normally can't use TCP-based Postgres...
canonical: https://daily.dev/posts/how-to-use-postgres-at-the-edge-fumsdngf0
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to use Postgres at the Edge | daily.dev
og:description: Neon's serverless Postgres driver enables database access from edge environments like Vercel Edge Functions, which normally can't use TCP-based Postgres...
og:url: https://daily.dev/posts/how-to-use-postgres-at-the-edge-fumsdngf0
og:image: https://api.daily.dev/og/posts/fUmSdNgF0.png
og:image:alt: How to use Postgres at the Edge
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to use Postgres at the Edge

**[Neon](https://daily.dev/sources/neontech)** · 4 min read · 0 upvotes · 0 comments

## Summary

Neon's serverless Postgres driver enables database access from edge environments like Vercel Edge Functions, which normally can't use TCP-based Postgres connections. The driver proxies connections via HTTP or WebSockets, making it a drop-in replacement for node-postgres (pg). A tutorial walks through setting up Neon with Next.js API Routes, querying via SQL-over-HTTP for single queries or WebSockets via Pool/Client for multiple queries. A demo app called Ping Thing illustrates capturing geolocation data from edge requests and storing it in Neon Postgres.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://neon.com/blog/how-to-use-postgres-at-the-edge>

## Similar posts on daily.dev

- [Neon Functions: backend logic next to your data](https://daily.dev/posts/neon-functions-backend-logic-next-to-your-data-zsp0ccejk) · Neon · 20 upvotes · 3 comments
- [The Neon backend is GA: a complete set of primitives so agents can build](https://daily.dev/posts/the-neon-backend-is-ga-a-complete-set-of-primitives-so-agents-can-build-ueg1c5mpg) · Neon · 7 upvotes · 0 comments

---

Tags: [#postgresql](https://daily.dev/tags/postgresql), [#nextjs](https://daily.dev/tags/nextjs), [#serverless](https://daily.dev/tags/serverless)

[View this post on daily.dev](https://daily.dev/posts/how-to-use-postgres-at-the-edge-fumsdngf0)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to use Postgres at the Edge","url":"https://daily.dev/posts/how-to-use-postgres-at-the-edge-fumsdngf0","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-use-postgres-at-the-edge-fumsdngf0"},"datePublished":"2026-07-09T06:57:40.071Z","dateModified":"2026-07-09T07:00:16.455Z","description":"Neon's serverless Postgres driver enables database access from edge environments like Vercel Edge Functions, which normally can't use TCP-based Postgres...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b2042954b805dcdc1022c188130c2ac4?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b2042954b805dcdc1022c188130c2ac4?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Neon","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Neon","logo":"https://media.daily.dev/image/upload/s--65EDghou--/f_auto/v1724339118/logos/neontech","url":"https://daily.dev/sources/neontech"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-use-postgres-at-the-edge-fumsdngf0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"postgresql,nextjs,serverless","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Neon","item":"https://daily.dev/sources/neontech"},{"@type":"ListItem","position":3,"name":"How to use Postgres at the Edge"}]}
```

