re-work postgres error handling
  * use full list of error codes from postgres site
  * map to two atoms, based on 2-letter prefix and full code
  * map to erbi error codes where possible