fix psql output collection
fix exception handling
fetch queries from db
http posting