Re: Plans for index names unique to a table?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jim(at)nasby(dot)net
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 16:10:08
Message-ID: 6793.1052583008@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> What makes it unreasonable? How are constraints handled differently that
> makes it reasonable for them?

Constraints aren't relations and don't need pg_class entries.

> 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.

We'd also be creating some compatibility headaches --- for instance,
DROP INDEX would have to change syntax to include the table name.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2003-05-10 17:08:33 Re: realtime data inserts
Previous Message Ericson Smith 2003-05-10 16:02:18 Re: realtime data inserts