6

In case of an error:

PG::Error: ERROR: numeric field overflow DETAIL: A field with precision 2, scale 2 must round to an absolute value less than 1

How do I configure postgres or ruby/rails_4 pg library to tell me which field raises the error? Understandable error message will be:

PG::Error: ERROR: numeric field overflow. Field "pressure", value "1111.12"

1
  • 1
    Rails is just repeating PostgreSQL's error message, which unfortunately doesn't have that information. From memory at the location within the code where that check is being made PostgreSQL does not have easy access to the context in which the numeric value is being used. It's certainly painful for debugging though. Commented Jul 8, 2013 at 11:31

1 Answer 1

1

This is a limitation of PostgreSQL's error reporting and can not be configured with PostgreSQL, rails or the pg gem.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.