Re: default index created for primary key
От | Sander Steffann |
---|---|
Тема | Re: default index created for primary key |
Дата | |
Msg-id | 000601c4e85d$04e11940$64c8a8c0@balefirehome обсуждение исходный текст |
Ответ на | Re: default index created for primary key ("vinita bansal" <sagivini@hotmail.com>) |
Список | pgsql-general |
Hi, > I am actually migrating indexes from oracle database to postgres. I wanted > to turn it off so that index on the same columns is not created again > (index created for primary key of a table). I'll probably need to check in > that case and not create the index if it is on the primary key of the > table since that will be created by default. That is the most simple sollution I think. > I am still not clear on why postgres has this restriction? > By uniqueness, you mean to say that if later anyone wants to add a primary > key constraint on a table which already has a primary key defined, > postgres will use this index to determine that there is already a primary > key defined and would not allow to add this constraint since a table > cannot have two primary keys?? No, PostgreSQL uses the index to check that the same value can not occur twice in the primary key field. A pretty important part of primary keys :-) Sander.
В списке pgsql-general по дате отправления: