Funções de texto
Todas as funções desta página recebem text e retornam text, salvo indicação. Comprimentos
contam caracteres Unicode; octet_length conta bytes UTF-8.
| Função | Assinatura/retorno |
|---|---|
length, char_length, octet_length | text → int4 |
lower, upper | text → text |
substr, substring | (text, int4) ou (text, int4, int4) → text |
btrim, ltrim, rtrim | (text) ou (text, text) → text |
replace | (text, text, text) → text |
strpos | (text, text) → int4 |
left, right | (text, int4) → text |
lpad, rpad | (text, int4) ou (text, int4, text) → text |
repeat | (text, int4) → text |
reverse, initcap | text → text |
ascii | text → int4 |
chr | int4 → text |
concat, concat_ws | sobrecargas → text |
split_part | (text, text, int4) → text |
translate | (text, text, text) → text |
starts_with | (text, text) → bool |
concat ignora argumentos NULL. concat_ws retorna NULL se o separador for NULL.