postgresql/contrib/adminpack
Tom Lane 2661469d86 Allow DateTimeParseError to handle bad-timezone error messages.
Pay down some ancient technical debt (dating to commit 022fd9966):
fix a couple of places in datetime parsing that were throwing
ereport's immediately instead of returning a DTERR code that could be
interpreted by DateTimeParseError.  The reason for that was that there
was no mechanism for passing any auxiliary data (such as a zone name)
to DateTimeParseError, and these errors seemed to really need it.
Up to now it didn't matter that much just where the error got thrown,
but now we'd like to have a hard policy that datetime parse errors
get thrown from just the one place.

Hence, invent a "DateTimeErrorExtra" struct that can be used to
carry any extra values needed for specific DTERR codes.  Perhaps
in the future somebody will be motivated to use this to improve
the specificity of other DateTimeParseError messages, but for now
just deal with the timezone-error cases.

This is on the way to making the datetime input functions report
parse errors softly; but it's really an independent change, so
commit separately.

Discussion: https://postgr.es/m/3bbbb0df-7382-bf87-9737-340ba096e034@postgrespro.ru
2022-12-09 13:30:47 -05:00
..
expected tests: Rename conflicting role names 2022-10-05 10:43:13 -07:00
sql tests: Rename conflicting role names 2022-10-05 10:43:13 -07:00
.gitignore adminpack: Add test suite 2017-09-14 22:22:59 -04:00
Makefile Remove references to libpq_srcdir in adminpack and old_snapshot 2020-12-30 12:38:16 +09:00
adminpack--1.0--1.1.sql adminpack: Revoke EXECUTE on pg_logfile_rotate() 2018-05-07 10:10:33 -04:00
adminpack--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
adminpack--1.1--2.0.sql adminpack: Revoke EXECUTE on pg_logfile_rotate() 2018-05-07 10:10:33 -04:00
adminpack--2.0--2.1.sql Add pg_file_sync() to adminpack extension. 2020-01-24 20:42:52 +09:00
adminpack.c Allow DateTimeParseError to handle bad-timezone error messages. 2022-12-09 13:30:47 -05:00
adminpack.control Add pg_file_sync() to adminpack extension. 2020-01-24 20:42:52 +09:00
meson.build meson: Add windows resource files 2022-10-05 09:56:05 -07:00