Refactoring: Use soft error reporting for *_opt_overflow functions of date/timestamp - Mailing list pgsql-hackers

From Amul Sul
Subject Refactoring: Use soft error reporting for *_opt_overflow functions of date/timestamp
Date
Msg-id CAAJ_b95HEmFyzHZfsdPquSHeswcopk8MCG1Q_vn4tVkZ+xxofw@mail.gmail.com
Whole thread Raw
Responses Re: Refactoring: Use soft error reporting for *_opt_overflow functions of date/timestamp
List pgsql-hackers
Hi,

The attached patch proposes to use soft error reporting infrastructure
for the date/timestamp conversion function, which currently depends on
integer variables to control error throwing.

This continues the previous refactoring commit [1] where we adopted
soft error reporting for some numeric functions. This patch applies
the same pattern to the date/timestamp function. The change ensures
consistency by utilizing the existing soft error reporting
infrastructure.

Note that in the patch, I renamed the function by replacing the
"no_overflow" extension in the function name with "overflow_safe".
Alternatively, we could just use "safe" alone. Suggestions are
welcome.

1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=4246a977bad6e76c4276a0d52def8a3dced154bb

--
Regards,
Amul Sul
EDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Extended Statistics set/restore/clear functions.
Next
From: Soumya S Murali
Date:
Subject: Re: [PATCH] Expose checkpoint timestamp and duration in pg_stat_checkpointer