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: Convert the geometric input functions to report errors softly.
Date: Wed, 14 Dec 2022 21:10:40 +0000
Message-ID: <E1p5Z1T-003bGx-2i@gemulon.postgresql.org> (raw)

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

Discussion: https://postgr.es/m/CAAJ_b97KeDWUdpTKGOaFYPv0OicjOu6EW+QYWj-Ywrgj_aEy1g@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/332741e73980401895e027eb697bb472860036fb

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



Message-ID: <E1p5Z1T-003bGx-2i@gemulon.postgresql.org>
Permalink:  ../E1p5Z1T-003bGx-2i@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1p5Z1T-003bGx-2i@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: Convert the geometric input functions to report errors softly.
  In-Reply-To: <E1p5Z1T-003bGx-2i@gemulon.postgresql.org>
  References: <E1p5Z1T-003bGx-2i@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