postgresql/contrib/btree_gin
Michael Paquier 713d9a847e Update some timestamp[tz] functions to use soft-error reporting
This commit updates two functions that convert "timestamptz" to
"timestamp", and vice-versa, to use the soft error reporting rather than
a their own logic to do the same.  These are now named as follows:
- timestamp2timestamptz_safe()
- timestamptz2timestamp_safe()

These functions were suffixed with "_opt_overflow", previously.

This shaves some code, as it is possible to detect how a timestamp[tz]
overflowed based on the returned value rather than a custom state.  It
is optionally possible for the callers of these functions to rely on the
error generated internally by these functions, depending on the error
context.

Similar work has been done in d03668ea05 and 4246a977ba.

Reviewed-by: Amul Sul <sulamul@gmail.com>
Discussion: https://postgr.es/m/aS09YF2GmVXjAxbJ@paquier.xyz
2025-12-02 09:30:23 +09:00
..
expected Add more cross-type comparisons to contrib/btree_gin. 2025-07-03 16:30:38 -04:00
sql Add more cross-type comparisons to contrib/btree_gin. 2025-07-03 16:30:38 -04:00
.gitignore Support "make check" in contrib 2011-04-25 22:27:11 +03:00
btree_gin--1.0--1.1.sql Add support for EUI-64 MAC addresses as macaddr8 2017-03-15 11:16:25 -04:00
btree_gin--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
btree_gin--1.1--1.2.sql Add btree_gin support for enum types 2017-03-21 11:04:17 -04:00
btree_gin--1.2--1.3.sql Add support of bool, bpchar, name and uuid to btree_gin 2018-04-05 18:19:10 +03:00
btree_gin--1.3--1.4.sql Add more cross-type comparisons to contrib/btree_gin. 2025-07-03 16:30:38 -04:00
btree_gin.c Update some timestamp[tz] functions to use soft-error reporting 2025-12-02 09:30:23 +09:00
btree_gin.control Add cross-type comparisons to contrib/btree_gin. 2025-07-03 16:24:31 -04:00
Makefile Add cross-type comparisons to contrib/btree_gin. 2025-07-03 16:24:31 -04:00
meson.build Add cross-type comparisons to contrib/btree_gin. 2025-07-03 16:24:31 -04:00