Convert datetime input functions to use "soft" error reporting.
Tom Lane <tgl@sss.pgh.pa.us>
Convert datetime input functions to use "soft" error reporting. This patch converts the input functions for date, time, timetz, timestamp, timestamptz, and interval to the new soft-error style. There's some related stuff in formatting.c that remains to be cleaned up, but that seems like a separable project. Discussion: https://postgr.es/m/3bbbb0df-7382-bf87-9737-340ba096e034@postgrespro.ru
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/date.c | modified | +21 −10 |
| src/backend/utils/adt/datetime.c | modified | +13 −9 |
| src/backend/utils/adt/formatting.c | modified | +12 −9 |
| src/backend/utils/adt/timestamp.c | modified | +49 −45 |
| src/include/utils/datetime.h | modified | +5 −7 |
| src/test/regress/expected/date.out | modified | +31 −0 |
| src/test/regress/expected/interval.out | modified | +31 −0 |
| src/test/regress/expected/time.out | modified | +31 −0 |
| src/test/regress/expected/timestamp.out | modified | +31 −0 |
| src/test/regress/expected/timestamptz.out | modified | +31 −0 |
| src/test/regress/expected/timetz.out | modified | +31 −0 |
| src/test/regress/sql/date.sql | modified | +7 −0 |
| src/test/regress/sql/interval.sql | modified | +7 −0 |
| src/test/regress/sql/time.sql | modified | +7 −0 |
| src/test/regress/sql/timestamp.sql | modified | +7 −0 |
| src/test/regress/sql/timestamptz.sql | modified | +7 −0 |
| src/test/regress/sql/timetz.sql | modified | +7 −0 |
Discussion
- Error-safe user functions 175 messages · 2022-10-03 → 2023-01-03