Make cast functions from jsonb error safe
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-03-28T14:44:13Z
Releases:
19 (unreleased)
Make cast functions from jsonb error safe This adjusts cast functions from jsonb to other types to support soft errors. This just involves some refactoring of the underlying helper functions to use ereturn. This is in preparation for a future feature where conversion errors in casts can be caught. 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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/jsonb.c | modified | +18 −17 |
Discussion
- CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions 94 messages · 2022-12-19 → 2026-07-07