I'm running into a problem where I have to create an index with a name
that doesn't conflict with any existing index.  

Currently, its not possible to do in postgres. 

It'd be nice if either of 3 were implemented:
1) alter index to rename it

2) alter table would rename index with some option(?)

3) index namespace should be constricted to the table on which it is
indexed, since no commands to my knowledge manipulate the index without
also specifying the table. I.E. in such a way, I will have index a on
table foo, and index a on table bar without a conflcit.

Is there a specification of current postgres behaviour anywhere in SQL
standard? (i.e. index namespace being global?)

-alex


Tue, 16 Jan 2001 18:51:39 -0500 (EST)
Alex Pilosov <alex@pilosoft.com>
renaming indices?
ALTER TABLE RENAME works on indexes in 7.1; I forget about 7.0.

I think you're right that SQL expects indexes to have a separate
namespace from tables, but until we have schema/namespace support
it's pointless to worry about that.

			regards, tom lane

Tue, 16 Jan 2001 19:06:20 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: renaming indices? 
Alex Pilosov wrote:
> 
> 3) index namespace should be constricted to the table on which it is
> indexed, since no commands to my knowledge manipulate the index without
> also specifying the table.

How about DROP INDEX ... ?

I'm not sure if this is standard SQL, maybe we should have 
ALTER TABLE ... DROP INDEX ...

-----------------
Hannu

Wed, 17 Jan 2001 16:08:57 +0000
Hannu Krosing <hannu@tm.ee>
Re: renaming indices?