Re: Strange behavior of the random() function

2018-10-26 Thread Олег Самойлов
> 26 сент. 2018 г., в 6:35, Tom Lane написал(а): > > r.zhar...@postgrespro.ru writes: >> Can anybody explain me that strange behavior? > > It's a squishiness in the SQL language, if you ask me. Consider this > simplified query: > > select random() from generate_series(1, 3) order by random()

Re: Strange behavior of the random() function

2018-09-25 Thread Tom Lane
r.zhar...@postgrespro.ru writes: > Can anybody explain me that strange behavior? It's a squishiness in the SQL language, if you ask me. Consider this simplified query: select random() from generate_series(1, 3) order by random(); Would you expect the output of this query to appear ordered, or n

Strange behavior of the random() function

2018-09-25 Thread r . zharkov
Hello, Can anybody explain me that strange behavior? select random() as "rnd", random() as "rnd1", random() as "rnd2" from generate_series( 1, 5 ); --- 0.948556384071708 0.769186236895621 0.381390900816768 0.684488877654076 0.594888080842793 0.21123208523 0.6684085