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 "Timothy J. Wisniewski" <tj...@gmail.com> on 2008/08/14 14:42:35 UTC
create table parse error
Hi,
If I issue the command with ij
create table testing (open int not null);
I get the error
ERROR 42X01: Syntax error: Encountered "open" at line 1, column 23.
However, the command
create table testing (open2 int not null);
works fine. The problem is that the open column name is being interpreted as a
result set command from within the middle of the create SQL, and not a column
name. I can quote open, and it works, but it seems screwy the column name is
not parsed right without quotes. Similar problem with a column name "close".
My question, should Derby fix this? Should a bug be filed? Is Derby's parser
based on ANTLR of something similar?
-Tim
Re: create table parse error
Posted by Rick Hillegas <Ri...@Sun.COM>.
Kathey Marsden wrote:
> Timothy J. Wisniewski wrote:
>> Hi,
>>
>> If I issue the command with ij
>>
>> create table testing (open int not null);
>>
>> I get the error
>>
>> ERROR 42X01: Syntax error: Encountered "open" at line 1, column 23.
>>
>>
> open and close are documented as reserved words at :
> http://db.apache.org/derby/docs/10.4/ref/rrefkeywords29722.html
> So I think it's not a bug.
>
> Kathey
>
>
Just to confirm what Kathey says: Open is a reserved word according to
the 2003 SQL Standard, part 2, section 5.2. I believe Derby's behavior
is correct.
Regards,
-Rick
Re: create table parse error
Posted by Kathey Marsden <km...@sbcglobal.net>.
Timothy J. Wisniewski wrote:
> Hi,
>
> If I issue the command with ij
>
> create table testing (open int not null);
>
> I get the error
>
> ERROR 42X01: Syntax error: Encountered "open" at line 1, column 23.
>
>
open and close are documented as reserved words at :
http://db.apache.org/derby/docs/10.4/ref/rrefkeywords29722.html
So I think it's not a bug.
Kathey