| From: | Alexandre Felipe <o(dot)alexandre(dot)felipe(at)gmail(dot)com> |
|---|---|
| To: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Cc: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: SLOPE - Planner optimizations on monotonic expressions. |
| Date: | 2026-05-10 15:53:49 |
| Message-ID: | CAE8JnxNhturjd3qL5O17NHVorqGk9Yr6yPai1AfN4-6T3Gue+Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, May 8, 2026 at 11:19 PM Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
wrote:
> I found one more corner case with infinities (same applies also with
> negative infinity):
>
This will restrict a lot of cases.
slope_corner_cases.sql enumerate experssions and orders producing
permutations of (-inf, -1, 0, 1, +inf, nan) mapped to (1,2,3,4,5,6)
to visualize other similar corner cases.
Apparently the violations boil down to two cases
* All basic arithmetic operations with infinity constant (with a lucky
exception x - inf)
* Every decreasing function where the index key.
e.g. `-x desc` would have NaNs first
Should I simply detect and disable the above cases?
sqrt(x < 0) already raise an exception, is it safe to assume that for all
the limited domain functions?
| Attachment | Content-Type | Size |
|---|---|---|
| slope_corner_cases.sql | application/octet-stream | 3.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Marcos Pegoraro | 2026-05-10 16:49:51 | Missing jsonb_ ... functions on DOCs |
| Previous Message | SATYANARAYANA NARLAPURAM | 2026-05-10 15:01:44 | DOCS - CREATE PUBLICATION ... EXCEPT has no mention on what happens after drop/create tables |