Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 54EEC476CAE for ; Fri, 17 May 2002 14:58:54 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 783154766FE for ; Fri, 17 May 2002 14:42:44 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 685B2D613; Fri, 17 May 2002 11:42:43 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 55FBF5C02; Fri, 17 May 2002 11:42:43 -0700 (PDT) Date: Fri, 17 May 2002 11:42:43 -0700 (PDT) From: Stephan Szabo To: Josh Berkus Cc: Subject: Re: Constraint problem In-Reply-To: Message-ID: <20020517114156.Q20428-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200205/187 X-Sequence-Number: 7822 On Thu, 16 May 2002, Josh Berkus wrote: > Stephan, > > > AFAIK we don't actually have statement triggers right now, anyway, > > but... > > Actually, I guess an after trigger that just checked the new values > > would > > work as well, right? See if there exists more than one row with the > > new > > key value. The after trigger should fire after all the changes are > > done > > and in the worst case you could use constraint triggers and > > deferment. > > The hard part about this really is making it work with concurrent > > modifications, and if you're willing to forgo that, it shouldn't be > > too > > bad. > > Thanks. I'll give your solution a try and see what the performance hit > is. > > Is the Unique Constraint issue on the To-Do list? I'm not sure. I know it's been mentioned in the past, so probably (too lazy to look right now).