Re: Using random() in update produces same random value for all

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using random() in update produces same random value for all
Дата
Msg-id 15531.1516641381@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Using random() in update produces same random value for all  (Olleg Samoylov <splarv@ya.ru>)
Ответы Re: Using random() in update produces same random value for all  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-general
Olleg Samoylov <splarv@ya.ru> writes:
> Looked like random() is "volatile", but in subselect it works like "stable".

The point here is that that's an uncorrelated subselect --- ie, it
contains no outer references --- so it need not be, and is not,
re-evaluated at every outer row.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Olleg Samoylov
Дата:
Сообщение: Re: Using random() in update produces same random value for all
Следующее
От: Rakesh Kumar
Дата:
Сообщение: Re: Slow alter sequence with PG10.1