Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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.

FunctionSignature and return type
length, char_length, octet_lengthtext → int4
lower, uppertext → 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, initcaptext → text
asciitext → int4
chrint4 → text
concat, concat_wsoverloaded → 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.