Add unit tests for PostgreSQL simple queries