pgsql: Make cast function from circle to polygon error safe

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Make cast function from circle to polygon error safe
Date: 2026-03-30 07:24:40
Message-ID: E1w76zH-0027Ge-2u@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)universality(at)gmail(dot)com>
Reviewed-by: Amul Sul <sulamul(at)gmail(dot)com>
Reviewed-by: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Discussion: Discussion: https://www.postgresql.org/message-id/flat/CADkLM%3Dfv1JfY4Ufa-jcwwNbjQixNViskQ8jZu3Tz_p656i_4hQ%40mail.gmail.com

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

Browse pgsql-committers by date

  From Date Subject
Next Message Anton A. Melnikov 2026-03-30 07:33:12 Re: pgsql: Move gramparse.h to src/backend/parser
Previous Message Fujii Masao 2026-03-30 05:39:43 pgsql: Fix FK triggers losing DEFERRABLE/INITIALLY DEFERRED when marked