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 15:53:09
Message-ID: 20030510105309.J66185@flake.decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 09, 2003 at 12:07:13AM -0400, Tom Lane wrote:
> Sean Chittenden <sean(at)chittenden(dot)org> writes:
> > Are there any plans to make index names unique to a table instead of
> > to a schema?
>
> None on my plate ... I don't see any very reasonable way to do it.
> Do you?

What makes it unreasonable? How are constraints handled differently that
makes it reasonable for them?

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.

Of course, it's trivial to change a few system tables, it's changing
everything else in code that will be the fun part. :) I'm hoping that
plan a wouldn't impact the internals too badly, but I really have no
idea.

FWIW, DB2 and (I think) Oracle both use a global namespace for indexes.
Sybase and (I think) MSSQL don't. I really don't understand why you'd
want indexes in a global namespace and wish IBM and Oracle would change
their products.
--
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 Tom Lane 2003-05-10 16:00:02 Re: realtime data inserts
Previous Message Adam Siegel 2003-05-10 15:25:16 realtime data inserts