learn HaSQL parametric queries and use here. update tests. pretty print error messages. and check if I can run out of multicommand string here - learn how does sqitch do it.