CREATE OR REPLACE FUNCTION get_name_length(name TEXT) RETURNS INT AS $$ BEGIN RETURN CHAR_LENGTH(name); END; $$ LANGUAGE plpgsql;