Convert a few datatype input functions to use "soft" error reporting.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 9 Dec 2022 15:14:53 +0000 (10:14 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 9 Dec 2022 15:14:53 +0000 (10:14 -0500)
commitccff2d20ed9622815df2a7deffce8a7b14830965
treeef8439338d811e3c3b4fd6413f42662c128c70c2
parent1939d26282b27b4b264c6930830a7991ed83917a
Convert a few datatype input functions to use "soft" error reporting.

This patch converts the input functions for bool, int2, int4, int8,
float4, float8, numeric, and contrib/cube to the new soft-error style.
array_in and record_in are also converted.  There's lots more to do,
but this is enough to provide proof-of-concept that the soft-error
API is usable, as well as reference examples for how to convert
input functions.

This patch is mostly by me, but it owes very substantial debt to
earlier work by Nikita Glukhov, Andrew Dunstan, and Amul Sul.
Thanks to Andres Freund for review.

Discussion: https://postgr.es/m/3bbbb0df-7382-bf87-9737-340ba096e034@postgrespro.ru
39 files changed:
contrib/cube/cube.c
contrib/cube/cubedata.h
contrib/cube/cubeparse.y
contrib/cube/cubescan.l
contrib/cube/expected/cube.out
contrib/cube/sql/cube.sql
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/arrayutils.c
src/backend/utils/adt/bool.c
src/backend/utils/adt/float.c
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/int.c
src/backend/utils/adt/int8.c
src/backend/utils/adt/jsonpath_exec.c
src/backend/utils/adt/numeric.c
src/backend/utils/adt/numutils.c
src/backend/utils/adt/rowtypes.c
src/include/utils/array.h
src/include/utils/builtins.h
src/include/utils/float.h
src/test/regress/expected/arrays.out
src/test/regress/expected/boolean.out
src/test/regress/expected/float4-misrounded-input.out
src/test/regress/expected/float4.out
src/test/regress/expected/float8.out
src/test/regress/expected/int2.out
src/test/regress/expected/int4.out
src/test/regress/expected/int8.out
src/test/regress/expected/numeric.out
src/test/regress/expected/rowtypes.out
src/test/regress/sql/arrays.sql
src/test/regress/sql/boolean.sql
src/test/regress/sql/float4.sql
src/test/regress/sql/float8.sql
src/test/regress/sql/int2.sql
src/test/regress/sql/int4.sql
src/test/regress/sql/int8.sql
src/test/regress/sql/numeric.sql
src/test/regress/sql/rowtypes.sql