On 12/4/22 17:21, Andrew Dunstan wrote:
>
> More generally, I can see uses for error free
> casts, something like, say CAST(foo AS bar ON ERROR blurfl)
What I am proposing for inclusion in the standard is basically the same
as what JSON does:
<cast specification> ::=
CAST <left paren>
<cast operand> AS <cast target>
[ FORMAT <cast template> ]
[ <cast error behavior> ON ERROR ]
<right paren>
<cast error behavior> ::=
ERROR
| NULL
| DEFAULT <value expression>
Once/If I get that in, I will be pushing to get that syntax in postgres
as well.
--
Vik Fearing