Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
Date
Msg-id CADkLM=cmv_bmxBe8KmZd6rEgiqSdoDfHnJa63u7rdRuAsqOwDA@mail.gmail.com
Whole thread Raw
In response to Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions  (jian he <jian.universality@gmail.com>)
Responses Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
List pgsql-hackers
+ if (inputElementBaseType == MONEYOID ||
+ targetElementBaseType == MONEYOID ||
+ (inputElementBaseType == CIRCLEOID &&
+ targetElementBaseType == POLYGONOID))
+ {
+ errorsafe_coercion = false;
+ }

What if we just reject cast functions with a non-null prosqlbody?
 

Given the interaction with array and domain coercion, we need to think more
about error-safe type casts for user-defined range, multirange, and composite
types.  For now, we should disallow error-safe casting for these types.

I agree. It's far better to get this working for the majority of cases, and we can chip away at more obscure types later. There will *always* be user defined types that we cannot account for.

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: DOCS: typo on CLUSTER page
Next
From: Haibo Yan
Date:
Subject: Re: vectorized CRC on ARM64