Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Parser for error and notice fields #21

Open
plaflamme opened this issue Dec 3, 2020 · 0 comments
Open

Parser for error and notice fields #21

plaflamme opened this issue Dec 3, 2020 · 0 comments
Labels
good first issue Good for newcomers

Comments

@plaflamme
Copy link
Owner

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
@plaflamme plaflamme added the good first issue Good for newcomers label Dec 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant