Re: Plans for index names unique to a table?

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sean Chittenden <sean(at)chittenden(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Plans for index names unique to a table?
Date: 2003-05-10 17:12:23
Message-ID: 20030510121223.L66185@flake.decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)nasby(dot)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?"

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Browne 2003-05-10 17:44:42 Re: Plans for index names unique to a table?
Previous Message Jim C. Nasby 2003-05-10 17:08:33 Re: realtime data inserts