postgresql/src/include
Peter Eisentraut 45cdaf3665 Make geometry cast functions error safe
This adjusts cast functions of the geometry types to support soft
errors.  This requires refactoring of various helper functions to
support error contexts.  Also make the float8 to float4 cast error
safe.  It requires some of the same helper functions.

This is in preparation for a future feature where conversion errors in
casts can be caught.

(The function casting type circle to type polygon is not yet made error
safe, because it is an SQL language function.)

Author: jian he <jian.universality@gmail.com>
Reviewed-by: Amul Sul <sulamul@gmail.com>
Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CADkLM%3Dfv1JfY4Ufa-jcwwNbjQixNViskQ8jZu3Tz_p656i_4hQ%40mail.gmail.com
2026-03-29 20:40:50 +02:00
..
access Remove XLOG_HEAP2_VISIBLE entirely 2026-03-24 17:58:12 -04:00
archive Update copyright for 2026 2026-01-01 13:24:10 -05:00
backup Update copyright for 2026 2026-01-01 13:24:10 -05:00
bootstrap Reduce header inclusions via execnodes.h 2026-03-16 14:34:57 +01:00
catalog GetSubscription(): use per-object memory context. 2026-03-24 15:11:45 -07:00
commands Don't include storage/lock.h in so many headers 2026-03-24 17:11:12 +01:00
common Move tar detection and compression logic to common. 2026-03-20 15:31:35 -04:00
datatype Update copyright for 2026 2026-01-01 13:24:10 -05:00
executor Improve hash join's handling of tuples with null join keys. 2026-03-19 15:21:36 -04:00
fe_utils pg_dumpall: Fix handling of conflicting options. 2026-03-06 14:00:04 -06:00
foreign Refactor to remove ForeignServerName(). 2026-03-24 15:20:28 -07:00
jit Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
lib dshash: Make it possible to suppress out of memory errors 2026-03-19 11:51:17 -04:00
libpq ssl: Serverside SNI support for libpq 2026-03-18 12:37:11 +01:00
mb Replace pg_mblen() with bounds-checked versions. 2026-02-09 12:44:04 +13:00
nodes pg_plan_advice: pgindent 2026-03-26 20:10:13 -04:00
optimizer Add an alternative_plan_name field to PlannerInfo. 2026-03-26 16:45:17 -04:00
parser SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
partitioning Update copyright for 2026 2026-01-01 13:24:10 -05:00
pch Update copyright for 2026 2026-01-01 13:24:10 -05:00
port Fix some -Wcast-qual warnings 2026-02-27 21:57:33 +01:00
portability instrumentation: Drop INSTR_TIME_SET_CURRENT_LAZY macro 2026-02-26 10:39:29 -05:00
postmaster Add rudimentary table prioritization to autovacuum. 2026-03-27 10:17:05 -05:00
regex Update copyright for 2026 2026-01-01 13:24:10 -05:00
replication Avoid sending duplicate WAL locations in standby status replies 2026-03-26 20:54:32 +09:00
rewrite Add some const qualifiers enabled by typeof_unqual change on copyObject 2026-03-19 06:35:54 +01:00
snowball Update to latest Snowball sources. 2026-01-05 15:22:37 -05:00
statistics Add support for "mcv" in pg_restore_extended_stats() 2026-01-29 12:14:08 +09:00
storage aio: Don't wait for already in-progress IO 2026-03-27 19:53:32 -04:00
tcop SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
tsearch Replace pg_mblen() with bounds-checked versions. 2026-02-09 12:44:04 +13:00
utils Make geometry cast functions error safe 2026-03-29 20:40:50 +02:00
.gitignore Use <stdint.h> and <inttypes.h> for c.h integers. 2024-12-04 15:05:38 +13:00
c.h Hardcode typeof_unqual to __typeof_unqual__ for clang 2026-03-17 16:44:43 +01:00
fmgr.h Improve type handling of varlena structures 2026-02-11 07:33:24 +09:00
funcapi.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
getopt_long.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
Makefile Fix build inconsistency due to the generation of wait-event code 2026-02-02 08:02:39 +09:00
meson.build Ensure that all three build methods install the same set of files. 2026-02-16 15:20:15 -05:00
miscadmin.h Add password expiration warnings. 2026-02-11 10:36:15 -06:00
pg_config.h.in ssl: Serverside SNI support for libpq 2026-03-18 12:37:11 +01:00
pg_config_manual.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_getopt.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_trace.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
pgstat.h Add support for lock statistics in pgstats 2026-03-24 15:32:09 +09:00
pgtar.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
pgtime.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
port.h strnlen() is now required 2026-01-08 08:51:20 +01:00
postgres.h Remove Int8GetDatum function 2026-03-11 10:46:08 +01:00
postgres_ext.h Move pg_int64 back to postgres_ext.h 2025-09-16 10:48:56 +02:00
postgres_fe.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
varatt.h Improve type handling of varlena structures 2026-02-11 07:33:24 +09:00
windowapi.h Update copyright for 2026 2026-01-01 13:24:10 -05:00