Re: [GENERAL] Key Vs Index

2009-02-11 Thread Raymond O'Donnell
On 11/02/2009 07:37, Abdul Rahman wrote: > But PG_Admin-III does not show this index. Sorry to say that I faced > several problems because of PG_Admin-III. And I advise you to use > psql prompt instead of GUI. I think that's a little unfair. PgAdmin is IMHO a great tool, and I've found it invaluab

Re: [GENERAL] Key Vs Index

2009-02-11 Thread Dave Page
On Wed, Feb 11, 2009 at 7:37 AM, Abdul Rahman wrote: > I have found the answer. PostgreSQL creates index on primary key implicitly > and can be seen via \d tablename; command on psql prompt. But PG_Admin-III > does not show this index. pgAdmin shows the primary key which is the index. -- Dave P

Re: [GENERAL] Key Vs Index

2009-02-10 Thread Scott Marlowe
On Wed, Feb 11, 2009 at 12:37 AM, Abdul Rahman wrote: > I have found the answer. PostgreSQL creates index on primary key implicitly > and can be seen via \d tablename; command on psql prompt. But PG_Admin-III > does not show this index. Sorry to say that I faced several problems because > of PG_Ad

Re: [GENERAL] Key Vs Index

2009-02-10 Thread Craig Ringer
Scott Marlowe wrote: > Note that the index on the FK side isn't auto created. Of course, you often don't want one - you might rarely or never DELETE from the referenced table or UPDATE the primary key value. In that case, the index just slows down updates and deletes on the table with the fk with

Re: [GENERAL] Key Vs Index

2009-02-10 Thread Abdul Rahman
I have found the answer. PostgreSQL creates index on primary key implicitly and can be seen via \d tablename; command on psql prompt. But PG_Admin-III does not show this index. Sorry to say that I faced several problems because of PG_Admin-III. And I advise you to use psql prompt instead of GUI.

Re: [GENERAL] Key Vs Index

2009-02-10 Thread Scott Marlowe
On Wed, Feb 11, 2009 at 12:09 AM, Abdul Rahman wrote: > In Oracle, the index is automatically created during the creation of Primary > Key. But in PostgreSQL either index is implicitly created of the user hast > create it explicitly. I don't find any index against Primary Key and have to > create

Re: [GENERAL] Key Vs Index

2009-02-10 Thread Craig Ringer
Abdul Rahman wrote: > > In Oracle, the index is automatically created during the creation of > Primary Key. The same is true in PostgreSQL. For example, here's a message from a recent job I ran that created a temp table with SELECT ... INTO and added a primary key to it: psql:import_checks.sql:7

[GENERAL] Key Vs Index

2009-02-10 Thread Abdul Rahman
In Oracle, the index is automatically created during the creation of Primary Key. But in PostgreSQL either index is implicitly created of the user hast create it explicitly. I don't find any index against Primary Key and have to create index on this key.