You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The btrim function in Postgres is used to remove specified characters
from both the beginning and the end of a given text string. If no
characters are provided, the function removes whitespace characters by
default.
Parameters
string (text): The input text string from which characters will be
removed.
characters (text) [optional]: The characters to remove from the
beginning and end of the input text string. If not provided, the
function will remove whitespace characters by default.
Returns
The function returns a text string with the specified characters removed
from the beginning and end.
Syntax
Description
The
btrim
function in Postgres is used to remove specified charactersfrom both the beginning and the end of a given text string. If no
characters are provided, the function removes whitespace characters by
default.
Parameters
string
(text): The input text string from which characters will beremoved.
characters
(text) [optional]: The characters to remove from thebeginning and end of the input text string. If not provided, the
function will remove whitespace characters by default.
Returns
The function returns a text string with the specified characters removed
from the beginning and end.
Examples
See Also
ltrim
: Removes specified characters from the beginning (left side)of a given text string.
rtrim
: Removes specified characters from the end (right side) of agiven text string.
Compatibility
The
btrim
function is compatible with PostgreSQL and is part of theSQL standard.
The text was updated successfully, but these errors were encountered: