Subject Re: [ib-support] Indexnames in Plan
Author Claudio Valderrama C.
""Sandeep"" <sandeep@...> wrote in message
news:3C4FC9D4.18913.2562C1@localhost...
> I cannot have indexnames with double quotes around them in a
> plan. Is it a bug in FB/IB?

Maybe in IB, not FB.

Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'c:/temp/idx.gdb';
SQL> create table t(a int);
SQL> create index "i" on t(a);
SQL> commit;
SQL> show tables t;
A INTEGER Nullable
SQL> show index;
i INDEX ON T(A)
SQL> set plan;
SQL> select a from t;

PLAN (T NATURAL)
SQL> select a from t order by 1;

PLAN (T ORDER i)
SQL> select a from t plan (t order i) order by 1;
Statement failed, SQLCODE = -104

invalid request BLR at offset 45
-there is no index I for table T
SQL> select a from t plan (t order "i") order by 1;

PLAN (T ORDER i)
SQL>

I can see that the index is recognized properly when surrounded with double
quotes. Since it's lowercase, the first attempt without dquotes fail.

C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing