Re: [PATCH v2] Avoid internal error for invalid interval typmods - Mailing list pgsql-hackers

From Haibo Yan
Subject Re: [PATCH v2] Avoid internal error for invalid interval typmods
Date
Msg-id CABXr29ERr=LsyLQnVwxZtSAqhRqJKvs2H2OO9uTrHWCO4P_5sA@mail.gmail.com
Whole thread
In response to Re: [PATCH v2] Avoid internal error for invalid interval typmods  (Feng Wu <wufengwufengwufeng@gmail.com>)
Responses Re: [PATCH v2] Avoid internal error for invalid interval typmods
List pgsql-hackers
On Tue, Jun 30, 2026 at 6:49 PM Feng Wu <wufengwufengwufeng@gmail.com> wrote:
>
> Hi Haibo,
>
> Thanks for reviewing.
>
> I agree that the SQL-callable pg_catalog.interval(interval, int4) path is the
> important case to cover here.  The v1 test was already exercising that direct
> call, but it used a DO block intentionally so that the regression test checks
> the SQLSTATE is invalid_parameter_value, rather than only matching the error
> message text.
>
> In v2, I kept that structure and updated the test comment to make this clearer.
>
> Regards,
> Feng

Thank you for fixing this. v2 looks good to me.

Regards
Haibo



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Refactor function pg_get_multixact_stats (src/backend/utils/adt/multixactfuncs.c)
Next
From: Bertrand Drouvot
Date:
Subject: Re: Add pg_stat_kind_info system view