Re: limit table to one row

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: limit table to one row
Дата
Msg-id 12466.1244311662@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: limit table to one row  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: limit table to one row  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
Merlin Moncure <mmoncure@gmail.com> writes:
> On Thu, Jun 4, 2009 at 4:13 PM, Brandon
> Metcalf<brandon@geronimoalloys.com> wrote:
>> Is there a way when creating a table to limit it to one row? �That is,
>> without using a stored procedure?

> you can also do it with a trigger.

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 ...

            regards, tom lane

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

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