pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: msi77 <msi77@yandex.ru>
To: gvim <gvimrc@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: UNIQUE on everything except primary key
Date: Fri, 04 Feb 2011 10:02:42 +0300
Message-ID: <448911296802962@web71.yandex.ru> (raw)
In-Reply-To: <4D4ACD57.1090508@gmail.com>
References: <4D4ACD57.1090508@gmail.com>

Do all the 10 columns make a natural key?

03.02.2011, 18:44, "gvim" <gvimrc@gmail.com>:
> 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
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql



view thread (3+ messages)

Message-ID: <448911296802962@web71.yandex.ru>
Permalink:  ../448911296802962@web71.yandex.ru/
Also on:    postgresql.org/message-id/448911296802962@web71.yandex.ru

 · 

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: msi77@yandex.ru, gvimrc@gmail.com
  Subject: Re: UNIQUE on everything except primary key
  In-Reply-To: <448911296802962@web71.yandex.ru>

* 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