error handling in cast functions for user defined types

Поиск
Список
Период
Сортировка
От Don Y
Тема error handling in cast functions for user defined types
Дата
Msg-id 44691EED.4010600@DakotaCom.Net
обсуждение исходный текст
Ответы Re: error handling in cast functions for user defined types  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,

I'm writing a set of casts to/from various user defined
types.  As is unexpected, there are cases where one
data type doesn't neatly map to another (for certain
values).  In these cases I emit an INVALID_PARAMETER_VALUE
or OUT_OF_RANGE error -- depending on the situation.

But, should I also PG_RETURN_NULL()?  I note the
cast of int4's to int2's signal similar errors -- *but*
returns "(int2) value".

Is the return value just *ignored* when the error is
signaled?

Thanks!
--don

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: parameter passing from java program
Следующее
От: Tom Lane
Дата:
Сообщение: Re: error handling in cast functions for user defined types