left ( string text, n integer ) → textReturns first
n characters in the string, or when n is negative, returns all but last |n| characters.left('abcde', 2) → abFunctions / String Functions And Operators
Returns first n characters in the string, or when n is negative, returns all but last |n| characters.
Reading PG 18current·documented in 17 of 27 versions, 9.1 to 20
left ( string text, n integer ) → textReturns first
n characters in the string, or when n is negative, returns all but last |n| characters.left('abcde', 2) → abDefinition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source