Documentation ¶
Index ¶
Constants ¶
const ( ServerIdle = 'I' ServerTransactionBlock = 'T' ServerTransactionFailed = 'E' )
Possible values are 'I' if idle (not in a transaction block); 'T' if in a transaction block; or 'E' if in a failed transaction block (queries will be rejected until block is ended).
const ( ClientBind ClientMessage = 'B' ClientClose ClientMessage = 'C' ClientCopyData ClientMessage = 'd' ClientCopyDone ClientMessage = 'c' ClientCopyFail ClientMessage = 'f' ClientDescribe ClientMessage = 'D' ClientExecute ClientMessage = 'E' ClientFlush ClientMessage = 'H' ClientParse ClientMessage = 'P' ClientPassword ClientMessage = 'p' ClientSimpleQuery ClientMessage = 'Q' ClientSync ClientMessage = 'S' ClientTerminate ClientMessage = 'X' ServerAuth ServerMessage = 'R' ServerBindComplete ServerMessage = '2' ServerCommandComplete ServerMessage = 'C' ServerCloseComplete ServerMessage = '3' ServerCopyInResponse ServerMessage = 'G' ServerDataRow ServerMessage = 'D' ServerEmptyQuery ServerMessage = 'I' ServerErrorResponse ServerMessage = 'E' ServerNoticeResponse ServerMessage = 'N' ServerNoData ServerMessage = 'n' ServerParameterDescription ServerMessage = 't' ServerParameterStatus ServerMessage = 'S' ServerParseComplete ServerMessage = '1' ServerPortalSuspended ServerMessage = 's' ServerReady ServerMessage = 'Z' ServerRowDescription ServerMessage = 'T' )
http://www.postgresql.org/docs/9.4/static/protocol-message-formats.html
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerStatus ¶
type ServerStatus byte
ServerStatus indicates the current server status. Possible values are 'I' if idle (not in a transaction block); 'T' if in a transaction block; or 'E' if in a failed transaction block (queries will be rejected until block is ended).
type Version ¶
type Version uint32
Version represents a connection version presented inside the connection header
const ( Version30 Version = 196608 // (3 << 16) + 0 VersionCancel Version = 80877102 // (1234 << 16) + 5678 VersionSSLRequest Version = 80877103 // (1234 << 16) + 5679 VersionGSSENC Version = 80877104 // (1234 << 16) + 5680 )
The below constants can occur during the first message a client sends to the server. There are two categories: protocol version and request code. The protocol version is (major version number << 16) + minor version number. Request codes are (1234 << 16) + 5678 + N, where N started at 0 and is increased by 1 for every new request code added, which happens rarely during major or minor Postgres releases.
See: https://www.postgresql.org/docs/current/protocol-message-formats.html