Re: [NOVICE] Conditional constraint?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: [NOVICE] Conditional constraint?
Дата
Msg-id web-821592@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на Conditional constraint?  (Nick Haw <nick.haw@operagrp.com>)
Список pgsql-general
Nick,

> What I want to do is make a field so that it requires a value after a
>  change
> in another field to a particular value. Is this possible with the ADD
> CONSTRAINT command, or will I have to make a custom function and use
>  a
> trigger.

That depends on how complicated your rules are.  All constraints must
 evaluate to a true/false statement, so complex procedures require a
 function + trigger instead.  How about posting some more details?

-Josh

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

Предыдущее
От: "PGMailList"
Дата:
Сообщение: Re: Field Constraints
Следующее
От: eel@javabox.com (Eel)
Дата:
Сообщение: Converting/formatting timestamp arithmetic