From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Bad canonicalization for dateranges with 'infinity' bounds |
Date: | 2019-07-14 03:27:47 |
Message-ID: | CA+hUKGLvizV-pTaSkGbCPJVGyH4Rex+KEnYEOZvPfsKyiogXpg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Jul 14, 2019 at 12:44 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> Even though !(X || Y) is equivalent to !X && !Y, by my reading of
> range_in(), lower.value can be uninitialised when lower.infinite is
> true, and it's also a bit hard to read IMHO, so I'd probably write
> that as !upper.infinite && !DATE_NOT_FINITE(upper.val) &&
> upper.inclusive. I don't think it can affect the result but it might
> upset Valgrind or similar.
I take back the bit about reading an uninitialised value (X || Y
doesn't access Y if X is true... duh), but I still think the other way
of putting it is a bit easier to read. YMMV.
Generally, +1 for this patch. I'll wait a couple of days for more
feedback to appear.
--
Thomas Munro
https://enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2019-07-14 05:03:27 | Re: Built-in connection pooler |
Previous Message | Thomas Munro | 2019-07-14 03:03:39 | Re: pgbench - implement strict TPC-B benchmark |