Re: Incorrect sort result caused by ROLLUP and WHERE operation - Mailing list pgsql-bugs

From Zhang Mingli
Subject Re: Incorrect sort result caused by ROLLUP and WHERE operation
Date
Msg-id c7363f1d-dcc3-4003-bd18-4f80af5be3d7@Spark
Whole thread Raw
List pgsql-bugs
Hi,


Zhang Mingli
www.hashdata.xyz

Do you mean order of null value (column a)  is wrong?
Use NULLS FIRST/LAST to order null values.
On Jan 2, 2025 at 18:19 +0800, 谭忠涛 <zhongtao.tan@seaboxdata.com>, wrote:

Case:
create table t1(a int, b int);
insert into t1 values(1,1),(1,2);
select a,b,sum(10) as s from t1 where a = 1 group by rollup(a,b) order by a, s desc;

pgsql-bugs by date:

Previous
From: "Rank, Christian (LfL)"
Date:
Subject: AW: Commit 5a2fed911a broke parallel query
Next
From: Tom Lane
Date:
Subject: Re: AW: Commit 5a2fed911a broke parallel query