Re: Error-safe user functions

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: Error-safe user functions
Дата
Msg-id f8600a3b-f697-2577-8fea-f40d3e18bea8@postgresfriends.org
обсуждение исходный текст
Ответ на Re: Error-safe user functions  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Error-safe user functions  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
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




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Vik Fearing
Дата:
Сообщение: Re: Questions regarding distinct operation implementation
Следующее
От: Ankit Kumar Pandey
Дата:
Сообщение: Re: Questions regarding distinct operation implementation