use pq instead of sqlite3