docs: function pg_query(query, params) {
  	return function(db) {
  		var start_time = new Date();
  		return do_query(db, query, params).then(function() {
  
  			var end_time = new Date();
  
  			db._record_sample({
  				'event': 'query',
  				'start': start_time,
  				'end': end_time,
  				'query': query,
  				'params': params
  			});
  
  			return db;
  		});
  	};
  }