Re: Infinite Interval - Mailing list pgsql-hackers

From Joseph Koshakow
Subject Re: Infinite Interval
Date
Msg-id CAAvxfHfgkcSwTPF-u+uqRo70hxFGTm3tf6+OgtYWEV_MiyKnYw@mail.gmail.com
Whole thread Raw
In response to Re: Infinite Interval  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Infinite Interval  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List pgsql-hackers


On Sun, Mar 19, 2023 at 5:13 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>    Did you actually write "if TIMESTAMP_IS_NOBEGIN(dt2)" and not
>    "if (TIMESTAMP_IS_NOBEGIN(dt2))"?  If the former, I'm not surprised
>    that pgindent gets confused.  The parentheses are required by the
>    C standard.  Your code might accidentally work because the macro
>    has parentheses internally, but call sites have no business
>    knowing that.  For example, it would be completely legit to change
>    TIMESTAMP_IS_NOBEGIN to be a plain function, and then this would be
>    syntactically incorrect.

Oh duh. I've been doing too much Rust development and did this without
thinking. I've attached a patch with a fix.

- Joe Koshakow
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Infinite Interval
Next
From: Michael Paquier
Date:
Subject: Re: Fix fseek() detection of unseekable files on WIN32