Questions concerning check constraints

Поиск
Список
Период
Сортировка
От Christian Rengstl
Тема Questions concerning check constraints
Дата
Msg-id 472AF613.90AD.0080.0@klinik.uni-regensburg.de
обсуждение исходный текст
Ответы Re: Questions concerning check constraints
Список pgsql-general
Hi list,

I have two question concerning check constraints:
1) Is it possible to refer to a column in a different table, ie
entering a value in mytable.x should only be allowed if mytable2.y=1 for
example? I know that it is possible to use triggers to do that, but I
think adding a simple check constraint might be simpler.
2) Is it possible to issue custom error messages in case a constraint
is violated?

Thanks!



Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230




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

Предыдущее
От: "Moiz Kothari"
Дата:
Сообщение: Re: Number to Words Conversion
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Improve Search