All Projects → wgliang → Pgproxy

wgliang / Pgproxy

Licence: apache-2.0
PostgreSQL proxy server.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Pgproxy

Libpq.jl
A Julia wrapper for libpq
Stars: ✭ 109 (-22.14%)
Mutual labels:  database, postgresql
Stratosdb
☄️ ☁️ An All-in-One GUI for Cloud SQL that can help users design and test their AWS RDS Instances
Stars: ✭ 140 (+0%)
Mutual labels:  database, postgresql
Ship Hold
data access framework for Postgresql on nodejs
Stars: ✭ 110 (-21.43%)
Mutual labels:  database, postgresql
Pg flame
A flamegraph generator for Postgres EXPLAIN ANALYZE output.
Stars: ✭ 1,391 (+893.57%)
Mutual labels:  database, postgresql
Postgresql Container
PostgreSQL container images based on Red Hat Software Collections and intended for OpenShift and general usage. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
Stars: ✭ 128 (-8.57%)
Mutual labels:  database, postgresql
Postguard
🐛 Statically validate Postgres SQL queries in JS / TS code and derive schemas.
Stars: ✭ 104 (-25.71%)
Mutual labels:  database, postgresql
Postgresql Ocaml
OCaml-bindings for the PostgreSQL database
Stars: ✭ 120 (-14.29%)
Mutual labels:  database, postgresql
Qtl
A friendly and lightweight C++ database library for MySQL, PostgreSQL, SQLite and ODBC.
Stars: ✭ 92 (-34.29%)
Mutual labels:  database, postgresql
Kangaroo
SQL client and admin tool for popular databases
Stars: ✭ 127 (-9.29%)
Mutual labels:  database, postgresql
Directus
Open-Source Data Platform 🐰 — Directus wraps any SQL database with a real-time GraphQL+REST API and an intuitive app for non-technical users.
Stars: ✭ 13,190 (+9321.43%)
Mutual labels:  database, postgresql
Csv2db
The CSV to database command line loader
Stars: ✭ 102 (-27.14%)
Mutual labels:  database, postgresql
Db
Newt DB is a Python object-oriented database with JSONB-based access and search in PostgreSQL
Stars: ✭ 132 (-5.71%)
Mutual labels:  database, postgresql
Activerecord Clean Db Structure
Automatic cleanup for the Rails db/structure.sql file (ActiveRecord/PostgreSQL)
Stars: ✭ 101 (-27.86%)
Mutual labels:  database, postgresql
Pg stat kcache
Gather statistics about physical disk access and CPU consumption done by backends.
Stars: ✭ 106 (-24.29%)
Mutual labels:  database, postgresql
Pgcli
Postgres CLI with autocompletion and syntax highlighting
Stars: ✭ 9,985 (+7032.14%)
Mutual labels:  database, postgresql
Next
Directus is a real-time API and App dashboard for managing SQL database content. 🐰
Stars: ✭ 111 (-20.71%)
Mutual labels:  database, postgresql
Prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite & MongoDB (Preview)
Stars: ✭ 18,168 (+12877.14%)
Mutual labels:  database, postgresql
Entityworker.core
EntityWorker is an object-relation mapper(ORM) that enable .NET developers to work with relations data using objects. EntityWorker is an alternative to entityframwork. is more flexible and much faster than entity framework.
Stars: ✭ 91 (-35%)
Mutual labels:  database, postgresql
Backup Manager
Database backup manager for dumping to and restoring databases from S3, Dropbox, FTP, SFTP, and Rackspace Cloud
Stars: ✭ 1,589 (+1035%)
Mutual labels:  database, postgresql
Postgres Operator
Production PostgreSQL for Kubernetes, from high availability Postgres clusters to full-scale database-as-a-service.
Stars: ✭ 2,166 (+1447.14%)
Mutual labels:  database, postgresql

pgproxy

pgproxy

Build Status codecov GoDoc Code Health Code Issues Go Report Card License

pgproxy is a postgresql proxy server, through a pipe redirect connection, which allows you to filter the requested sql statement. In the future it will support multi-database backup, adapt to distributed databases and other schemes except the analyze sql statement.

You can do:

  • database read and write separation
  • database services disaster recovery
  • proxy database
  • rewrite sql statement
  • filter dangerous sql
  • monitor database operations
  • sql requests current limit and merge

Installation

$ go get -u github.com/wgliang/pgproxy

Using

As a separate application

Start or shut down the proxy server.

$ pgproxy start/stop

Use pgproxy on the command line

$ pgproxy cli

Ps: You can use it as you would with a native command line.

Be called as a package

package_example

package main

import (
	"fmt"
	"os"
	"os/signal"
	"syscall"

	"github.com/wgliang/pgproxy/cli"
)

func main() {
	// call proxy
	cli.Main("../pgproxy.conf", []string{"pgproxy", "start"})
	
	// 捕获ctrl-c,平滑退出
	chExit := make(chan os.Signal, 1)
	signal.Notify(chExit, syscall.SIGINT, syscall.SIGTERM, syscall.SIGKILL)
	select {
	case <-chExit:
		fmt.Println("Example EXITING...Bye.")
	}
}

Support

select/delete/update statement and support any case.

On the support of the sql standard:

The parser is forked from vitess's sqlparser of youtube.

In pgproxy, database tables are like MySQL(5.6,5.7) relational tables, and you can use relational modeling schemes (normalization) to structure your schema. It supports almost all MySQL(5.6,5.7) scalar data types. It also provides full SQL support within a shard, including JOIN statements. Some postgresql operations are not supported,detail see support type and keywords.

Credits

Package parser is based on sqlparser

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].