Go Postgresql

Open-source Go projects categorized as Postgresql | Edit details

Top 23 Go Postgresql Projects

  • GitHub repo pgweb

    Cross-platform client for PostgreSQL databases

    Project mention: A nice front end for reading mysql or postgres data? | reddit.com/r/selfhosted | 2021-10-17

    For postgresql, pgweb is perfect.

  • GitHub repo usql

    Universal command-line interface for SQL databases

    Project mention: usql v0.9.4 | reddit.com/r/golang | 2021-08-29
  • Nanos

    Run Linux Software Faster and Safer than Linux with Unikernels.

  • GitHub repo go-pg

    Golang ORM with focus on PostgreSQL features and performance

    Project mention: Go for Backend development | reddit.com/r/golang | 2021-09-06
  • GitHub repo SQLBoiler

    Generate a Go ORM tailored to your database schema.

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

    I was expecting the article to contain a note about SQLBoiler (https://github.com/volatiletech/sqlboiler) and why they didn't use it, but there is no. So I was expecting SQLBoiler to be heavily mentioned in the comments, but it's not the case.

    I you want to see a (slightly heated) debate about `sqlc` versus SQLBoiler with their respective creators: https://www.reddit.com/r/golang/comments/e9bvrt/sqlc_compile...

    Note that SQLBoiler does not seem to be compatible with `pgx`.

  • GitHub repo sqlc

    Generate type safe Go from SQL

    Project mention: Compile SQL to type-safe Go | reddit.com/r/AgnosTechValley | 2021-09-30
  • GitHub repo stolon

    PostgreSQL cloud native High Availability and more.

    Project mention: PostgreSQL: Kubegres is available as open source | news.ycombinator.com | 2021-10-05

    I wonder how is this compared to Stolon https://github.com/sorintlab/stolon?

  • GitHub repo Miniflux

    Minimalist and opinionated feed reader

    Project mention: RSS Is Wonderful | news.ycombinator.com | 2021-10-23

    > In practice, getting fulltext is rare, and clients for RSS are either POC skeletons of functionality, or they're bloated and include a bunch of shit I'll never use.

    You just need the right tools. Miniflux[1], which I will never get tired of recommending at every occasion, has a scraper built-in, so you just need to enter one or two css selectors and it fetches the text for you, ready to be consumed in its excellent, HN-inspired web interface or in your client of choice.

    If you can't be bothered to self-host there is a hosted option which is only 15$/year.

    Miniflux is the reason I'm a heavy RSS user today (I follow just over 300 feeds at the moment) after years of being intrigued by the possibilities of the standard but ultimately unable to stick to it due to wrong/inadequate tooling. Miniflux was my turning point.

    [1]: https://miniflux.app

  • 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 xo

    Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server (by xo)

    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 pREST

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

    Project mention: GitHub - prest/prest: pREST (PostgreSQL REST), low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new | reddit.com/r/golang | 2021-10-18
  • GitHub repo upper.io/db

    Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.

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

    upper.io is a viable alternative to GORM. Just a suggestion.

  • GitHub repo octosql

    OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.

    Project mention: Show HN: Work with CSV files using SQL. For data scientists and engineers | news.ycombinator.com | 2021-07-18
  • GitHub repo dbmate

    :rocket: A lightweight, framework-agnostic database migration tool.

    Project mention: Database migrations with nodejs? sqlite3 / lowdb? | reddit.com/r/node | 2021-10-13

    If you want something agnostic, you can check dbmate that can do this just from CLI.

  • GitHub repo postgres-operator

    Postgres operator creates and manages PostgreSQL clusters running in Kubernetes

    Project mention: Best Way to run Postgresql for SaaS(Google Cloud) | reddit.com/r/PostgreSQL | 2021-10-21

    Zalando Operator: https://github.com/zalando/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: Postgres | PgBouncer cannot access databases (with owner login) | reddit.com/r/PostgreSQL | 2021-10-21

    Issue raied with Crunchydata too github.com/CrunchyData/postgres-operator/issues/2800

  • GitHub repo goose

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

    Project mention: Adding support for out-of-order migrations in pressly/goose | reddit.com/r/golang | 2021-10-25

    For a long time folks have been requesting the ability to apply out-of-order migrations. Happy to say we added this functionality to pressly/goose.

  • GitHub repo wal-g

    Archival and Restoration for Postgres

    Project mention: WAL-G 1.1 released: better disaster recovery for PG, MySQL, MongoDB, MS SQL | news.ycombinator.com | 2021-08-16
  • GitHub repo algernon

    :tophat: Small self-contained pure-Go web server with Lua, Markdown, HTTP/2, QUIC, Redis and PostgreSQL support

  • GitHub repo graphjin

    GraphJin - Build APIs in 5 minutes with GraphQL. An instant GraphQL to SQL compiler.

    Project mention: Secure Key Management in GraphJin the instant GraphQL to SQL service | reddit.com/r/golang | 2021-10-12
  • GitHub repo pgcenter

    Command-line admin tool for observing and troubleshooting Postgres.

    Project mention: How can I check the load of the PostgreSQL container? | reddit.com/r/PostgreSQL | 2021-06-24

    pgmetrics will not tell you anything about the load in your database and container. It is more about the details of the internal structure of the database. You can try the pgcenter tool. https://github.com/lesovsky/pgcenter

  • 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 tbls

    tbls is a CI-Friendly tool for document a database, written in Go.

    Project mention: Recommendations for a CLI-tool to generate DB diagrams? | reddit.com/r/PostgreSQL | 2020-12-28

    Check out tbls. You can create a ERD in one command

  • GitHub repo gobuffalo/pop

    A Tasty Treat For All Your Database Needs (by gobuffalo)

    Project mention: Go Tools: For database schema migrations | dev.to | 2021-02-22

    github.com/gobuffalo/pop: CLI (DSL + Explicit SQL), and

  • GitHub repo prisma-client-go

    Prisma Client Go is an auto-generated and fully type-safe database client

    Project mention: Schema-driven development in 2021 | dev.to | 2021-07-15

    From the schema, a TypeScript Prisma Client can be generated that can be used in Node.js applications - including Next.js! A Go Prisma Client is also in the works.

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-10-25.

Index

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

Project Stars
1 pgweb 7,062
2 usql 6,802
3 go-pg 4,860
4 SQLBoiler 4,343
5 sqlc 4,085
6 stolon 3,425
7 Miniflux 3,143
8 xo 2,934
9 pREST 2,904
10 upper.io/db 2,772
11 octosql 2,540
12 dbmate 2,126
13 postgres-operator 2,083
14 postgres-operator 2,040
15 goose 1,941
16 wal-g 1,913
17 algernon 1,868
18 graphjin 1,570
19 pgcenter 1,327
20 goqu 1,299
21 tbls 1,157
22 gobuffalo/pop 1,129
23 prisma-client-go 985
Find remote Postgresql jobs at our new job board 99remotejobs.com. There are 6 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
www.saashub.com