Re: Limit A Table To 1 Row

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: cnliou(at)eurosport(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Limit A Table To 1 Row
Date: 2002-08-07 03:42:08
Message-ID: 20020807034208.GA10875@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, Aug 07, 2002 at 03:29:50 +0000,
cnliou(at)eurosport(dot)com wrote:
> Hello!
>
> Corporate table, t1, should contain exact 1 row.
> I strongly believe that there are cleaner versions
> than the following combination of trigger and rule.
>
> Thank you in advance for any improved version!

Another way to keep someone from inserting a second row is to have a primary
key and a constraint fixing the primary key to a fixed value.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bruno Wolff III 2002-08-07 03:47:28 Re: SQL syntax
Previous Message Tom Lane 2002-08-07 03:31:49 Re: SQL syntax