⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 protocol.sgml

📁 关系型数据库 Postgresql 6.5.2
💻 SGML
📖 第 1 页 / 共 3 页
字号:
		is the literal value.  Eg. Int16, Int32(42).</Para></ListItem></VarListEntry><VarListEntry><Term>	LimString<Replaceable>n</Replaceable>(<Replaceable>s</Replaceable>)</Term><ListItem><Para>		A character array of exactly <Replaceable>n</Replaceable> bytes interpreted as a '\0'		terminated string.  The '\0' is omitted if there is		insufficient room.  If <Replaceable>s</Replaceable> is specified it is the literal value.		Eg. LimString32, LimString64("user").</Para></ListItem></VarListEntry><VarListEntry><Term>	String(<Replaceable>s</Replaceable>)</Term><ListItem><Para>		A conventional C '\0' terminated string with no length		limitation.  A frontend should always read the full string		even though it may have to discard characters if its buffers		aren't big enough.<Note><Para>Is 8193 bytes the largest allowed size?</Para></Note>		If <Replaceable>s</Replaceable> is specified it is the literal value.		Eg. String, String("user").</Para></ListItem></VarListEntry><VarListEntry><Term>	Byte<Replaceable>n</Replaceable>(<Replaceable>c</Replaceable>)</Term><ListItem><Para>		Exactly <Replaceable>n</Replaceable> bytes.  If <Replaceable>c</Replaceable> is specified it is the literal		value.  Eg. Byte, Byte1('\n').</Para></ListItem></VarListEntry></VariableList></Para></sect1><Sect1><Title>Message Formats</Title><Para>This section describes the detailed format of each message.  Each can be sentby either a frontend (F), a postmaster/backend (B), or both (F & B).</para><VariableList><VarListEntry><Term>AsciiRow (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('D')</Term><ListItem><Para>		Identifies the message as an <Acronym>ASCII</Acronym> data row.		(A prior RowDescription message defines the number of		fields in the row and their data types.)</Para></ListItem></VarListEntry><VarListEntry><Term>	Byte<Replaceable>n</Replaceable></Term><ListItem><Para>                A bit map with one bit for each field in the row.  The 1st                field corresponds to bit 7 (MSB) of the 1st byte, the 2nd                field corresponds to bit 6 of the 1st byte, the 8th field                corresponds to bit 0 (LSB) of the 1st byte, the 9th field                corresponds to bit 7 of the 2nd byte, and so on.  Each bit                is set if the value of the corresponding field is not NULL.                If the number of fields is not a multiple of 8, the remainder                of the last byte in the bit map is wasted.</Para><Para>	Then, for each field with a non-NULL value, there is the following:<VariableList><VarListEntry><Term>		Int32</Term><ListItem><Para>			Specifies the size of the value of the field, including			this size.</Para></ListItem></VarListEntry><VarListEntry><Term>		Byte<Replaceable>n</Replaceable></Term><ListItem><Para>			Specifies the value of the field itself in <Acronym>ASCII</Acronym>			characters.  <Replaceable>n</Replaceable> is the above			size minus 4.                        There is no trailing '\0' in the field data; the front			end must add one if it wants one.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>AuthenticationOk (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('R')</Term><ListItem><Para>		Identifies the message as an authentication request.</Para></ListItem></VarListEntry><VarListEntry><Term>	Int32(0)</Term><ListItem><Para>		Specifies that the authentication was successful.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>AuthenticationKerberosV4 (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('R')</Term><ListItem><Para>		Identifies the message as an authentication request.</Para></ListItem></VarListEntry><VarListEntry><Term>	Int32(1)</Term><ListItem><Para>		Specifies that Kerberos V4 authentication is required.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>AuthenticationKerberosV5 (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('R')</Term><ListItem><Para>		Identifies the message as an authentication request.</Para></ListItem></VarListEntry><VarListEntry><Term>	Int32(2)</Term><ListItem><Para>		Specifies that Kerberos V5 authentication is required.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>AuthenticationUnencryptedPassword (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('R')</Term><ListItem><Para>		Identifies the message as an authentication request.</Para></ListItem></VarListEntry><VarListEntry><Term>	Int32(3)</Term><ListItem><Para>		Specifies that an unencrypted password is required.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>AuthenticationEncryptedPassword (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('R')</Term><ListItem><Para>		Identifies the message as an authentication request.</Para></ListItem></VarListEntry><VarListEntry><Term>	Int32(4)</Term><ListItem><Para>		Specifies that an encrypted password is required.</Para></ListItem></VarListEntry><VarListEntry><Term>	Byte2</Term><ListItem><Para>		The salt to use when encrypting the password.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>BackendKeyData (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('K')</Term><ListItem><Para>		Identifies the message as cancellation key data.		The frontend must save these values if it wishes to be		able to issue CancelRequest messages later.</Para></ListItem></VarListEntry><VarListEntry><Term>	Int32</Term><ListItem><Para>		The process ID of this backend.</Para></ListItem></VarListEntry><VarListEntry><Term>	Int32</Term><ListItem><Para>		The secret key of this backend.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>BinaryRow (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('B')</Term><ListItem><Para>		Identifies the message as a binary data row.		(A prior RowDescription message defines the number of		fields in the row and their data types.)</Para></ListItem></VarListEntry><VarListEntry><Term>	Byte<Replaceable>n</Replaceable></Term><ListItem><Para>                A bit map with one bit for each field in the row.  The 1st                field corresponds to bit 7 (MSB) of the 1st byte, the 2nd                field corresponds to bit 6 of the 1st byte, the 8th field                corresponds to bit 0 (LSB) of the 1st byte, the 9th field                corresponds to bit 7 of the 2nd byte, and so on.  Each bit                is set if the value of the corresponding field is not NULL.                If the number of fields is not a multiple of 8, the remainder                of the last byte in the bit map is wasted.</Para><Para>	Then, for each field with a non-NULL value, there is the following:<VariableList><VarListEntry><Term>		Int32</Term><ListItem><Para>			Specifies the size of the value of the field, excluding			this size.</Para></ListItem></VarListEntry><VarListEntry><Term>		Byte<Replaceable>n</Replaceable></Term><ListItem><Para>			Specifies the value of the field itself in binary			format.  <Replaceable>n</Replaceable> is the above size.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>CancelRequest (F)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Int32(16)</Term><ListItem><Para>		The size of the packet in bytes.</Para></ListItem></VarListEntry><VarListEntry><Term>	Int32(80877102)</Term><ListItem><Para>		The cancel request code.  The value is chosen to contain		"1234" in the most significant 16 bits, and "5678" in the		least 16 significant bits.  (To avoid confusion, this code		must not be the same as any protocol version number.)</Para></ListItem></VarListEntry><VarListEntry><Term>	Int32</Term><ListItem><Para>		The process ID of the target backend.</Para></ListItem></VarListEntry><VarListEntry><Term>	Int32</Term><ListItem><Para>		The secret key for the target backend.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>CompletedResponse (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('C')</Term><ListItem><Para>		Identifies the message as a completed response.</Para></ListItem></VarListEntry><VarListEntry><Term>	String</Term><ListItem><Para>		The command tag.  This is usually (but not always) a single		word that identifies which SQL command was completed.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>CopyDataRows (B & F)</Term><ListItem><Para>	This is a stream of rows where each row is terminated by a Byte1('\n').	This is then followed by the sequence Byte1('\\'), Byte1('.'),	Byte1('\n').</Para></ListItem></VarListEntry><VarListEntry><Term>CopyInResponse (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('G')</Term><ListItem><Para>		Identifies the message as a Start Copy In response.		The frontend must now send a CopyDataRows message.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>CopyOutResponse (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('H')</Term><ListItem><Para>		Identifies the message as a Start Copy Out response.		This message will be followed by a CopyDataRows message.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>CursorResponse (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('P')</Term><ListItem><Para>		Identifies the message as a cursor response.</Para></ListItem></VarListEntry><VarListEntry><Term>	String</Term><ListItem><Para>		The name of the cursor.  This will be "blank" if the cursor is		implicit.</Para></ListItem></VarListEntry></VariableList></Para></ListItem></VarListEntry><VarListEntry><Term>EmptyQueryResponse (B)</Term><ListItem><Para><VariableList><VarListEntry><Term>	Byte1('I')</Term><ListItem><Para>		Identifies the message as a response to an empty query string.</Para></ListItem></VarListEntry><VarListEntry>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -