[New] Implemented PostgreSQL querying