update code snippets
add examples for SQL and PL/pgSQL functions