Re: limit table to one row

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: limit table to one row
Дата
Msg-id 12808.1244312976@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: limit table to one row  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
Merlin Moncure <mmoncure@gmail.com> writes:
> On Sat, Jun 6, 2009 at 2:07 PM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
>> If you're willing to use a trigger, just insert the one allowed row
>> and then install a trigger that throws error for any insert or delete
>> attempt ...

> what if you need to delete then insert? :-)

Hmm ... I supposed the requirement was "always exactly one row".
If it's "always zero or one row", then you're right.

            regards, tom lane

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: limit table to one row
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: NOT NULL with CREATE TYPE