Re: Distinct types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Distinct types
Дата
Msg-id 21942.1226084284@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Distinct types  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Distinct types  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Jeff Davis wrote:
>> postgres=# create type mytype as int;
>> CREATE DOMAIN

> Is that really the return message we want?

That's an artifact of the fact that the patch tries to piggyback on
the DOMAIN infrastructure instead of implementing its own statement
type etc.

The overly close relationship between domains and distinct types seems
to also explain the fact that CREATE INDEX fails to fail.  It looks like
getBaseType() will happily smash a distinct type to its base, and Peter
has put defenses to prevent that into some but not all call sites of
getBaseType.  I'm not sure why he did that rather than having the check
inside getBaseType itself; if there's a principled explanation for
having some of them behave differently, it sure isn't given in the
patch.
        regards, tom lane


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

Предыдущее
От: Kenneth Marshall
Дата:
Сообщение: Re: [RRR] Tests citext casts - reviewed
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Block-level CRC checks