Re: constrains of array

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: constrains of array
Дата
Msg-id 2765.976647872@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: constrains of array  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Ответы Re: constrains of array  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-bugs
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
>> 2) It should be error in *creation* of table if there is no comparasion
>> operator for constrain check

> Possibly, although it currently doesn't to allow you to add the operator
> after you do the references.  The benefits of that might be outweighed by
> the problems if you don't add the operator.

I can't see any good reason not to require the operator to pre-exist.
In fact, there's a good argument that we should require the two columns
to have the exact same datatype.  Otherwise, equality may be a pretty
fuzzy concept.  Think about varchar vs bpchar comparison, for example
--- shall we consider trailing blanks significant?  Which column will
drive the choice?

In any case, it's certainly a bad idea that the system accepted an
FK constraint relating int[] to int.

            regards, tom lane

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

Предыдущее
От: Merrill Oveson
Дата:
Сообщение: case with distinct
Следующее
От: Tom Lane
Дата:
Сообщение: Re: case with distinct