Go Postgres

Open-source Go projects categorized as Postgres | Edit details

Top 23 Go Postgre Projects

  • GitHub repo migrate

    Database migrations. CLI and Golang library.

    Project mention: Golang for backend | reddit.com/r/golang | 2021-12-01

    Migrations: migrate

  • GitHub repo SQLBoiler

    Generate a Go ORM tailored to your database schema.

    Project mention: Golang for backend | reddit.com/r/golang | 2021-12-01

    https://github.com/volatiletech/sqlboiler cause is nice to have type safety, or sqlc, I use sqlx most of the time

  • Nanos

    Run Linux Software Faster and Safer than Linux with Unikernels.

  • GitHub repo space-cloud

    Open source Firebase + Heroku to develop, scale and secure serverless apps on Kubernetes

    Project mention: Firebase Alternative for iOS | reddit.com/r/iOSProgramming | 2021-09-04
  • GitHub repo pREST

    pREST (PostgreSQL REST), low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new

    Project mention: pREST | reddit.com/r/devopskhan | 2021-10-31
  • GitHub repo FerretDB

    A truly Open Source MongoDB alternative

    Project mention: GitHub – FerretDB/FerretDB: A truly open-source MongoDB alternative | news.ycombinator.com | 2021-12-05
  • GitHub repo postgres-operator

    Postgres operator creates and manages PostgreSQL clusters running in Kubernetes

    Project mention: PostgreSQL on Cloud SQL or GKE a Kubernetes Node? | reddit.com/r/googlecloud | 2021-11-26

    Here are a couple kubernetes operators for Postgres: zaland /postgres-operator, CrunchyData/postgres-operator.

  • GitHub repo postgres-operator

    Production PostgreSQL for Kubernetes, from high availability Postgres clusters to full-scale database-as-a-service. (by CrunchyData)

    Project mention: PostgreSQL on Cloud SQL or GKE a Kubernetes Node? | reddit.com/r/googlecloud | 2021-11-26

    Here are a couple kubernetes operators for Postgres: zaland /postgres-operator, CrunchyData/postgres-operator.

  • Scout APM

    Scout APM: A developer's best friend. Try free for 14-days. Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.

  • GitHub repo goose

    A database migration tool. Supports SQL migrations and Go functions.

    Project mention: Golang for backend | reddit.com/r/golang | 2021-12-01

    https://github.com/pressly/goose. This migration tool is close to alembic.

  • GitHub repo wal-g

    Archival and Restoration for Postgres

    Project mention: A rough proposal for sum types in Go, from a Rust compiler engineer | news.ycombinator.com | 2021-11-15

    When it's occasionally useful return (type, err), but generally the two results are distinct so there's no need to return two results in the general case when one suffices

    Indeed, I recently updated some code to return a relevant value in the error case: https://github.com/wal-g/wal-g/pull/1143/files#diff-d896e5d5...

  • GitHub repo go-oauth2-server

    A standalone, specification-compliant, OAuth2 server written in Golang.

  • GitHub repo goqu

    SQL builder and query library for golang

    Project mention: Migrating from PHP to Go | reddit.com/r/golang | 2021-09-30

    https://github.com/doug-martin/goqu for building SQL queries. Supports MySQL and Postgres at least - super handy!

  • GitHub repo pgmetrics

    Collect and display information and stats from a running PostgreSQL server

    Project mention: How to monitor streaming relication. | reddit.com/r/PostgreSQL | 2021-07-30

    pgmetrics is an open source tool that queries such things from relevant pg_catalog views and outputs json. You can even just copy out the queries you want from the code

  • GitHub repo dat

    Go Postgres Data Access Toolkit (by mgutz)

    Project mention: Twelve Years of Go | news.ycombinator.com | 2021-11-10

    There are ORMs available for Golang, but my experience has been better with packages like sqlx [1] or dat [2]. We've since been using SQLX for pretty much all DBMS related work, and regret nothing. In my experience SQLX gave us the right balance between abstraction and control.

    [1] http://jmoiron.github.io/sqlx/

    [2] https://github.com/mgutz/dat

  • GitHub repo gnomock

    Test your code without writing mocks with ephemeral Docker containers 📦 Setup popular services with just a couple lines of code ⏱️ No bash, no yaml, only code 💻

    Project mention: How to mock DB for unit tests? | reddit.com/r/golang | 2021-02-08

    You could check out Gnomock (https://github.com/orlangure/gnomock). It offers a different approach than what you asked, but maybe it'll suit your use case. It allows to easily setup a real DB like postgres in a docker container and then delete ot when tests are done.

  • GitHub repo jet

    Type safe SQL builder with code generation and automatic query result data mapping (by go-jet)

    Project mention: [HELP]One to many in sqlx. | reddit.com/r/golang | 2021-11-22

    Had a similar issue and the only Go library I've found, that can do such a scan automatically for you is this one: https://github.com/go-jet/jet.

  • GitHub repo Satellity

    Yet another open source forum written in Golang, React and PostgreSQL.

  • GitHub repo gnorm

    A database-first code generator for any language

    Project mention: We Went All in on Sqlc/Pgx for Postgres and Go | news.ycombinator.com | 2021-09-08

    I'm a big fan of the database first code generator approach to talking to an SQL database, so much so that I wrote pggen[1] (not to be confused with pggen[2], as far as I can tell a sqlc fork, which I just recently learned about).

    I'm a really big partisan of this approach, but I think I'd like to play the devil's advocate here and lay out some of the weaknesses of both a database first approach in general and sqlc in particular.

    All database first approaches struggle with SQL metaprogramming when compared with a query builder library or an ORM. For the most part, this isn't an issue. Just writing SQL and using parameters correctly can get you very far, but there are a few times when you really need it. In particular, faceted search and pagination are both most naturally expressed via runtime metaprogramming of the SQL queries that you want to execute.

    Another drawback is poor support from the database for this kind of approach. I only really know how postgres does here, and I'm not sure how well other databases expose their queries. When writing one of these tools you have to resort to tricks like creating temporary views in order infer the argument and return types of a query. This is mostly opaque to the user, but results in weird stuff bubbling up to the API like the tool not being able to infer nullability of arguments and return values well and not being able to support stuff like RETURNING in statements. sqlc is pretty brilliant because it works around this by reimplementing the whole parser and type checker for postgres in go, which is awesome, but also a lot of work to maintain and potentially subtlety wrong.

    A minor drawback is that you have to retrain your users to write `x = ANY($1)` instead of `x IN ?`. Most ORMs and query builders seem to lean on their metaprogramming abilities to auto-convert array arguments in the host language into tuples. This is terrible and makes it really annoying when you want to actually pass an array into a query with an ORM/query builder, but it's the convention that everyone is used to.

    There are some other issues that most of these tools seem to get wrong, but are not impossible in principle to deal with for a database first code generator. The biggest one is correct handling of migrations. Most of these tools, sqlc included, spit out the straight line "obvious" go code that most people would write to scan some data out of a db. They make a struct, then pass each of the field into Scan by reference to get filled in. This works great until you have a query like `SELECT * FROM foos WHERE field = $1` and then run `ALTER TABLE foos ADD COLUMN new_field text`. Now the deployed server is broken and you need to redeploy really fast as soon as you've run migrations. opendoor/pggen handles this, but I'm not aware of other database first code generators that do (though I could definitely have missed one).

    Also the article is missing a few more tools in this space. https://github.com/xo/xo. https://github.com/gnormal/gnorm.

    [1]: https://github.com/opendoor/pggen

  • GitHub repo integresql

    IntegreSQL manages isolated PostgreSQL databases for your integration tests.

    Project mention: IntegreSQL – isolated PostgreSQL databases for integration tests | news.ycombinator.com | 2021-04-30
  • GitHub repo dbq

    Zero boilerplate database operations for Go

    Project mention: Does gorm worth learning? | reddit.com/r/golang | 2021-11-08

    I'm the author of https://github.com/rocketlaunchr/dbq. It is not an orm but I built it to be much much faster than gorm.

  • GitHub repo Shield

    A standalone system that can perform backup and restore functions for a wide variety of pluggable data systems

  • GitHub repo postgres

    🐘 Run PostgreSQL in Kubernetes (by kubedb)

    Project mention: "Crossplane project is blatantly copying Kubeform without even the basic decency of attribution" | reddit.com/r/kubernetes | 2021-09-02

    Links to relevant issue and PR, and our article on the problem (FR): https://github.com/kubedb/postgres/pull/248 https://github.com/kubedb/project/issues/385 https://github.com/kubedb/project/issues/405 https://github.com/kubedb/project/issues/461 https://github.com/kubedb/project/issues/555 https://github.com/kubedb/project/issues/556 https://rtfn.fr/news/cri.news/95/

  • GitHub repo grimoire

    Database access layer for golang

  • GitHub repo polluter

    The easiest solution to seed database with Go

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2021-12-05.

Go Postgres related posts


What are some of the best open-source Postgre projects in Go? This list will help you:

Project Stars
1 migrate 7,629
2 SQLBoiler 4,467
3 space-cloud 3,302
4 pREST 2,984
5 FerretDB 2,468
6 postgres-operator 2,172
7 postgres-operator 2,146
8 goose 2,012
9 wal-g 1,963
10 go-oauth2-server 1,836
11 goqu 1,325
12 pgmetrics 708
13 dat 606
14 gnomock 583
15 jet 548
16 Satellity 519
17 gnorm 432
18 integresql 420
19 dbq 321
20 Shield 271
21 postgres 211
22 grimoire 156
23 polluter 154
Find remote jobs at our new job board 99remotejobs.com. There are 32 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives