Re: getTypeIOParam is wrong for domains over array types?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: getTypeIOParam is wrong for domains over array types?
Дата
Msg-id 7247.1174318937@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: getTypeIOParam is wrong for domains over array types?  ("Merlin Moncure" <mmoncure@gmail.com>)
Список pgsql-hackers
"Merlin Moncure" <mmoncure@gmail.com> writes:
> On 3/19/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I think probably the right solution is to adjust getTypeIOParam so that
>> it only examines typelem for base types (typtype = 'b').  Can anyone
>> see a downside to that?

> will that skip intermediate check constraints...so that if you have
> domain d1 int, d2 d1, d3 d2, and d2 has check constraint on it, will
> d2 constraint still get evaluated?

Yeah, that'll still work.  The point here is that domain_in has to be
passed d3's type OID to start with.  If we have a stack of nested
domains over an array type, they'll all have typelem equal to the array
element type (so that they can be subscripted the same as the base type
could be).  I think you're confusing typelem with typbasetype ...
        regards, tom lane


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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: getTypeIOParam is wrong for domains over array types?
Следующее
От: "Simon Riggs"
Дата:
Сообщение: Re: CREATE INDEX and HOT (was Question:pg_classattributes and race conditions ?)