Re: Okay, how about indexes versus unique/primary constraints?

Поиск
Список
Период
Сортировка
От Curt Sampson
Тема Re: Okay, how about indexes versus unique/primary constraints?
Дата
Msg-id Pine.NEB.4.44.0207111335460.436-100000@angelic.cynic.net
обсуждение исходный текст
Ответ на Okay, how about indexes versus unique/primary constraints?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, 10 Jul 2002, Tom Lane wrote:

> As I currently have Rod's dependency code set up, an index derived from
> a UNIQUE or PRIMARY KEY clause can't be dropped directly; you must drop
> the constraint instead.
> ...
> I went out of my way to make the above happen, but now I'm wondering if
> it was a good idea or not.

I think it's a great idea. It helps make it clear just why the index was
created, so you don't get someone less familiar with the schema saying,
"we don't have any queries that use this index, so we might as well get
rid of it...."

I think this change is hardly likely to cause problems, since adding or
deleting indexes seems unlikely to be automated. It's really a system
administration activity, not something the application would do on its own.

> OTOH one might feel that the index is an implementation detail, and
> the user should only think about the constraint.

Exactly my feeling.

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org   Don't you know, in this new Dark Age, we're
alllight.  --XTC
 



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Okay, how about indexes versus unique/primary constraints?
Следующее
От: "Groff, Dana"
Дата:
Сообщение: Re: Should this require CASCADE?