db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Hlavat? (JIRA) <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-13) Quoted names with embedded period mishandled in from list
Date Wed, 01 Dec 2004 13:29:21 GMT
     [ http://nagoya.apache.org/jira/browse/DERBY-13?page=comments#action_56056 ]
     
Jan Hlavatý commented on DERBY-13:
----------------------------------

I believe SQL92 limits table names to letters, numbers and underscore characters (with underscore
and number not being first character of the identifier), so if the first create table statement
creates table with actual name "S1.T1" it is probably wrong.

Some syntax definitions from ANSI X3.135-1992:

<table name> ::= <qualified name> | <qualified local table name>
<qualified local table name> ::= MODULE <period> <local table name>
<local table name> ::= <qualified identifier>
<qualified identifier> ::= <identifier>
<qualified name> ::= [ <schema name> <period> ] <qualified identifier>
<identifier> ::= [ <introducer><character set specification> ] <actual
identifier>
<actual identifier> ::= <regular identifier> | <delimited identifier>
<regular identifier> ::= <identifier body>
<identifier body> ::= <identifier start> [ { <underscore> | <identifier
part> }... ]
<identifier part> ::= <identifier start> | <digit>

1) An <identifier start> is one of:
a) A <simple Latin letter>; or
b) A character that is identified as a letter in the character repertoire identified by the
<module character set specification> or by the <character set specification>;
or
c) A character that is identified as a syllable in the character repertoire identified by
the <module character set specification> or by the <character set specification>;
or
d) A character that is identified as an ideograph in the character repertoire identified by
the <module character set specification> or by the <character set specification>.


> Quoted names with embedded period mishandled in from list
> ---------------------------------------------------------
>
>          Key: DERBY-13
>          URL: http://nagoya.apache.org/jira/browse/DERBY-13
>      Project: Derby
>         Type: Bug
>   Components: SQL
>     Versions: 10.0.2.0
>     Reporter: Ramandeep Kaur
>     Priority: Minor
>  Attachments: Derby-13.patch
>
> Opening this bug on behalf of Satheesh Bandaram
> ---------------------------------------------------------
> The compiler mishandles quoted names with embedded periods when 
> checking uniqueness of table names in the from list of a 
> SELECT. Consider the following SQL:
>   create table "S1.T1" (id int not null primary key, d1 int);
>   create schema s1;
>   create table s1.t1 (id int not null primary key, d2 int);
>   select * from s1.t1, "S1.T1" where s1.t1.id = "S1.T1".id;
> Derby throws an error on the final SELECT statement:
> "ERROR 42X09: The table or alias name 'S1.T1' is used more than 
> once in the FROM list". However s1.t1 and "S1.T1" are different 
> tables.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message