| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Clean up error messages related to bad datetime units. |
| Date: | 2022-01-03 19:05:11 |
| Message-ID: | E1n4Sdr-0003Sb-N6@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Clean up error messages related to bad datetime units.
Adjust the error texts used for unrecognized/unsupported datetime
units so that there are just two strings to translate, not two
per datatype. Along the way, follow our usual error message style
of not double-quoting type names, and instead making sure that we
say the name is a type. Fix a couple of places in date.c that
were using the wrong one of "unrecognized" and "unsupported".
Nikhil Benesch, with a bit more editing by me
Discussion: https://postgr.es/m/CAPWqQZTURGixmbMH2_Z3ZtWGA0ANjUb9bwtkkxSxSfDeFHuM6Q@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4b160492b9b8345747dfcad468eb89e9ccc0a876
Modified Files
--------------
src/backend/utils/adt/date.c | 36 +++++++------
src/backend/utils/adt/timestamp.c | 99 ++++++++++++++--------------------
src/test/regress/expected/date.out | 18 +++----
src/test/regress/expected/interval.out | 4 +-
src/test/regress/expected/time.out | 6 +--
src/test/regress/expected/timetz.out | 4 +-
6 files changed, 76 insertions(+), 91 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2022-01-03 20:42:54 | pgsql: Fix index-only scan plans, take 2. |
| Previous Message | Tom Lane | 2022-01-03 17:24:52 | pgsql: Use MaxLockMode symbol in more places. |