Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA74437; Wed, 15 Sep 1999 09:47:23 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id JAA19037; Wed, 15 Sep 1999 09:46:35 -0400 (EDT) To: "=?iso-8859-1?Q?St=E9phane_FILLON?=" cc: "pgsql-sql" , "pgsql-hackers" , "pgsql-general" Subject: Re: [HACKERS] BUG with UNIQUE clause In-reply-to: Your message of Wed, 15 Sep 1999 05:14:15 +1100 <000f01befedd$3f26fda0$a6373ad1@portable> Date: Wed, 15 Sep 1999 09:46:35 -0400 Message-ID: <19035.937403195@sss.pgh.pa.us> From: Tom Lane "=?iso-8859-1?Q?St=E9phane_FILLON?=" writes: > The UNIQUE constraint doesn't work on a field if I use a DEFAULT clause > on a table. This sounds closely related to a fix that Thomas Lockhart just made. IIRC the complained-of symptom was that PRIMARY KEY on one column plus UNIQUE on another didn't work, but the real problem was that PRIMARY KEY implies UNIQUE and the table declaration code was getting confused by two different UNIQUE columns in one table. It could be that his fix addresses your problem too. Check the pghackers archives for the last couple weeks to find the patch. regards, tom lane