How to write a constraint which need to check other table?

Поиск
Список
Период
Сортировка
От 纪晓曦
Тема How to write a constraint which need to check other table?
Дата
Msg-id 37a11ce00909280218m53b5da82r9c836844e6ce7975@mail.gmail.com
обсуждение исходный текст
Ответы Re: How to write a constraint which need to check other table?  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Список pgsql-general
create table a(
         name varchar(32);
);

create talbe b(
          name1 varchar(32);
          name2 varchar(32);
);


How to write a constraint to check name1, name2 in the table a without change table defination?


ALTER TABLE b ADD CHECK(  ??? );


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

Предыдущее
От: Johan Nel
Дата:
Сообщение: Re: generic modelling of data models; enforcing constraints dynamically...
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: How to write a constraint which need to check other table?