Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

numeric field overflow - which field exactly?

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"

like image 486
vzdor Avatar asked Jul 08 '13 11:07

vzdor


1 Answers

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

like image 76
jamesharker Avatar answered Oct 13 '22 00:10

jamesharker