aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-07-03 16:17:08 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-07-03 16:17:08 -0400
commit0059bbe1ecaa5f7f19a8b3aae059f352c02e1d88 (patch)
tree535ae3b38be90303b6394fff9d38627301dad652 /src/backend/tcop/postgres.c
parenta10f21e6ce549705f194b8fdb28e685403e7579d (diff)
downloadpostgresql-0059bbe1ecaa5f7f19a8b3aae059f352c02e1d88.tar.gz
postgresql-0059bbe1ecaa5f7f19a8b3aae059f352c02e1d88.zip
Break out xxx2yyy_opt_overflow APIs for more datetime conversions.
Previous commits invented timestamp2timestamptz_opt_overflow, date2timestamp_opt_overflow, and date2timestamptz_opt_overflow functions to perform non-error-throwing conversions between datetime types. This patch completes the set by adding timestamp2date_opt_overflow, timestamptz2date_opt_overflow, and timestamptz2timestamp_opt_overflow. In addition, adjust timestamp2timestamptz_opt_overflow so that it doesn't throw error if timestamp2tm fails, but treats that as an overflow case. The situation probably can't arise except with an invalid timestamp value, and I can't think of a way that that would happen except data corruption. However, it's pretty silly to have a function whose entire reason for existence is to not throw errors for out-of-range inputs nonetheless throw an error for out-of-range input. The new APIs are not used in this patch, but will be needed in upcoming btree_gin changes. Author: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Arseniy Mukhin <arseniy.mukhin.dev@gmail.com> Discussion: https://postgr.es/m/262624.1738460652@sss.pgh.pa.us
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions