In PostgreSQL, the SUBSTRING function is used to extract a portion of a string from within another string. It allows you to specify the starting position and the length of the substring you want to extract.
Example:
SUBSTRING(string FROM start_position [FOR length])