Re: constrains of array

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: constrains of array
Дата
Msg-id Pine.BSF.4.21.0012121127270.32695-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: constrains of array  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: constrains of array  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Tue, 12 Dec 2000, Tom Lane wrote:

> 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.

The only case I could see would be if there was some case where you had
equality operators that needed to be defined after the table that had
the references constraint (not sure if that could ever happen).  You
could use alter table in these cases though.

> 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?
I think the spec only requires them to be comparable I believe (I'd
assume that the match predicate rules would apply), so would an equality
operator be sufficient to tell that?

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: case with distinct
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: select cash_out('2'); crashes backend on 7.0.2