From https://node-postgres.com/features/connecting , seems like we can choose between Pool
or Client
to perform query
pool.query('SELECT NOW()', (err, res) => {
console.log(err, res)
pool.end()
})
client.query('SELECT NOW()', (err, res) => {
console.log(err, res)
client.end()
})
Their functionalities look very much the same. But, the documentation doesn't explain much the difference between Pool
and Client
.
May I know, what thing I should consider, before choosing between Pool
or Client
?