Expand description
Implementation of PostgreSQL protocol. Specification for all frontend/backend messages: https://www.postgresql.org/docs/14/protocol-message-formats.html Message Data Types: https://www.postgresql.org/docs/14/protocol-message-types.html
Structs§
- Authentication
- Backend
KeyData - Bind
- (F) Extended Query.
- Bind
Complete - (B) Success reply for Bind command.
- Cancel
Request - (F) Cancel request which clients sends as single message in separate connection. ref
InitialMessage. - Close
- Close
Complete - (B) Success reply for Close command.
- Describe
- Empty
Query - Empty
Query Response - Error
Response - Execute
- (F) Extended Query. The Execute message specifies the portal name (empty string denotes the unnamed portal) and a maximum result-row count (zero meaning “fetch all rows”).
- NoData
- Notice
Response - Parameter
Description - Parameter
Status - Parse
- (F) Extended Query. Contains a textual query string, optionally some information about data types of parameter placeholders, and the name of a destination prepared-statement object (an empty string selects the unnamed prepared statement)
- Parse
Complete - (B) Success reply for Parse command.
- Password
Message - Portal
Suspended - (B) Alternative reply for Execute command before completing the execution of a portal (due to reaching a nonzero result-row count)
- Query
- Ready
ForQuery - RowDescription
- RowDescription
Field - SSLResponse
- Startup
Message
Enums§
- Authentication
Request - Close
Type - Command
Complete - It’s used to describe client that changes was done. The command tag. This is usually a single word that identifies which SQL command was completed. See more variants from sources: https://github.com/postgres/postgres/blob/REL_14_4/src/include/tcop/cmdtaglist.h#L27
- Describe
Type - Error
Code - https://www.postgresql.org/docs/14/errcodes-appendix.html
- Error
Severity - Format
- Frontend
Message - All frontend messages (request which client sends to the server).
- Initial
Message - Initial message which client sends at the beginning of a handshake process.
- Notice
Severity - Portal
Completion - Transaction
Status
Constants§
- VERSION_
MAJOR_ SPECIAL - The value (major version) is chosen to contain 1234 in the most significant 16 bits, this code must not be the same as any protocol version number.
- VERSION_
MINOR_ CANCEL - The value (minor version) which is used to identify CancelRequest
- VERSION_
MINOR_ GSSENC - The value (minor version) which is used to identify GSSENCRequest
- VERSION_
MINOR_ SSL - The value (minor version) which is used to identify SslRequest