Re: array of domain types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: array of domain types
Дата
Msg-id 9534.1464877334@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: array of domain types  (konstantin knizhnik <k.knizhnik@postgrespro.ru>)
Ответы Re: array of domain types  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Список pgsql-hackers
konstantin knizhnik <k.knizhnik@postgrespro.ru> writes:
> Attached please find patch for DefineDomain function.

You didn't attach the patch, but in any case, I would be astonished
if there is no work required beyond creating the matching array type.
The reverse case (domains over arrays) has half a dozen special cases
required to make it work smoothly.  Probably the considerations on this
side are totally different, but it's hard to believe there aren't any.

One case that seems likely to be pretty squishy is an array of a domain
over an array type.  One would wish to be able to do foo[2][4] to
extract an element of the contained array.  That won't work as-is
because the notation will be taken as a multi-dimensional subscript,
but I would expect that (foo[2])[4] should work.  Does it?  Does
ruleutils.c always include the necessary parens when reverse-listing
such a construct?  Is it possible to assign to such a sub-element,
and if so, do the domain constraints get checked properly?

Domain over an array that is of a domain type might be another fun
case.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: pg9.6 segfault using simple query (related to use fk for join estimates)
Следующее
От: Greg Stark
Дата:
Сообщение: epoll_wait returning EFAULT on Linux 3.2.78