]> granicus.if.org Git - postgresql/commit
Improve error message for misuse of TZ, tz, OF formatting patterns.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 20 Feb 2017 15:27:48 +0000 (10:27 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 20 Feb 2017 15:27:48 +0000 (10:27 -0500)
commit1c073505e8e4fa8a03312fea714da25ab83cb5fa
treea47e17fbe3b4c55e61174ca819ecb30c11f0565a
parent10257fc5ff74487a46594bd8c8c041878f409c17
Improve error message for misuse of TZ, tz, OF formatting patterns.

Be specific about which pattern is being complained of, and avoid saying
"it's not supported in to_date", which is just confusing if the error is
actually coming out of to_timestamp.  We can phrase it as "is only
supported in to_char", instead.  Also, use the term "formatting field" not
"format pattern", because other error messages in the same file prefer that
terminology.  (This isn't terribly consistent with the documentation, so
maybe we should change all these error messages?)
src/backend/utils/adt/formatting.c