I am currently facing issue of renaming an index to a number.
I have tried the below:
RENAME INDEX 584_1973_tmp TO '584_1973';
RENAME INDEX 584_1973_tmp TO ' 584_1973';
RENAME INDEX 584_1973_tmp TO "584_1973";
RENAME INDEX 584_1973_tmp TO " 584_1973";
None of the above seems to work. Is it possible to rename an index to a number within Informix?
DELIMIDENT=1
in the environment, but I'm not convinced it's a good idea, even though you rarely refer to indexes by name.584_1973_tmp
in the first place? You'd need to be using delimited identifiers when the index was created. The Informix DBMS automatically creates index names with a leading space when you implicitly create an index (e.g.CREATE TABLE x(y SERIAL NOT NULL PRIMARY KEY, …)
because it is hard for users to do that. (See output fromSELECT idxname FROM informix.sysindices WHERE idxname MATCHES ' *'
for example.)