Description
This is pgtenant, a library for adding automatic multitenant safety to Postgresql database queries. It works within the standard Go database/sql framework.
Pgtenant alternatives and similar packages
Based on the "Database" category.
Alternatively, view pgtenant alternatives based on common mentions on social networks and blogs.
-
Milvus
Milvus is a high-performance, cloud-native vector database built for scalable vector ANN search -
tidb
TiDB is built for agentic workloads that grow unpredictably, with ACID guarantees and native support for transactions, analytics, and vector search. No data silos. No noisy neighbors. No infrastructure ceiling. -
cockroach
CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement. -
TinyGo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM. -
groupcache
groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases. -
rqlite
The lightweight, fault-tolerant database built on SQLite. Designed to keep your data highly available with minimal effort. -
bytebase
World's most advanced database DevSecOps solution for Developer, Security, DBA and Platform Engineering teams. The GitHub/GitLab for database DevSecOps. -
go-cache
An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications. -
immudb
immudb - immutable database based on zero trust, SQL/Key-Value/Document model, tamperproof, data change history -
buntdb
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support -
pREST
PostgreSQL ➕ REST, low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new -
xo
Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server -
nutsdb
A simple, fast, embeddable, persistent key/value store written in pure Go. It supports fully serializable transactions and many data structures such as list, set, sorted set. -
lotusdb
Most advanced key-value database written in Go, extremely fast, compatible with LSM tree and B+ tree. -
gocraft/dbr (database records)
Additions to Go's database/sql for super fast performance and convenience.
SaaSHub - Software Alternatives and Reviews
Do you think we are missing an alternative of Pgtenant or a related project?
Popular Comparisons
README
Pgtenant
This is pgtenant,
a library for adding automatic multitenant safety to Postgresql database queries.
It works within the standard Go database/sql framework.
In a nutshell, you write code like this as usual:
rows, err := db.QueryContext(ctx, "SELECT foo FROM bar WHERE baz = $1", val)
but it works as if you had written:
rows, err := db.QueryContext(ctx, "SELECT foo FROM bar WHERE baz = $1 AND tenant_id = $2", val, tenantID)
This happens intelligently, by parsing the SQL query (rather than by dumb textual substitution). A large subset of Postgresql’s SQL language is supported.
This eliminates data-leak bugs in multitenant services that arise from forgetting to scope queries to a specific tenant.
The actual name of your tenant_id column is configurable,
but every table must be defined to include one.
For documentation, see https://godoc.org/github.com/bobg/pgtenant.
For more about this package and its history, see https://medium.com/@bob.glickstein/tenant-isolation-in-hosted-services-d4eb75f1cb54