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

Re: Are Indices automatically generated for primary keys?

From: Clemens Eisserer <linuxhippy(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Are Indices automatically generated for primary keys?
Date: 2010-08-18 14:15:26
Message-ID: AANLkTintOGqZajm70ZAGdBOAwsLZ+P2WztpJNCLBYedt@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-performance
Hi,

> they are generated automatically.

Thanks depesz!
The reason why I asked was because pgAdmin doesn't display the
automatically created indices, which confused me.

Thanks, Clemens

PS:

> If you look at the documentation page for CREATE TABLE, you'll see
> the following ..... but if you use your
> browser to search for PRIMARY KEY within the page, it's not too hard
> to find.
Its quite harsh to imply I didn't look for documentation.
I looked at the "Indexes and ORDER BY" which doesn't mention it, or
I've overlook it.
Doesn't make a difference anyway.

> Also, if you create a primary key or a unique constraint on a table,
> you should see a notice informing you of the creation of the index,
> and its name.
I use Hibernate, and it generates the DDL for me.
Even with debug/DDL/SQL-output enabled, I don't get any hint that an
index was created.

In response to

Responses

pgsql-performance by date

Next:From: Kevin GrittnerDate: 2010-08-18 14:24:37
Subject: Re: Are Indices automatically generated for primary keys?
Previous:From: Kevin GrittnerDate: 2010-08-18 13:59:34
Subject: Re: Are Indices automatically generated for primary keys?

pgsql-general by date

Next:From: Kevin GrittnerDate: 2010-08-18 14:24:37
Subject: Re: Are Indices automatically generated for primary keys?
Previous:From: Kevin GrittnerDate: 2010-08-18 13:59:34
Subject: Re: Are Indices automatically generated for primary keys?

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