Typescript Select Distinct Postgresql Vs Postgres Db