pg: more informative errors