Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8600A475923 for ; Tue, 6 Aug 2002 23:35:28 -0400 (EDT) Received: from wolff.to (wolff.to [66.92.219.49]) by postgresql.org (Postfix) with SMTP id AFBC647591E for ; Tue, 6 Aug 2002 23:35:27 -0400 (EDT) Received: (qmail 10896 invoked by uid 500); 7 Aug 2002 03:42:08 -0000 Date: Tue, 6 Aug 2002 22:42:08 -0500 From: Bruno Wolff III To: cnliou@eurosport.com Cc: pgsql-sql@postgresql.org Subject: Re: Limit A Table To 1 Row Message-ID: <20020807034208.GA10875@wolff.to> Mail-Followup-To: cnliou@eurosport.com, pgsql-sql@postgresql.org References: <200208070329.32fc@th00.opsion.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200208070329.32fc@th00.opsion.fr> User-Agent: Mutt/1.3.25i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/123 X-Sequence-Number: 8969 On Wed, Aug 07, 2002 at 03:29:50 +0000, cnliou@eurosport.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.