RE: BUG #19367: typos in backend/utils/adt/timestamp.c

From: Николай Фадеев <fadeymail(at)rambler(dot)ru>
To: "Japin Li" <japinli(at)hotmail(dot)com>, "Rahila Syed" <rahilasyed90(at)gmail(dot)com>
Cc: fadeymail(at)rambler(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: RE: BUG #19367: typos in backend/utils/adt/timestamp.c
Date: 2025-12-29 12:20:53
Message-ID: c88ef496dcbe264fd6c14d1e3162d577@mail.rambler.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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(at)hotmail(dot)com japinli(at)hotmail(dot)com >
On Mon, 29 Dec 2025 at 15:55, Rahila Syed < /compose rahilasyed90(at)gmail(dot)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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-12-29 15:37:39 Re: BUG #19367: typos in backend/utils/adt/timestamp.c
Previous Message vignesh C 2025-12-29 10:56:01 Re: BUG #19360: Bug Report: Logical Replication initial sync fails with "conflict=update_origin_differs" PG12 toPG18