Re: UNIQUE on everything except primary key

From: msi77 <msi77(at)yandex(dot)ru>
To: gvim <gvimrc(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: UNIQUE on everything except primary key
Date: 2011-02-04 07:02:42
Message-ID: 448911296802962@web71.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Do all the 10 columns make a natural key?

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Pavel Stehule 2011-02-04 07:18:32 Re: how control update rows
Previous Message Pavel Stehule 2011-02-03 19:47:31 Re: using of select (myfunction()).* is so slow