using sample code from node-postgres to access postgres db