pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: gvim <gvimrc@gmail.com>
To: pgsql sql <pgsql-sql@postgresql.org>
Subject: UNIQUE on everything except primary key
Date: Thu, 03 Feb 2011 15:44:23 +0000
Message-ID: <4D4ACD57.1090508@gmail.com> (raw)

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



view thread (3+ messages)  latest in thread

Message-ID: <4D4ACD57.1090508@gmail.com>
Permalink:  ../4D4ACD57.1090508@gmail.com/
Also on:    postgresql.org/message-id/4D4ACD57.1090508@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gvimrc@gmail.com
  Subject: Re: UNIQUE on everything except primary key
  In-Reply-To: <4D4ACD57.1090508@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox