Re: Single row tables

Поиск
Список
Период
Сортировка
От sad
Тема Re: Single row tables
Дата
Msg-id 200501120939.59489.sad@bankir.ru
обсуждение исходный текст
Ответ на Single row tables  (KÖPFERL Robert <robert.koepferl@sonorys.at>)
Список pgsql-sql
On Tuesday 11 January 2005 17:45, KÖPFERL Robert wrote:
> Hi,
>
> with what constraint or how can I ensure that one of my tables has exact
> one record or 0..1 records?

A trigger procedure BEFORE INSERT would help you.

And a column type with only one possible field value would help you if you
define UNIQUE INDEX on a field of this (user-defined) type.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Simple Question
Следующее
От: KÖPFERL Robert
Дата:
Сообщение: Implementing queue semantics (novice)