Re: random generated string matching index in inexplicable ways [EXT]

Поиск
Список
Период
Сортировка
От Myles Miller
Тема Re: random generated string matching index in inexplicable ways [EXT]
Дата
Msg-id 20190507131512.GB62383@50pop.com
обсуждение исходный текст
Ответ на random generated string matching index in inexplicable ways  (Myles Miller <pg@q7r7.com>)
Список pgsql-general
On Tue, May 07, 2019 at 12:17:12PM +0000, Daniel Perrett wrote:
> The WHERE expression (and therefore the random function) is being evaluated once per row, not once per query.
> If you run this query a few times, you will see the problem:
> SELECT y, chr(round(random())::int + 65) FROM (SELECT 'A' UNION SELECT 'B') x(y);

Ah! Thank you! I understand now.




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

Предыдущее
От: Myles Miller
Дата:
Сообщение: Re: random generated string matching index in inexplicable ways
Следующее
От: Steven Lembark
Дата:
Сообщение: Re: Postgres for SQL Server users