UNIQUE constraint and indexing

From: Arcady Genkin <a(dot)genkin(at)utoronto(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: UNIQUE constraint and indexing
Date: 2001-09-27 22:30:50
Message-ID: r1zpu8cfeqt.fsf@bashful.cdf.toronto.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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);

Many thanks,
--
Arcady Genkin
i=1; while 1, hilb(i); i=i+1; end

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arcady Genkin 2001-09-27 22:37:21 Re: Authenticating user `postgres'
Previous Message Stephan Szabo 2001-09-27 21:46:41 Re: PostGres is not using indices in select, I would like