Scalable PostgreSQL connection pooler
Go to file
Dmitry Simonenko d891686ca9 shapito: fix signed/unsigned stream conversion 2017-07-04 16:25:03 +03:00
sources shapito: fix signed/unsigned stream conversion 2017-07-04 16:25:03 +03:00
.gitignore soprano: update .gitignore file 2017-01-11 17:25:16 +03:00
AUTHORS shapito: renamings 2017-06-07 14:37:42 +03:00
CMakeLists.txt shapito: move src to sources 2017-06-28 15:14:01 +03:00
LICENSE sonata: add LICENSE and AUTHORS files 2016-11-08 17:39:46 +03:00
POSTGRESQL_PROTOCOL.md shapito: implement so_bewrite_row_description() 2017-06-24 16:54:23 +03:00
README.md shapito: implement so_bewrite_data_row() 2017-06-24 17:00:46 +03:00

README.md

shapito

PostgreSQL protocol-level client C library.

Library is designed to provide most of the functionality needed to write or read PostgreSQL protocol messages. Both Frontend (client to server) and Backend (server to client) messages are supported, making it possible to write client or server simulation applications.

No network part is supported. Only buffer management and packet validation.

PostgreSQL packet readers

/* Read initial message (StartupMessage, CancelRequest, SSLRequest) */
so_read_startup()

/* Read any other PostgreSQL packet */
so_read()

FRONTEND

Write messages to Backend

/* StartupMessage */
so_fewrite_startup_message()

/* CancelRequest */
so_fewrite_cancel()

/* SSLRequest */
so_fewrite_ssl_request()

/* Terminate */
so_fewrite_terminate()

/* PasswordMessage */
so_fewrite_password()

/* Query */
so_fewrite_query()

/* Parse */
so_fewrite_parse()

/* Bind */
so_fewrite_bind()

/* Describe */
so_fewrite_describe();

/* Execute */
so_fewrite_execute();

/* Sync */
so_fewrite_sync();

Read messages from Backend

/* ReadyForQuery */
so_feread_ready();

/* BackendKeyData */
so_feread_key();

/* Authentication messages */
so_feread_auth();

/* ParameterStatus */
so_feread_parameter();

/* ErrorResponse */
so_feread_error();

BACKEND

Write messages to Frontend

/* ErrorResponse */
so_bewrite_error()
so_bewrite_error_fatal()
so_bewrite_error_panic()

/* NoticeResponse */
so_bewrite_notice()

/* AuthenticationOk */
so_bewrite_authentication_ok()

/* AuthenticationCleartextPassword */
so_bewrite_authentication_clear_text()

/* AuthenticationMD5Password */
so_bewrite_authentication_md5()

/* BackendKeyData */
so_bewrite_backend_key_data()

/* ParameterStatus */
so_bewrite_parameter_status()

/* EmptyQueryResponse */
so_bewrite_empty_query()

/* CommandComplete */
so_bewrite_complete()

/* ReadyForQuery */
so_bewrite_ready()

/* ParseComplete */
so_bewrite_parse_complete()

/* BindComplete */
so_bewrite_bind_complete()

/* PortalSuspended */
so_bewrite_portal_suspended()

/* NoData */
so_bewrite_no_data()

/* RowDescription */
so_bewrite_row_description()
so_bewrite_row_description_add()

/* DataRow */
so_bewrite_data_row()
so_bewrite_data_row_add()

Read messages from Frontend

/* Read StartupMessage, CancelRequest or SSLRequest */
so_beread_startup();

/* PasswordMessage */
so_beread_password();