On Wed, 13 Mar 2019 at 11:04, Sergei Kornilov <sk@zsrv.org> wrote: > > > At last command PostgreSQL comming inside infinity loop. > > I have message "ERROR: value overflows numeric format" very quickly for both 11.2 and HEAD versions. >
Yeah, in any modern Postgres (9.6 or later) this calculation fails with a numeric overflow in less than a millisecond for me. That's consistent with the fact that numeric calculations were improved somewhat in 9.6.
In older versions (9.0 - 9.5 inclusive), which includes 4 old unsupported versions, it takes a little over a second to fail. Certainly not an "infinity loop".
In really old versions (I tested 8.3 and 8.4) it does indeed appear to go into an near-infinite loop, but frankly, anyone running 8.4 or older has bigger problems.