Re: Indexes generated for primary key are not show

From: Constantin Stefanov <cstef(at)mail(dot)ru>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: Indexes generated for primary key are not show
Date: 2004-02-09 09:03:25
Message-ID: 40274CDD.4050207@mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Andreas Pflug wrote:
>> I have PgAdmin III 1.0.2 and PostgreSQL 7.4.1.
>> When I create a table with primary key constraint on it, PostgreSQL
>> automatically creates an index on that column (or columns), which is
>> then shown in psql with \di command.
>> But PgAdmin does not show that index in
>> ...Tables-> <table name> -> Indexes in the left frame.
>> Sometimes it is useful to see all indexes on the table (for example,
>> when trying to understand planner decisions), because planner makes use
>> of those indexes.
>>
>> So I suggest PgAdmin to show all indexes (user and system-generated) or
>> to have an option to show them all.
>>
> These indexes (primary and unique if defined by constraint) are filtered
> out intentionally, but I see your point about the planner. Making them
> display would be a little more complicated than it seems, because we
> need to avoid having them duplicated in the table's definition pane
> (once as constraint, once as index).
Why should such duplication be avoided? There is both constraint
(primary key) and index. Constraint is something logical, index is a way
to implement it. When I 'connect' a trigger to a table, there is trigger
as a function, and trigger usage for a table. Yes, index is more tightly
connected with its table, but in a case of a constraint it is still an
index but system-generated.
And if it would be an option to show such indexes, such duplication is
not a problem at all - if you turn this option on (it may be off by
default), you know what you are doing and know that some constraints may
be duplicated as indexes.

--
Constantin Stefanov

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2004-02-09 09:56:58 Re: Indexes generated for primary key are not show
Previous Message Ma Manh Tien 2004-02-09 08:29:30 Re: F2 key not working for editing rows on XP