Reported-by: Ian Lawrence Barwick
Discussion: https://postgr.es/m/CAB8KJ=hLvQDb53WdigV7OBEBh5tzQ7eA=pG0ZpccoRVBUNCXYA@mail.gmail.com
<!--
+2022-08-02 [1349d2790] Improve performance of ORDER BY / DISTINCT aggregates
2022-12-20 [3226f4728] Add enable_presorted_aggregate GUC
2023-01-17 [da5800d5f] Don't presort ORDER BY/DISTINCT Aggrefs with volatile fu
<!--
+2023-01-01 [2ceea5adb] Accept "+infinity" in date and timestamp[tz] input.
2023-03-09 [bcc704b52] Reject combining "epoch" and "infinity" with other datet
-->