constraint with check

Поиск
Список
Период
Сортировка
От Viktor Bojović
Тема constraint with check
Дата
Msg-id AANLkTimx6AsyFJnocPk2-nx1MqUvGbSY3W8JWQmE2dRn@mail.gmail.com
обсуждение исходный текст
Список pgsql-sql
Hi
im trying to create foreign key constraint which checks not only the existence of key in foreign table, but it has to check if node field has value=true
but i don't know how to do that, so im asking for help.

alter table wg.nc
add CONSTRAINT "nc_fk" FOREIGN KEY ("Id1")
  REFERENCES "wg"."entities"("Id"),
check (node=true)

thanx in advance

--
---------------------------------------
Viktor Bojović
---------------------------------------
Wherever I go, Murphy goes with me

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

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: Regular Expression Match Operator escape character
Следующее
От: Lee Hachadoorian
Дата:
Сообщение: Aggregating by unique values