Re: Fixing domain input

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fixing domain input
Дата
Msg-id 29754.1121053622@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Fixing domain input  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Fixing domain input  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:
> It occurs to me that a cleaner solution would be to stop giving domain
> types the same typinput routines as their base types.  Instead, give
> them all a specialized routine domain_in (comparable to array_in) that
> first invokes the base type's input function and then applies any
> relevant constraint checks.

I did most of the work of coding this up, only to watch the idea
crash and burn: datatype input routines aren't called at all for
NULL values, so there's no way to enforce a NOT NULL domain constraint
from the input routine.

Currently trying to think of decent alternatives ...
        regards, tom lane


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

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: suspicious pointer/integer coersion
Следующее
От: Ferruccio Zamuner
Дата:
Сообщение: fetch_search_path() and elog.c