PostgreSQL v5.1.0 Release Notes

    • 👉 Make the query object returned from client.query implement the promise interface. This is the first step towards promisifying more of the node-postgres api.

    Example:

    var client = new Client();
    client.connect();
    client.query("SELECT $1::text as name", ["brianc"]).then(function(res) {
      console.log("hello from", res.rows[0]);
      client.end();
    });