Skip to main content

Module protocol

Module protocol 

Source
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
BackendKeyData
Bind
(F) Extended Query.
BindComplete
(B) Success reply for Bind command.
CancelRequest
(F) Cancel request which clients sends as single message in separate connection. ref InitialMessage.
Close
CloseComplete
(B) Success reply for Close command.
Describe
EmptyQuery
EmptyQueryResponse
ErrorResponse
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
NoticeResponse
ParameterDescription
ParameterStatus
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)
ParseComplete
(B) Success reply for Parse command.
PasswordMessage
PortalSuspended
(B) Alternative reply for Execute command before completing the execution of a portal (due to reaching a nonzero result-row count)
Query
ReadyForQuery
RowDescription
RowDescriptionField
SSLResponse
StartupMessage

Enums§

AuthenticationRequest
CloseType
CommandComplete
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
DescribeType
ErrorCode
https://www.postgresql.org/docs/14/errcodes-appendix.html
ErrorSeverity
Format
FrontendMessage
All frontend messages (request which client sends to the server).
InitialMessage
Initial message which client sends at the beginning of a handshake process.
NoticeSeverity
PortalCompletion
TransactionStatus

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

Traits§

AuthenticationRequestExtension
Deserialize
FrontendMessageExtension
Serialize