You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Bernt M. Johnsen" <Be...@sun.com> on 2005/05/06 10:36:41 UTC

Qouted index names

Hi!

Is there a reason for handling quoted index names different from other
quoted names? As I understand SQL, i1 and "i1" are different
identifiers, also for indexes, but derby gives warning:

ij> create index i1 on t1 (i);
0 rows inserted/updated/deleted
ij> create index "i1" on t1 (i);
0 rows inserted/updated/deleted
WARNING 01504: The new index is a duplicate of an existing index: I1.

A minor detail, but if nobody objects, I'll file an issue.
-- 
Bernt Marius Johnsen, Database Technology Group, Sun Microsystems, Norway

Re: Qouted index names

Posted by "Bernt M. Johnsen" <Be...@Sun.COM>.
>>>>>>>>>>>> Mamta Satoor wrote (2005-05-06 06:17:00):
> Hi Brent,
> 
> The warning is not for the index name. It is because the 2nd index is
> getting defined on the same column as the first index.

Thanks. I should have thought of that.  

But the second index is not created. Shouldn't the warning have been
an error (since two consecutive creations cannot be followed by two
corresponding drops)?

ij> create index x1 on tab1(i);
0 rows inserted/updated/deleted
ij> create index x2 on tab1(i);
0 rows inserted/updated/deleted
WARNING 01504: The new index is a duplicate of an existing index: X1.
ij> drop index x2;
ERROR 42X65: Index 'X2' does not exist.
ij> drop index x1;
0 rows inserted/updated/deleted





-- 
Bernt Marius Johnsen, Database Technology Group, Sun Microsystems, Norway

Re: Qouted index names

Posted by Mamta Satoor <ms...@gmail.com>.
Hi Brent,

The warning is not for the index name. It is because the 2nd index is
getting defined on the same column as the first index.

Mamta

On 5/6/05, Bernt M. Johnsen <Be...@sun.com> wrote:
> Hi!
> 
> Is there a reason for handling quoted index names different from other
> quoted names? As I understand SQL, i1 and "i1" are different
> identifiers, also for indexes, but derby gives warning:
> 
> ij> create index i1 on t1 (i);
> 0 rows inserted/updated/deleted
> ij> create index "i1" on t1 (i);
> 0 rows inserted/updated/deleted
> WARNING 01504: The new index is a duplicate of an existing index: I1.
> 
> A minor detail, but if nobody objects, I'll file an issue.
> --
> Bernt Marius Johnsen, Database Technology Group, Sun Microsystems, Norway
>