Postgresql range_agg() Return empty list

From: Han Tang <bj(dot)tanghan(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Postgresql range_agg() Return empty list
Date: 2024-07-11 01:37:11
Message-ID: CAAqOU0s08dTFu0tQgEg=q+ifeU4aSYwxCG=ae229PrwwAea2mA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

Hope you are doing well!

I am using range_agg() function, it works fine with original table value

Query Result <https://i.sstatic.net/CbOkuvXr.png>

But when I try to do some update for range value, it will give back an
empty list

Select range_agg(b.r)From (
Select int8range(lower(bin_range)+1, upper(bin_range)+5) as r
From bin_data) as b;

Query Result <https://i.sstatic.net/19uJeuS3.png>

I test with the same query in fiddle but no issue there

https://dbfiddle.uk/1MRn8hn6

All these query are running on pgAdmin4, wondering why it happens

Thanks
Han

Attachment Content-Type Size
image/png 72.3 KB
Screenshot 2024-07-10 at 5.50.40 PM.png image/png 87.4 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2024-07-11 02:17:26 Re: Query on partitioned table needs memory n_partitions * work_mem
Previous Message Dimitrios Apostolou 2024-07-11 01:19:16 Query on partitioned table needs memory n_partitions * work_mem