renaming indices?
renaming indices?
От:
Alex Pilosov <alex@pilosoft.com>
Дата:
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
Re: renaming indices?
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
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
Re: renaming indices?
От:
Hannu Krosing <hannu@tm.ee>
Дата:
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