* improvements for migration to postgres 11 * tests update * fix typo * throw exception if query execution failed