pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Clean up error messages related to bad datetime units.
Date: Mon, 03 Jan 2022 19:05:11 +0000
Message-ID: <E1n4Sdr-0003Sb-N6@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1n4Sdr-0003Sb-N6@gemulon.postgresql.org>
Permalink:  ../E1n4Sdr-0003Sb-N6@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1n4Sdr-0003Sb-N6@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Clean up error messages related to bad datetime units.
  In-Reply-To: <E1n4Sdr-0003Sb-N6@gemulon.postgresql.org>
  References: <E1n4Sdr-0003Sb-N6@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox