Skip to content

PostgreSQL server wire protocol. Build your own server and start serving connections.

License

Notifications You must be signed in to change notification settings

general-kroll-4-life/psql-wire

 
 

Repository files navigation

PSQL wire protocol 🔌

A pure Go PostgreSQL server wire protocol implementation. Build your own PostgreSQL server with 15 lines of code. This project attempts to make it as straigt forward as possible to set-up and configure your own PSQL server. Feel free to check out the examples directory for various ways on how to configure/set-up your own server.

🚧 This project does not include a PSQL parser. Please check out other projects such as auxten/postgresql-parser to parse PSQL SQL queries.

package main

import (
	"context"
	"fmt"

	wire "github.com/jeroenrinzema/psql-wire"
)

func main() {
	wire.ListenAndServe("127.0.0.1:5432", func(ctx context.Context, query string, writer wire.DataWriter) error {
		fmt.Println(query)
		return writer.Complete("OK")
	})
}

Contributing

Thank you for your interest in contributing to psql-wire! Check out the open projects and/or issues and feel free to join any ongoing discussion.

Everyone is welcome to contribute, whether it's in the form of code, documentation, bug reports, feature requests, or anything else. We encourage you to experiment with the project and make contributions to help evolve it to meet your needs!

See the contributing guide for more details.

About

PostgreSQL server wire protocol. Build your own server and start serving connections.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.8%
  • Makefile 1.2%