var pgsql=require("pg");
var config={
host:'localhost',
port: 5432,
user:'postgres',
password:'123456',
database:'postgres'
};
var pool=new pgsql.Pool(config);
pool.connect(function(err,client,done){
client.query('select 1+1 as result',function(err,result){
done();
console.log("result is:",result.rows[0].result);
})
})