Re: BUG #19367: typos in backend/utils/adt/timestamp.c - Mailing list pgsql-bugs

From Japin Li
Subject Re: BUG #19367: typos in backend/utils/adt/timestamp.c
Date
Msg-id MEAPR01MB303151496C4A38A8EA4F40F5B6BFA@MEAPR01MB3031.ausprd01.prod.outlook.com
Whole thread Raw
In response to BUG #19367: typos in backend/utils/adt/timestamp.c  (PG Bug reporting form <noreply@postgresql.org>)
Responses RE: BUG #19367: typos in backend/utils/adt/timestamp.c
Re: BUG #19367: typos in backend/utils/adt/timestamp.c
List pgsql-bugs
On Mon, 29 Dec 2025 at 15:55, Rahila Syed <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.



pgsql-bugs by date:

Previous
From: Rahila Syed
Date:
Subject: Re: BUG #19367: typos in backend/utils/adt/timestamp.c
Next
From: vignesh C
Date:
Subject: Re: BUG #19360: Bug Report: Logical Replication initial sync fails with "conflict=update_origin_differs" PG12 toPG18