Skip site navigation (1) Skip section navigation (2)

Re: UNIQUE constraint and indexing

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Arcady Genkin <a(dot)genkin(at)utoronto(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: UNIQUE constraint and indexing
Date: 2001-09-28 15:35:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On 27 Sep 2001, Arcady Genkin wrote:

> Is the index, created implicitely by "UNIQUE" constraint, the same
> kind as created explicitely with "CREATE INDEX"?  In other words,
> is the following piece of SQL redundant?
> create table foo (
>        bar serial primary key,
>        baz text not null unique );
> create index foo_baz_idx on foo(baz);

Apart from the index for unique being a unique index, I believe so.

In response to


pgsql-general by date

Next:From: frederic massotDate: 2001-09-28 16:13:36
Subject: Re: Problem with the accents
Previous:From: Bruce MomjianDate: 2001-09-28 15:30:19
Subject: Re: Encoding passwords

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group