The definition below seems heavy for what it does. Can this be written more succinctly?
CREATE OR REPLACE FUNCTION "check_email"(email TEXT)
RETURNS BOOLEAN AS $$
BEGIN
RETURN email ~* '^[A-Za-z0-9._%+$-]+@[a-zA-Z0-9-]+([.][A-Za-z0-9-]+)+$';
END;
$$ LANGUAGE plpgsql;
I am not interested in shortening the regex, just the definition boilerplate.