Re: BUG #16939: Plural interval for negative singular

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Noah Misch <noah(at)leadboat(dot)com>, neverov(dot)max(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16939: Plural interval for negative singular
Date: 2021-04-26 17:06:16
Message-ID: 20210426170616.GV7629@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Apr 26, 2021 at 01:02:44PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > On Mon, Apr 26, 2021 at 12:45:34PM -0400, Tom Lane wrote:
> >> I agree with Noah's opinion that we should stick to the historical
> >> behavior in the interval I/O functions. There is not enough solidity
> >> in the "this is grammatically wrong" argument to justify taking any
> >> risk of application breakage, and it seems like there is some risk of
> >> that there.
>
> > Are you saying we should revert the patch and leave the plurals
> > inconsistent in different places?
>
> As far as the changes in datetime.c and interval.c are concerned,
> yes. I don't care too much about what you did in fe-print.c,

Well, we should then add a comment that this is inconsistent but should
not be changed.

> although TBH that case should be unreachable shouldn't it?
> When would PQntuples() return -1?

I changed that just for consistency with other calls, in case it is ever
copied somewhere else.

> (I shy gently away from the fact that that fe-print.c code is
> relentlessly untranslatable.)

Again, if we revert, we should document is via a C comment.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

If only the physical world exists, free will is an illusion.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2021-04-26 17:29:45 Re: Bug in handling default privileges inside extension update scripts
Previous Message Tom Lane 2021-04-26 17:02:44 Re: BUG #16939: Plural interval for negative singular