add PostgreSQL tests and fixed first issues & bugs