Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 0FAD69FB4F7 for ; Tue, 27 Mar 2007 11:27:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 07147-02-2 for ; Tue, 27 Mar 2007 11:27:19 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.183]) by postgresql.org (Postfix) with ESMTP id 89E7B9FB2F8 for ; Tue, 27 Mar 2007 11:27:25 -0300 (ADT) Received: by ik-out-1112.google.com with SMTP id c21so2090002ika for ; Tue, 27 Mar 2007 07:27:23 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kCxDnc8S2PMA48M1Ed/GzEk6pOH1jlcn3ccw4C9KD/0/ezCxu0J/AsKAR6nwHs93ju1L2kL8q4aj0wohFZoU0i0BTCeUrupgr1LkrDL3LKr1O8Gakvmm8mdd649jM3ZL1FGIJspYs2Tl01sDZ4tQt3h3o/Norq/ancQYQivv23I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pD9e6tLl8z4cABUQ/6Z70EXKkTpJrq9jpGgu5pezhUnvYPkQFF0ldjYNW3NL+zQa+XAZGluTUmy6zo6TQgFodzUvky4NGirfQf3p/yi2sTmrpmUJ3ZRZAPWvU3EYJCMcDc1elNKw439vSirJ6U8KflDIdOgnpV+T9+j6Wdzlk1I= Received: by 10.114.202.15 with SMTP id z15mr3174333waf.1175005638814; Tue, 27 Mar 2007 07:27:18 -0700 (PDT) Received: by 10.114.47.8 with HTTP; Tue, 27 Mar 2007 07:27:18 -0700 (PDT) Message-ID: <4f4c2a010703270727l28ad24c6if8881ad6253f9253@mail.gmail.com> Date: Tue, 27 Mar 2007 10:27:18 -0400 From: "Jon Horsman" To: pgsql-sql@postgresql.org Subject: Re: Foreign Unique Constraint In-Reply-To: <20070327133642.GB19137@a-kretschmer.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4f4c2a010703270621h5137a4e5rb515a9be9034a543@mail.gmail.com> <20070327133642.GB19137@a-kretschmer.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/315 X-Sequence-Number: 27953 > > create table table1 ( > > id SERIAL PRIMARY KEY > > extension UNIQUE, > > I can't find anything about this syntax in the docs... Oops, i'm missing a comma on that first line, should have been: create table table1 ( id SERIAL PRIMARY KEY, extension UNIQUE, ) > I think, you should write a TRIGGER for this. Ok, i'll look into how that works. Anyone have any other input? Thanks, Jon