pgwire

CI Docs

This library implements PostgreSQL Wire Protocol, and provide essential APIs to write PostgreSQL comptible servers and clients.

This library is a work in progress and in its relatively early stage. There is no guarantee for API stability. I'm constantly introducing break changes during this period. And also sorry for lack of API docs, examples may get you familiar with its usage.

Status

Usage

Server/Backend

To use pgwire in your server application, you will need to implement two key components: startup processor* and query processor. For query processing, there are two kinds of queries: simple and extended. In simple mode, the sql command is passed to postgresql server as a string. In extended query mode, a sql command follows parse-bind-describe(optional)-execute lifecycle.

Examples are provided to demo the very basic usage of pgwire on server side:

Client/Frontend

I think in most case you do not need pgwire to build a postgresql client, existing postgresql client like rust-postgres should fit your scenarios. Please rise an issue if there is a scenario.

Projects using pgwire

License

This library is released under MIT/Apache dual license.