string ||
string | BYTEA | String concatenation
| '\\\\Enterprise'::bytea || '\\047DB\\000'::bytea | \\Enterprise'DB\000 |
octet_length (string) | INTEGER | Number of bytes in binary string | octet_length( 'jo\\000se'::bytea) | 5 |
position (substring in string) | INTEGER | Location of specified substring | position('\\000om'::bytea in 'Th\\000omas'::bytea) | 3 |
substring (string [from INTEGER] [for INTEGER]) | BYTEA | Extract substring
| substring('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('\\000'::bytea from '\\000Tom\\000'::bytea) | Tom |
get_byte (string, offset) | INTEGER | Extract byte from string.
| get_byte('Th\\000omas'::bytea, 4) | 109 |
set_byte (string,
offset, newvalue) | BYTEA | Set byte in string.
| set_byte('Th\\000omas'::bytea, 4, 64) | Th\000o@as |
get_bit (string, offset) | INTEGER | Extract bit from string.
| get_bit('Th\\000omas'::bytea, 45) | 1 |
set_bit (string,
offset, newvalue) | BYTEA | Set bit in string.
| set_bit('Th\\000omas'::bytea, 45, 0) | Th\000omAs |