Re: Limiting Row Count In a Table??

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Limiting Row Count In a Table??
Дата
Msg-id 20021202153402.GA20537@wolff.to
обсуждение исходный текст
Ответ на Limiting Row Count In a Table??  (Çağıl Şeker <cagils@biznet.com.tr>)
Список pgsql-general
On Mon, Dec 02, 2002 at 17:04:06 +0200,
  Ça??l ?eker <cagils@biznet.com.tr> wrote:
> Hello,
>
> Is there a way in PG that allows limiting number of rows for a table.
>
> If not maybe there is another way to achieve this:
> I want my table to have only one row, if any other row is inserted or this one row is deleted it should give an error
andwon't let it go. 
>
> How can this be done the right way?

A good start would be to only give out select and update access (and not
delete or insert access).

If that isn't good enough, then you will need to write triggers or rules
to do it.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: USAGE on schema allowed by default?
Следующее
От: Uro¹ Gruber
Дата:
Сообщение: deny list databases