pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make cast function from circle to polygon error safe
Date: Mon, 30 Mar 2026 07:24:40 +0000
Message-ID: <E1w76zH-0027Ge-2u@gemulon.postgresql.org> (raw)

Make cast function from circle to polygon error safe

Previously, the function casting type circle to type polygon could not
be made error safe, because it is an SQL language function.

This refactors it as a C/internal function, by sharing code with the
C/internal function that the SQL function previously wrapped, and soft
error support is added.

Author: jian he <jian.universality@gmail.com>
Reviewed-by: Amul Sul <sulamul@gmail.com>
Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Discussion: Discussion: https://www.postgresql.org/message-id/flat/CADkLM%3Dfv1JfY4Ufa-jcwwNbjQixNViskQ8jZu3Tz_p656i_4hQ%40m...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/26f9012beecf36bcffc5a2081c7e698d3ecf6aa2

Modified Files
--------------
src/backend/catalog/system_functions.sql |  6 ----
src/backend/utils/adt/geo_ops.c          | 59 +++++++++++++++++++++++++-------
src/include/catalog/catversion.h         |  2 +-
src/include/catalog/pg_proc.dat          |  4 +--
4 files changed, 49 insertions(+), 22 deletions(-)



Message-ID: <E1w76zH-0027Ge-2u@gemulon.postgresql.org>
Permalink:  ../E1w76zH-0027Ge-2u@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w76zH-0027Ge-2u@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Make cast function from circle to polygon error safe
  In-Reply-To: <E1w76zH-0027Ge-2u@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