Text functions
All functions on this page accept text and return text unless noted otherwise. Lengths count
Unicode characters; octet_length counts UTF-8 bytes.
| Function | Signature and return type |
|---|---|
length, char_length, octet_length | text → int4 |
lower, upper | text → text |
substr, substring | (text, int4) or (text, int4, int4) → text |
btrim, ltrim, rtrim | (text) or (text, text) → text |
replace | (text, text, text) → text |
strpos | (text, text) → int4 |
left, right | (text, int4) → text |
repeat | (text, int4) → text |
reverse, initcap | text → text |
ascii | text → int4 |
chr | int4 → text |
concat, concat_ws | overloaded → text |
split_part | (text, text, int4) → text |
translate | (text, text, text) → text |
starts_with | (text, text) → bool |
concat ignores NULL arguments. concat_ws returns NULL when its separator is NULL.