| string ||
string | bytea | String concatenation
| E'\\\\Post'::bytea || E'\\047gres\\000'::bytea | \\Post'gres\000 |
get_bit(string, offset) | int | Extract bit from string
| get_bit(E'Th\\000omas'::bytea, 45) | 1 |
get_byte(string, offset) | int | Extract byte from string
| get_byte(E'Th\\000omas'::bytea, 4) | 109 |
octet_length(string) | int | Number of bytes in binary string | octet_length( E'jo\\000se'::bytea) | 5 |
position(substring in string) | int | Location of specified substring | position(E'\\000om'::bytea in E'Th\\000omas'::bytea) | 3 |
set_bit(string,
offset, newvalue) | bytea | Set bit in string
| set_bit(E'Th\\000omas'::bytea, 45, 0) | Th\000omAs |
set_byte(string,
offset, newvalue) | bytea | Set byte in string
| set_byte(E'Th\\000omas'::bytea, 4, 64) | Th\000o@as |
substring(string [from int] [for int]) | bytea | Extract substring
| substring(E'Th\\000omas'::bytea from 2 for 3) | h\000o |
trim([both]
bytes from
string)
| bytea | Remove the longest string containing only the bytes in
bytes from the start
and end of string
| trim(E'\\000'::bytea from E'\\000Tom\\000'::bytea) | Tom |