added lazy postgres connection on query.