Re: Problem with subquery in CHECK constraint.
От | Niall Smart |
---|---|
Тема | Re: Problem with subquery in CHECK constraint. |
Дата | |
Msg-id | 393F8A00.1D2D4AB5@ebeon.com обсуждение исходный текст |
Ответ на | RE: Problem with subquery in CHECK constraint. ("Hiroshi Inoue" <Inoue@tpf.co.jp>) |
Ответы |
RE: Problem with subquery in CHECK constraint.
|
Список | pgsql-sql |
CONSTRAINT TYPE_CD_OK CHECK (EXISTS (SELECT 1 FROM XREF WHERE XREF_GROUP = 'CUST_TYPE' AND XREF_CD = TYPE_CD) ) > There seems to be more serious problems. > 1) The constraint is not only for the defined table but also for referenced > tables in the subquery. I don't understand what you mean -- the constraint only constrains 1 column in one table... > 2) There should be some standard lock mechanism for the range restricted > by the subquery. > > I'm suspicious that we should/could implement constraints other than > column constraints. Again, I don't fully understand what you're saying; but I have successfully implemented the constraint using a user defined function. Niall
В списке pgsql-sql по дате отправления: