Finished Postgres implementation