Recursive syntax in PostgreSQL and PL/pgSQL can meet the requirements of analyzing events before and after a specific event in public opinion analysis scenarios.