Re: Domain Support -- another round

Поиск
Список
Период
Сортировка
От Fernando Nasser
Тема Re: Domain Support -- another round
Дата
Msg-id 3C99FD03.96D1467B@redhat.com
обсуждение исходный текст
Ответ на Re: Domain Support -- another round  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-patches
Rod Taylor wrote:
>
> > 2. Arrays.  I don't much care for the fact that arrays of
> domain-type
> > values aren't supported.  The handling of domains that are
> themselves
> > arrays seems a tad odd as well: the array-ish nature of the domain
> is
> > exposed, which doesn't make a lot of sense to me.  Perhaps we'd be
> > better off to forbid array domains.
>
> The reason I didn't make array types for domains is that I have
> absolutly no idea how to manage the below case once point 4 is
> implemented.
>
> create domain dom as int4 check (VALUE > 5);
> create table tab (col1 dom[2][3]);
>

SQL'99 explicitly forbids it.  Please refer to my posting to HACKERS
for the SQL document reference.



> > 3. Domains on domains.  Why shouldn't I be able to make a domain
> that's
> > a further restriction of another domain?
>
> Not entirely sure, except the book I had (SQL99 Complete, Really)
> specifically forbids it.
>

Yes, but this is their interpretation of the standard. There is an
error in that page anyway, as the standard explicitly forbids
arrays and UDTs and they list REF and ARRAY as valid data types.
(they also get confused with SESSION_USER and CURENT_USER on page
281, so it does not surprise me).

I couldn't find anything in the standard explicitly forbidden it.
But I don't think this is a very useful feature anyway.  As one is
creating another domain, he /she can as well specify constraints
that represent a further reduction of the valid values range.



--
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

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

Предыдущее
От: "Rod Taylor"
Дата:
Сообщение: Re: Domain Support -- another round
Следующее
От: Ferdinand Smit
Дата:
Сообщение: Re: pg_dump and transactions