HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
pgcentralfoundation
pgrx
Rust2020–2026
pgcentralfoundation / pgrx

pgrx

Build Postgres Extensions with Rust!

26Distinct people
36Mentions
1Explicit recommenders
4.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Build Postgres Extensions with Rust!

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I love sqlite and rust extension which author has given gets me excited. Last week saw a similar project in rust to built Postgres extensions https://github.com/tcdi/pgx Hope I…

senthilnayagam used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 9:01:12 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year36 dated mentions

Observed mentions: 2020-07-13 14:27:39 UTC to 2026-04-25 08:16:19 UTC.

0369122020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 11 mentions; 0 submissions, 11 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 9 mentions; 1 submissions, 8 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC312
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC303
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC11011
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC514
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC918
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC413
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC110

What Hacker News says

3 sources
(NB: Post author here!) This is all true! We have a bit more info on that choice in this post [1]. But in general the Toolkit extension [2] is meant to have a bit of a lighter touch than the core TimescaleDB extension [3], it's meant for moving faster and working almost entirely with the custom functions/types/operators type approach rather than the core extension which is integrated much more deeply into the planner & executor and deals with a number of other hooks. It would be possible to do that in Rust, but because it's so deeply integrated with the main Postgres codebase there would just be a lot of translation going on and you'd get a lot less of the benefits of working in Rust. So C is more natural for much of the core DB extension. PGX [4] is also a huge help for writing this sort of extension. The point of Toolkit is really to m
Read the rest
ove much faster, try lots of things, mostly using the more SQL facing API (CREATE FUNCTION, CREATE AGGREGATE and the like). And PGX helps manage all of that really nicely. The rest of Rust being available is also great and we like working in the language, but without PGX it'd be a lot harder and we couldn't move nearly as fast. [1]: https://blog.timescale.com/blog/introducing-hyperfunctions-n... [2]: https://github.com/timescale/timescaledb-toolkit [3]: https://github.com/timescale/timescaledb [4]: https://github.com/zombodb/pgx
In Function pipelines: Building functional programming into PostgreSQL
I think the existing int64, microsecond-precision timestamptz type is a good compromise of space and performance for precision for many use cases. Indeed, there are use cases where greater precision is desired. One of the features of PostgreSQL I appreciate is the ability to extend its types. There are a number of type extensions available. See https://pgxn.org for a list of popular extensions. I don't know of an existing nanosecond-precision timestamptz type, but it's not that much of a lift to create one yourself. I've muddled through C a couple of times to do so. Often I pick an existing extension that's similar to what I want to do, and modify it. And if Rust is more to your liking, there's a toolkit for building extensions in Rust as well: https://github.com/zombodb/pgx A drawback of using custom extensions is you're often limited to
Read the rest
then managing your own PostgreSQL installation as most PostgreSQL SaaS offerings don't support installation of third-party C extensions. If nanosecond precision is a core aspect of your work, then it may very well be worth the effort. Another option is to store nanoseconds in an additional integer column. If you want, you can create a composite type (https://www.postgresql.org/docs/13/rowtypes.html) of timestamptz and integer, which might make things more manageable (or less, depending on your PostgreSQL driver support for composite types). This allows you to use stock PostgreSQL while you handle the data stitching in your application.
In Postgres: The Batteries Included Database

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.