nowfound

Dev tools · September 18, 2024

Parse your Postgres queries into a fully-typed AST in TypeScript

Hey all, I'm the creator of @pg-nano/pg-parser. I'm using it in pg-nano[1] to statically analyze Postgres schemas spread across multiple SQL files for a couple of reasons: 1. Each CREATE statement needs to be in topological order, so pg-nano's dev command can execute them without issue. 2. pg-nano has a plugin system like Vite that allows SQL generation based on the parsed schema. Probably to the surprise of no one, working with an untyped AST feels like you're back in the days of JavaScript, because well... you are. Most of you know by now just how great TypeScript and static types in…

Parse your Postgres queries into a fully-typed AST in TypeScript launched on September 18, 2024 with 116 votes, #484 of 5,281 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 2 years on.

Visit github.com ↗Alternativestop 9% of September 2024

In plain words

pg-nano/pg-parser converts PostgreSQL queries into a fully-typed Abstract Syntax Tree (AST) for TypeScript developers. It's designed for teams building tools that need to statically analyze Postgres schemas across multiple SQL files, such as enforcing statement ordering or generating SQL through plugins. The tool uses libpg_query to automatically generate comprehensive type definitions, eliminating manual AST typing and keeping pace with PostgreSQL updates.

written from the facts on this page · September 2026

From the sources

Parse your Postgres queries into a 100% type-safe AST (powered by libpg_query) - pg-nano/pg-parser

In the maker’s words, at launch

Hey all, I'm the creator of @pg-nano/pg-parser. I'm using it in pg-nano[1] to statically analyze Postgres schemas spread across multiple SQL files for a couple of reasons: 1. Each CREATE statement needs to be in topological order, so pg-nano's dev command can execute them without issue. 2. pg-nano has a plugin…

Does a similar job

all alternatives →
  • Pg-typesafe – Strongly typed queries for PostgreSQL and TypeScriptFeb 2026 · github.com · ▲69

    Throughout my career, I tried many tools to query PostgreSQL, and in the end, concluded that for what I do, the simplest is almost always the best: raw SQL queries. Until now, I typed the results manually and relied on tests to catch problems. While this is OK in e.g., GoLang, it is quite annoying in TypeScript. First, because of the more powerful type system (it's easier to guess that updated_at is a date than it is to guess whether it's nullable or not), second, because of idiosyncrasies (INT4s are deserialised as JS numbers, but INT8s are deserialised as strings). So I wrote pg-typesafe,…

  • PgTyped – Typesafe SQL in TypeScript and Postgres2020 · github.com · ▲269

    pgTyped - Typesafe SQL in TypeScript. Contribute to adelsz/pgtyped development by creating an account on GitHub.

  • PGlite – in-browser WASM Postgres with pgvector and live sync2024 · pglite.dev · ▲509

    Hey, Sam and the team from ElectricSQL here. PGlite is a WASM Postgres build packaged into a TypeScript/JavaScript client library, that enables you to run Postgres in the browser, Node.js and Bun, with no need to install any other dependencies. It's 3mb Gzipped, now has support for many Postgres extensions, including pgvector, and it has a reactive "live query" API. It's also fast, with CRUD style queries executing in under 0.3 ms, and larger, multi-row select queries occurring within a fraction of a single frame. PGlite started as an experimental project we shared on X, and the…

  • GraphQL for Postgres2015 · github.com · ▲195

    GraphQL for Postgres. Contribute to solidsnack/GraphpostgresQL development by creating an account on GitHub.

  • Pg_replicate – Build Postgres replication applications in Rust2024 · github.com · ▲216

    A high-performance Postgres replication engine written in Rust. Embed it in your Rust application or run it as a standalone binary. - supabase/etl

  • Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno2022 · github.com · ▲257

    Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare - porsager/postgres

More dev tools this month

the category →
  • /dev/null▲486

    a social network for devs

    Dev tools · 3d ago · dev-null.sh

  • open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.

    Dev tools · 28d ago · github.com

  • Contribute to reladraw/reladraw development by creating an account on GitHub.

    Dev tools · 26d ago · github.com

  • OpenBot▲362

    Grok Bot alternative: free, local, open-source, multiplayer

    Dev tools · 23d ago · openbot.run

  • Talanoa▲346

    Hi HN, I’m a fullstack developer, and honestly, I’ve lost count of how many side projects I’ve worked on over the years. But one idea kept coming back to me: a different kind of email client. It first came to me in 2014: “What if we could handle emails more like conversations?” Every year, I’d revisit this concept in my “Build Notes.” Ten years later, no one had built exactly what I had in mind — so I finally decided to do it myself. That’s how Talanoa was born. I wanted something focused on people, not timelines. I was tired of marking messages as unread just to remember to reply later, or…

    Dev tools · 21d ago · talanoa.email

  • CoreSpeed▲332

    One MCP for everything your agents need: apps, memory, tools

    Dev tools · 28d ago · corespeed.io

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, September 2024

the whole month →
  • Wispr Flow▲2,732

    Speak naturally, write perfectly & 3x faster in every app

    AI · 2024 · wisprflow.ai

  • Pathway▲1,335

    Get user insights 10x faster

    Work · 2024 · wynde.io

  • Personalized AI daily planning that suits your life

    AI · 2024 · beforesunset.ai

  • Osmos▲1,194

    Match with like-minded professionals for 1:1 conversations

    Growth · 2024

  • Carrot Care▲1,168

    Understand & optimise your bloodwork

    Life & fun · 2024 · carrotcare.health

  • Polar▲1,167

    An open source monetization platform for developers

    Dev tools · 2024 · polar.sh