This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Description
Postgres errors and "notice" (informational) messages contain a key-value pair of "fields". Currently, we parse the keys, but we don't parse the values.
Each field has a particular semantic, so the value needs to be parsed according to the key.
The possible keys and their meaning is listed here
Their corresponding representation is here
The task is to add parsing for some fields, specifically:
Severity: to extract error vs. warning, etc
Code: to extract the "sql state", which is defined here
Once a parser exists, tests should be added:
MessageDecoderSpec: to test the proper decoding of the values
SimpleQuerySpec: test that various error codes produce the correct severity and sql state values