Re: Limiting Row Count In a Table?? - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Limiting Row Count In a Table??
Date
Msg-id 20021202153402.GA20537@wolff.to
Whole thread Raw
In response to Limiting Row Count In a Table??  (Çağıl Şeker <cagils@biznet.com.tr>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: USAGE on schema allowed by default?
Next
From: Uro¹ Gruber
Date:
Subject: deny list databases