Re: `order by random()` makes select-list `random()` invocations deterministic - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: `order by random()` makes select-list `random()` invocations deterministic
Date
Msg-id CAKFQuwYo+EV4=o8Uc6wH=Ko+V8hgiqqOK=a9EC5G90HYx9+POw@mail.gmail.com
Whole thread Raw
In response to `order by random()` makes select-list `random()` invocations deterministic  ("Dian Fay" <di@nmfay.com>)
Responses Re: `order by random()` makes select-list `random()` invocations deterministic  ("Dian Fay" <di@nmfay.com>)
List pgsql-bugs
On Wednesday, February 28, 2024, Dian Fay <di@nmfay.com> wrote:

Every `random()` invocation in the select list uses a single consistent
value within each returned row. Remove the `order by random()` and
values become randomized as expected, but it gets a bit stranger:

 
This seems to be one of those “won’t fix” bugs that stems from the parser being a bit too liberal in what it accepts as valid SQL.


The fact that the gs involving expression is seen differently than the ones not involving gs doesn’t surprise me.

David J.

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #18363: Assert !ReindexIsProcessingIndex falsified with expression index over select from table
Next
From: "feichanghong"
Date:
Subject: Re:BUG #18371: There are wrong constraint residues when detach hash partiton concurrently