Обсуждение: pgsql: Deduplicate "invalid input syntax" messages for various types.
Deduplicate "invalid input syntax" messages for various types. Previously a lot of the error messages referenced the type in the error message itself. That requires that the message is translated separately for each type. Note that currently a few smallint cases continue to reference the integer, rather than smallint, type. A later patch will create a separate routine for 16bit input. Author: Andres Freund Discussion: https://postgr.es/m/20180707200158.wpqkd7rjr4jxq5g7@alap3.anarazel.de Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/3522d0eaba5a976f09a48810dd25dff6ab3565df Modified Files -------------- contrib/dblink/expected/dblink.out | 2 +- contrib/postgres_fdw/expected/postgres_fdw.out | 8 ++++---- doc/src/sgml/xtypes.sgml | 4 ++-- src/backend/utils/adt/int8.c | 4 ++-- src/backend/utils/adt/numutils.c | 12 ++++++------ src/backend/utils/adt/timestamp.c | 4 ++-- src/pl/plpython/expected/plpython_subtransaction.out | 4 ++-- src/pl/plpython/expected/plpython_types.out | 2 +- src/pl/tcl/expected/pltcl_subxact.out | 6 +++--- src/test/regress/expected/aggregates.out | 2 +- src/test/regress/expected/alter_table.out | 2 +- src/test/regress/expected/copy2.out | 2 +- src/test/regress/expected/int2.out | 14 +++++++------- src/test/regress/expected/int4.out | 14 +++++++------- src/test/regress/expected/int8.out | 10 +++++----- src/test/regress/expected/plpgsql.out | 4 ++-- src/test/regress/expected/select_parallel.out | 2 +- src/test/regress/expected/timestamptz.out | 2 +- src/test/regress/regress.c | 4 ++-- src/tutorial/complex.c | 4 ++-- 20 files changed, 53 insertions(+), 53 deletions(-)
On Sun, Jul 22, 2018 at 10:30:20PM +0000, Andres Freund wrote: > Deduplicate "invalid input syntax" messages for various types. > > Previously a lot of the error messages referenced the type in the > error message itself. That requires that the message is translated > separately for each type. > > Note that currently a few smallint cases continue to reference the > integer, rather than smallint, type. A later patch will create a > separate routine for 16bit input. A couple of alternate outputs have been forgotten here (int8 has some extra ones), causing make check to turn red on Windows, and plcheck to turn red on macos. -- Michael
Вложения
On 2018-07-23 09:49:58 +0900, Michael Paquier wrote: > On Sun, Jul 22, 2018 at 10:30:20PM +0000, Andres Freund wrote: > > Deduplicate "invalid input syntax" messages for various types. > > > > Previously a lot of the error messages referenced the type in the > > error message itself. That requires that the message is translated > > separately for each type. > > > > Note that currently a few smallint cases continue to reference the > > integer, rather than smallint, type. A later patch will create a > > separate routine for 16bit input. > > A couple of alternate outputs have been forgotten here (int8 has some > extra ones), causing make check to turn red on Windows, and plcheck to > turn red on macos. Yea, I noticed. I pushed a blind fix. Hope that fixes it, but I'll re-check. Took me a while because I had to re-run check-world a couple times because you continued to push things ;) Greetings, Andres Freund
On Sun, Jul 22, 2018 at 05:53:36PM -0700, Andres Freund wrote: > Yea, I noticed. I pushed a blind fix. Hope that fixes it, but I'll > re-check. Took me a while because I had to re-run check-world a couple > times because you continued to push things ;) I had exactly the same flow pattern ;p -- Michael