From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Convert the geometric input functions to report errors softly. |
Date: | 2022-12-14 21:10:40 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Convert the geometric input functions to report errors softly.
Convert box_in, circle_in, line_in, lseg_in, path_in, point_in,
and poly_in to the new style.
line_in still throws hard errors for overflows/underflows that can occur
when the input is specified as two points rather than in the canonical
"Ax + By + C = 0" style. I'm not too concerned about that: it won't be
reached in normal dump/restore cases, and it's fairly debatable that
such conversion should ever have been made part of a type input function
in the first place. But in any case, I don't want to extend the soft
error conventions into float.h without more discussion than this patch
has had.
Amul Sul, minor mods by me
Branch
------
master
Modified Files
--------------
src/backend/utils/adt/geo_ops.c | 184 ++++++++++++++++++++-------------
src/test/regress/expected/box.out | 25 +++++
src/test/regress/expected/geometry.out | 25 +++++
src/test/regress/expected/line.out | 61 +++++++++++
src/test/regress/expected/lseg.out | 13 +++
src/test/regress/expected/path.out | 25 +++++
src/test/regress/expected/point.out | 13 +++
src/test/regress/expected/polygon.out | 25 +++++
src/test/regress/sql/box.sql | 6 ++
src/test/regress/sql/geometry.sql | 6 ++
src/test/regress/sql/line.sql | 12 +++
src/test/regress/sql/lseg.sql | 4 +
src/test/regress/sql/path.sql | 6 ++
src/test/regress/sql/point.sql | 4 +
src/test/regress/sql/polygon.sql | 6 ++
15 files changed, 344 insertions(+), 71 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-12-14 22:50:34 | pgsql: Convert a few more datatype input functions to report errors sof |
Previous Message | Tom Lane | 2022-12-14 18:22:16 | pgsql: Convert a few more datatype input functions to report errors sof |