Bug reference: 15692 Logged by: Alisher Aliev Email address: allyanaliev@gmail.com PostgreSQL version: Unsupported/Unknown Operating system: CentOS Linux 7 Description:
create table numer (n numeric); insert into numer values (1); insert into numer values (2); insert into numer values (3); select * from numer; update numer set n = n * 10; update numer set n = n * 7777777777777777777777777; update numer set n = n ^ 1000; update numer set n = n ^ 1000;
At last command PostgreSQL comming inside infinity loop.
How long the "infinity" lasts depends on how fast your hardware is (assuming you do have enough memory to hold the result).
Which behavior did you expect? You asked the system to calculate the answer precisely, which is going to be a really long number, it's going to take some time to get you the answer.
If imprecise answer is an option, you could use floating point data type instead, like "double precision".