Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id BC98A1337B69 for ; Thu, 3 Feb 2011 11:44:32 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 65314-04-2 for ; Thu, 3 Feb 2011 15:44:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) by mail.postgresql.org (Postfix) with ESMTP id 1A2921337B77 for ; Thu, 3 Feb 2011 11:44:24 -0400 (AST) Received: by wyb28 with SMTP id 28so1275692wyb.19 for ; Thu, 03 Feb 2011 07:44:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=KgNuzo61vulIJ0nX3RMYa8sFBliZU7OY7AJVYWjmDHg=; b=uDdLNIWFG+rfSHAiv+sxQttS+Iq2TbRVP8r9QrN6dZsk2Eo6PH0JHqm3S+ywXsZIiB n+DWcl0X+WjaHPscd1hd8RTDdLC361YN+4hA1ABD6RVII5kBQmcHAYNkJkN2CaGUK3nZ CAvmBLb+ZX7lmfSchEO88lJF4UQ9lu8Q+SJ8c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=FSJ/tbWiABICiuvo+CQF/Hsjv1jGLUgyMpGivrDbZKYRmkfoXwKwiv5T6NGHr8Se0Q 9Jy/1ayWreUBFumFoiBKGYq5KXjeTaLph/KJAE2PTX1U+XizW4ikDiPeVsowKgSQk6ao gLv9iFvBGnDWNi4hfxmtlBacjr3OZQrXqoFuI= Received: by 10.227.154.74 with SMTP id n10mr10714624wbw.116.1296747864815; Thu, 03 Feb 2011 07:44:24 -0800 (PST) Received: from [10.0.0.5] (heaton.plus.com [212.159.45.120]) by mx.google.com with ESMTPS id w25sm682785wbd.17.2011.02.03.07.44.23 (version=SSLv3 cipher=RC4-MD5); Thu, 03 Feb 2011 07:44:24 -0800 (PST) Message-ID: <4D4ACD57.1090508@gmail.com> Date: Thu, 03 Feb 2011 15:44:23 +0000 From: gvim User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: pgsql sql Subject: UNIQUE on everything except primary key Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201102/4 X-Sequence-Number: 35080 I have a table with 11 columns and want to eliminate duplication on INSERTs. What's the best method? The obvious solution would be to create a UNIQUE index on everything except the primary key - 'id' - but that's a 10-column index and doesn't sound very efficient. Am I missing something more obvious? gvim