Trying to do the same thing in PL/pgSQL was harder, mainly because I couldn’t find an easy way to split a string up into its individual characters.string_to_array()seems ideal, but don’t follow the same rules as Perl when it comes to the empty string: try=% select string_to_arr...