8.4.1. bytea Hex Format

8.4.1. bytea Hex Format
8.4.1.bytea hexadecimal format
The “hex” format encodes binary data as 2 hexadecimal digits per byte, most significant nibble first.  The entire string is preceded by the sequence \x (to distinguish it from the escape format). In some  contexts, the initial backslash may need to be escaped by doubling it (see Section 4.1.2.1). For input, the hexadecimal digits can be either upper or lower case, and whitespace is permitted between digit  pairs (but not within a digit pair nor in the starting \x sequence). The hex format is compatible with a  wide range of external applications and protocols, and it tends to be faster to convert than the escape  format, so its use is preferred.
"Hex" format encoding binary data bytes per two hexadecimal digits, most significant bit first. The entire sequence beginning with the string \ X (to distinguish it from escaping format area). In some cases, you may need to be escaped by doubling its initial backslash (see Section 4.1.2.1 ). For input, hexadecimal number may be upper or lower case, and allow the space between the number of (but within the digital or are not allowed to \ X in the beginning of the sequence). Hexadecimal format is compatible with a wide range of external applications and protocols, and its conversion speed is usually faster than the escape format, so you prefer to use.
 
Example:
E.g:
 
SELECT '\xDEADBEEF';
 
Published 341 original articles · won praise 54 · views 880 000 +

Guess you like

Origin blog.csdn.net/ghostliming/article/details/104630703