Re: Plans for index names unique to a table?

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Plans for index names unique to a table?
Дата
Msg-id 20030510121223.L66185@flake.decibel.org
обсуждение исходный текст
Ответ на Re: Plans for index names unique to a table?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Plans for index names unique to a table?  (Don Baccus <dhogaza@pacifier.com>)
Список pgsql-hackers
On Sat, May 10, 2003 at 12:10:08PM -0400, Tom Lane wrote:
> > I can think of two ways to handle this...
> > a) Leave indexes in pg_class and add a field to indicate the
> > table/object that the item belongs to. relnamespace could very possebly
> > be used for this.
> > b) Create a seperate table for indexes.
> 
> Either of these cures strikes me as worse than the disease.  Now that we
> have schemas, I don't think that the index name collision problem is
> near as bad as it used to be.  I'm not eager to uglify the catalog
> structure to eliminate the problem.

It doesn't seem that it would be very ugly if relnamespace could be
used. The fact that it's called 'relnamespace' and not 'schemaoid' seems
to indicate this sort of thing was envisioned when it was designed...

> We'd also be creating some compatibility headaches --- for instance,
> DROP INDEX would have to change syntax to include the table name.
True... maybe a compatability mode, or making the table name optional as
long as you identify a unique index name.

Personally, I think the ugliest thing is to leave it as-is; globally
named indexes just seem really stupid, imho.
-- 
Jim C. Nasby (aka Decibel!)                    jim@nasby.net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"



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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: [GENERAL] realtime data inserts
Следующее
От: Don Baccus
Дата:
Сообщение: Re: Plans for index names unique to a table?