Re: Plans for index names unique to a table? - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Plans for index names unique to a table?
Date
Msg-id 20030510121223.L66185@flake.decibel.org
Whole thread Raw
In response to Re: Plans for index names unique to a table?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Plans for index names unique to a table?  (Don Baccus <dhogaza@pacifier.com>)
List 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 by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: [GENERAL] realtime data inserts
Next
From: Don Baccus
Date:
Subject: Re: Plans for index names unique to a table?