Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vaCF9-0050qw-19 for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Dec 2025 12:21:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vaCF7-00Giib-0h for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Dec 2025 12:20:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vaCF6-00GiiT-2Y for pgsql-bugs@lists.postgresql.org; Mon, 29 Dec 2025 12:20:57 +0000 Received: from mxout3.rambler.ru ([81.19.78.102]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vaCF4-003OYM-36 for pgsql-bugs@lists.postgresql.org; Mon, 29 Dec 2025 12:20:57 +0000 Received: from localhost (2vm0069.prod.mail.rambler.tech [10.148.152.10]) by mxout3.rambler.ru (Postfix) with ESMTP id 8D78E7DE147; Mon, 29 Dec 2025 15:20:53 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rambler.ru; s=mail; t=1767010853; bh=lFPoR1qO0II3p7O5Cao0BCf7guE5q5Ikbxb655BEFTg=; h=Date:In-Reply-To:References:Reply-To:From:To:Cc:Subject; b=Ultt1NqskEMKBjQ0Riy0Om9uNbXdQ1Y6MdC0qS11BjWJ0BCtBzmwQKlee9PpxPNSk d8/tSvfjbwoBtENVJzt6NlpuBBioFnYAJtWTvTB9XoB5kQComSVI9FFUJNyuf1dMmb dTKM4HnqP4Ay9XyT3VfLkJObaUVA8zrucUkzARfw= Date: Mon, 29 Dec 2025 12:20:53 +0000 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <19367-16750e0343aaea77@postgresql.org> Reply-To: "=?UTF-8?b?0J3QuNC60L7Qu9Cw0Lkg0KTQsNC00LXQtdCy?=" From: "=?UTF-8?b?0J3QuNC60L7Qu9Cw0Lkg0KTQsNC00LXQtdCy?=" To: "Japin Li" , "Rahila Syed" Cc: fadeymail@rambler.ru, pgsql-bugs@lists.postgresql.org Subject: RE: BUG #19367: typos in backend/utils/adt/timestamp.c Content-Transfer-Encoding: 7bit X-Mailer: Rambler Compose (2.9.2), https://mail.rambler.ru Content-Type: multipart/alternative; boundary="==bound.0.5f7905bffd95594c971f5385a43c2438.mail.rambler.ru==" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --==bound.0.5f7905bffd95594c971f5385a43c2438.mail.rambler.ru== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, everyone. Yes, according to prog file, these functions also have proret= type =3D> timestamptz, so the should return timestamptz. 29.12.2025, 13:37,= Japin Li < mailto:japinli@hotmail.com japinli@hotmail.com > On Mon, 29 Dec 2025 at 15:55, Rahila Syed < /compose rahilasyed90@gmail.com= > wrote: > Hi, > > There are typos in return type of these functions: > = 1) timestamptz_pl_interval_at_zone(PG_FUNCTION_ARGS) >=C2=A0=C2=A0=C2=A0=C2= =A0 NOW: PG_RETURN_TIMESTAMP(timestamptz_pl_interval_internal(timestamp, >= span, attimezone)); >=C2=A0=C2=A0=C2=A0=C2=A0 SHOULD: > PG_RETURN_TIMES= TAMPTZ(timestamptz_pl_interval_internal(timestamp, span, > attimezone)); >= 2) Datum timestamptz_mi_interval_at_zone(PG_FUNCTION_ARGS) >=C2=A0=C2=A0= =C2=A0=C2=A0 NOW: PG_RETURN_TIMESTAMP(timestamptz_mi_interval_internal(tim= estamp, > span, attimezone)); >=C2=A0=C2=A0=C2=A0=C2=A0 SHOULD: > PG_RET= URN_TIMESTAMPTZ(timestamptz_mi_interval_internal(timestamp, span, > attime= zone)); > > You=E2=80=99re right =E2=80=94 these are just typos, and they d= on=E2=80=99t affect correctness since both > ultimately call Int64GetDatum(= ). > Still, +1 for fixing them for clarity. The functions timestamptz_pl_in= terval() and timestamptz_mi_interval() have the same typos, right? -- Regar= ds, Japin Li ChengDu WenWu Information Technology Co., Ltd. --==bound.0.5f7905bffd95594c971f5385a43c2438.mail.rambler.ru== Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi, everyone. Yes, according to prog file, these functions also have proret= type =3D> timestamptz, so the should return timestamptz.

29.12.2025, 13:37, Japin Li <japinli@hotmail.com>
On Mon, 29 Dec 2025 at 15:55, Rahila Syed <ra= hilasyed90@gmail.com> wrote:
> Hi,
>
> There are = typos in return type of these functions:
> 1) timestamptz_pl_interva= l_at_zone(PG_FUNCTION_ARGS)
>     NOW: PG_RETURN= _TIMESTAMP(timestamptz_pl_interval_internal(timestamp,
> span, attim= ezone));
>     SHOULD:
> PG_RETURN_TIMEST= AMPTZ(timestamptz_pl_interval_internal(timestamp, span,
> attimezone= ));
> 2) Datum timestamptz_mi_interval_at_zone(PG_FUNCTION_ARGS)
= >     NOW: PG_RETURN_TIMESTAMP(timestamptz_mi_inter= val_internal(timestamp,
> span, attimezone));
>  &nb= sp;  SHOULD:
> PG_RETURN_TIMESTAMPTZ(timestamptz_mi_interval_i= nternal(timestamp, span,
> attimezone));
>
> You=E2=80= =99re right =E2=80=94 these are just typos, and they don=E2=80=99t affect c= orrectness since both
> ultimately call Int64GetDatum().
> St= ill, +1 for fixing them for clarity.

The functions timestamptz_pl_in= terval() and timestamptz_mi_interval() have the
same typos, right?
--
Regards,
Japin Li
ChengDu WenWu Information Technology Co., = Ltd.

--==bound.0.5f7905bffd95594c971f5385a43c2438.mail.rambler.ru==--