From: Николай Фадеев <fadeymail@rambler.ru>
To: Japin Li <japinli@hotmail.com>
To: Rahila Syed <rahilasyed90@gmail.com>
Cc: fadeymail@rambler.ru
Cc: pgsql-bugs@lists.postgresql.org
Subject: RE: BUG #19367: typos in backend/utils/adt/timestamp.c
Date: Mon, 29 Dec 2025 12:20:53 +0000
Message-ID: <c88ef496dcbe264fd6c14d1e3162d577@mail.rambler.ru> (raw)
In-Reply-To: <MEAPR01MB303151496C4A38A8EA4F40F5B6BFA@MEAPR01MB3031.ausprd01.prod.outlook.com>
References: <MEAPR01MB303151496C4A38A8EA4F40F5B6BFA@MEAPR01MB3031.ausprd01.prod.outlook.com>
<19367-16750e0343aaea77@postgresql.org>
<CAH2L28tGUhoH21j_+RP9X0g=s=G0NmuMYxOKZKSspamvEe3i-Q@mail.gmail.com>
Hi, everyone. Yes, according to prog file, these functions also have prorettype => 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) > NOW: PG_RETURN_TIMESTAMP(timestamptz_pl_interval_internal(timestamp, > span, attimezone)); > SHOULD: > PG_RETURN_TIMESTAMPTZ(timestamptz_pl_interval_internal(timestamp, span, > attimezone)); > 2) Datum timestamptz_mi_interval_at_zone(PG_FUNCTION_ARGS) > NOW: PG_RETURN_TIMESTAMP(timestamptz_mi_interval_internal(timestamp, > span, attimezone)); > SHOULD: > PG_RETURN_TIMESTAMPTZ(timestamptz_mi_interval_internal(timestamp, span, > attimezone)); > > You’re right — these are just typos, and they don’t affect correctness since both > ultimately call Int64GetDatum(). > Still, +1 for fixing them for clarity. The functions timestamptz_pl_interval() and timestamptz_mi_interval() have the same typos, right? -- Regards, Japin Li ChengDu WenWu Information Technology Co., Ltd.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: fadeymail@rambler.ru, japinli@hotmail.com, rahilasyed90@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: RE: BUG #19367: typos in backend/utils/adt/timestamp.c
In-Reply-To: <c88ef496dcbe264fd6c14d1e3162d577@mail.rambler.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox