Thread: Re: pgAdmin 3 index display problem

Re: pgAdmin 3 index display problem

From
Eduardas Tcpa
Date:
Hello I'm getting into strange problem with pgAdmin 3.
As we all know, PostgreSQL enforces index creation on primary key's.
The problem with this is the fact, that when i create a table in pgAdmin's sql editor, in result window i'm getting success and a note that an index will be created on tables pripamary key - problem, when I am browsing through table structure in my public schema, under newly created  table in index section there are no indexes until I create one explicitly.So does it create an index?and it's pgAdmin's bug not displaying the auto created index, or it works in such way - not displaying the auto index?

PostgreSQL version: 9.0.1 

Re: pgAdmin 3 index display problem

From
Thom Brown
Date:
On 1 November 2010 13:41, Eduardas Tcpa <tcpa41@gmail.com> wrote:
Hello I'm getting into strange problem with pgAdmin 3.
As we all know, PostgreSQL enforces index creation on primary key's.
The problem with this is the fact, that when i create a table in pgAdmin's sql editor, in result window i'm getting success and a note that an index will be created on tables pripamary key - problem, when I am browsing through table structure in my public schema, under newly created  table in index section there are no indexes until I create one explicitly.So does it create an index?and it's pgAdmin's bug not displaying the auto created index, or it works in such way - not displaying the auto index?

PostgreSQL version: 9.0.1 


Yes, it will always create a unique index for primary keys, but just not visible in pgAdmin as an actual index.  The fact a primary key is there (listed in the contraints node) indicates that it automatically has an index anyway.  And the name shown in constraints is the name of the index.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

Re: pgAdmin 3 index display problem

From
Guillaume Lelarge
Date:
Le 01/11/2010 06:41, Eduardas Tcpa a écrit :
>>
>> Hello I'm getting into strange problem with pgAdmin 3.
>> As we all know, PostgreSQL enforces index creation on primary key's.
>> The problem with this is the fact, that when i create a table in pgAdmin's
>> sql editor, in result window i'm getting success and a note that an index
>> will be created on tables pripamary key - problem, when I am browsing
>> through table structure in my public schema, under newly created  table in
>> index section there are no indexes until I create one explicitly.So does it
>> create an index?and it's pgAdmin's bug not displaying the auto created
>> index, or it works in such way - not displaying the auto index?
>>
>> PostgreSQL version: 9.0.1
>>
>

pgAdmin displays the primary key in the Constraints node. There is no
reason to display the index in the Indexes node as you won't be able to
change/remove the index.

The same applies to unique keys.

BTW, I see more and more questions here about pgAdmin. You should
probably ask them on pgadmin-support
(http://archives.postgresql.org/pgadmin-support/).


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com