Re: constraint -- one or the other column not null

Поиск
Список
Период
Сортировка
От Wayne Conrad
Тема Re: constraint -- one or the other column not null
Дата
Msg-id 20060906142112.GA2657@yagni.com
обсуждение исходный текст
Ответ на constraint -- one or the other column not null  ("George Pavlov" <gpavlov@mynewplace.com>)
Список pgsql-general
On Wed, Sep 06, 2006 at 12:04:18AM -0700, George Pavlov wrote:
> I have two columns, both individually nullable, but a row needs to have
> a value in one or the other. What is the best way to implement the
> constraints?

check (a is null != b is null);

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

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Estimate on gborg rescue?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Postgres 8.1.4 sanity_check failed on SuSE 8.2