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 "Shreyas Kaushik (JIRA)" <de...@db.apache.org> on 2005/07/06 13:02:18 UTC
[jira] Commented: (DERBY-165) Droppping columns with ALTER TABLE errors out
[ http://issues.apache.org/jira/browse/DERBY-165?page=comments#action_12315131 ]
Shreyas Kaushik commented on DERBY-165:
---------------------------------------
What should be the expected behaviour for this? Is this documented in the SQL spec. I don't have a copy of that.
> Droppping columns with ALTER TABLE errors out
> ---------------------------------------------
>
> Key: DERBY-165
> URL: http://issues.apache.org/jira/browse/DERBY-165
> Project: Derby
> Type: New Feature
> Components: SQL
> Environment: Linux
> Reporter: Shreyas Kaushik
> Priority: Minor
>
> When I try to drop columns using ALTER TABLE command I get the following error, irrespective of me using "column" keyword in addition to the drop keyword.
> ----------------------ERROR REPORT-------------------------------------------
> ij> alter table test_linux drop column dept;
> ERROR 42X01: Syntax error: Encountered "drop" at line 1, column 24.
> ij> alter table test_linux drop dept;
> ERROR 42X01: Syntax error: Encountered "drop" at line 1, column 24.
> ----------------------ERROR REPORT-------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Re: [jira] Commented: (DERBY-165) Droppping columns with ALTER TABLE
errors out
Posted by Shreyas Kaushik <Sh...@Sun.COM>.
Daniel John Debrunner wrote:
>Dag H. Wanvik wrote:
>
>
>
>>Hi Daniel,
>>
>>
>>
>>
>>>>>>>"DJD" == Daniel John Debrunner <dj...@debrunners.com> wrote:
>>>>>>>
>>>>>>>
>>
>>
>
>
>
>>DJD> Not sure it's the job of Derby to recognize syntax it does not
>>DJD> support/implement. How far would you take it, complete SQL standard, any
>>DJD> other common SQL?
>>DJD> (ALTER TABLE is probably not covered by the standard)
>>
>>It is covered, even in SQL-92, but I agree covering the full
>>standard in the parser is quite a task and probably not worth the
>>effort. Would you recommend that we only recommend the syntax we do
>>support at any one time? I notice we do throw a few
>>SQLState.NOT_IMPLEMENTED exceptions in the parser today, mainly
>>related to national character set. Are there some guidelines which
>>specify which "not implemented" syntax is currently recognized, but
>>rejected?
>>
>>
>
>No. :-)
>
>National Character types were partially removed from Derby, or really
>disabled. Since there was a chance it would be added back in we didn't
>just delete all the code, but left it in for future folks to work on.
>One of the reasons it was disabled is that it wasn't clear that the
>existing Cloudscape implementation was in line with the SQL standard,
>especially with conversions to and from date time values. Rather than
>allow a possible non-standard implementation, that would have to be
>supported for several releases, it was disabled, with the assumption
>that if it was someone's itch they could resolve any SQL standard issues
>before re-enabling it. Given JDBC 4.0 finally adds these types to JDBC,
>it might have been the best solution, otherwise we would have had
>changes in behaviour, e.g. metadata changing from Types.CHAR to
>Types.NATIONAL_CHAR.
>
>Dan.
>
>
So should the behaviour for thi particular thing be the way it is ? Or
should the parser throw a not implemented exception ?
Or is this a feature for the to-do list ?
~ Shreyas
Re: [jira] Commented: (DERBY-165) Droppping columns with ALTER TABLE
errors out
Posted by Daniel John Debrunner <dj...@debrunners.com>.
Dag H. Wanvik wrote:
> Hi Daniel,
>
>
>>>>>>"DJD" == Daniel John Debrunner <dj...@debrunners.com> wrote:
>
>
> DJD> Not sure it's the job of Derby to recognize syntax it does not
> DJD> support/implement. How far would you take it, complete SQL standard, any
> DJD> other common SQL?
> DJD> (ALTER TABLE is probably not covered by the standard)
>
> It is covered, even in SQL-92, but I agree covering the full
> standard in the parser is quite a task and probably not worth the
> effort. Would you recommend that we only recommend the syntax we do
> support at any one time? I notice we do throw a few
> SQLState.NOT_IMPLEMENTED exceptions in the parser today, mainly
> related to national character set. Are there some guidelines which
> specify which "not implemented" syntax is currently recognized, but
> rejected?
No. :-)
National Character types were partially removed from Derby, or really
disabled. Since there was a chance it would be added back in we didn't
just delete all the code, but left it in for future folks to work on.
One of the reasons it was disabled is that it wasn't clear that the
existing Cloudscape implementation was in line with the SQL standard,
especially with conversions to and from date time values. Rather than
allow a possible non-standard implementation, that would have to be
supported for several releases, it was disabled, with the assumption
that if it was someone's itch they could resolve any SQL standard issues
before re-enabling it. Given JDBC 4.0 finally adds these types to JDBC,
it might have been the best solution, otherwise we would have had
changes in behaviour, e.g. metadata changing from Types.CHAR to
Types.NATIONAL_CHAR.
Dan.
Re: [jira] Commented: (DERBY-165) Droppping columns with ALTER TABLE
errors out
Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
Hi Daniel,
>>>>> "DJD" == Daniel John Debrunner <dj...@debrunners.com> wrote:
DJD> > Derby does not support dropping columns, cf
DJD> > http://incubator.apache.org/derby/docs/ref/rrefsqlj81859.html.
DJD> >
DJD> > I think it would be desirable if the parser recognized it and gave a suitable
DJD> > message, though.
DJD>
DJD> Not sure it's the job of Derby to recognize syntax it does not
DJD> support/implement. How far would you take it, complete SQL standard, any
DJD> other common SQL?
DJD> (ALTER TABLE is probably not covered by the standard)
It is covered, even in SQL-92, but I agree covering the full
standard in the parser is quite a task and probably not worth the
effort. Would you recommend that we only recommend the syntax we do
support at any one time? I notice we do throw a few
SQLState.NOT_IMPLEMENTED exceptions in the parser today, mainly
related to national character set. Are there some guidelines which
specify which "not implemented" syntax is currently recognized, but
rejected?
I think incrementally adding parser recognition with "not implemented"
messages might improve usability even if it were not complete (by some
measure).
I would not put it high on my list of priorities, though ;)
Dag
DJD>
DJD> Dan.
DJD>
DJD>
--
Dag H. Wanvik
Sun Microsystems, Web Services, Database Technology Group
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax: +47 73842101
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact
the sender by reply email and destroy all copies of the original
message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Re: [jira] Commented: (DERBY-165) Droppping columns with ALTER TABLE
errors out
Posted by Daniel John Debrunner <dj...@debrunners.com>.
Dag H. Wanvik wrote:
> Hi Shreyas,
>
> Derby does not support dropping columns, cf
> http://incubator.apache.org/derby/docs/ref/rrefsqlj81859.html.
>
> I think it would be desirable if the parser recognized it and gave a suitable
> message, though.
Not sure it's the job of Derby to recognize syntax it does not
support/implement. How far would you take it, complete SQL standard, any
other common SQL?
(ALTER TABLE is probably not covered by the standard)
Dan.
Re: [jira] Commented: (DERBY-165) Droppping columns with ALTER TABLE
errors out
Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
Hi Shreyas,
Derby does not support dropping columns, cf
http://incubator.apache.org/derby/docs/ref/rrefsqlj81859.html.
I think it would be desirable if the parser recognized it and gave a suitable
message, though.
Dag
>>>>> "SK(" == Shreyas Kaushik (JIRA) <de...@db.apache.org> wrote:
SK(>
SK(> [ http://issues.apache.org/jira/browse/DERBY-165?page=comments#action_12315131 ]
SK(> Shreyas Kaushik commented on DERBY-165:
SK(> ---------------------------------------
SK(>
SK(> What should be the expected behaviour for this? Is this documented in the SQL spec. I don't have a copy of that.
SK(>
SK(>
SK(> > Droppping columns with ALTER TABLE errors out
SK(> > ---------------------------------------------
SK(> >
SK(> > Key: DERBY-165
SK(> > URL: http://issues.apache.org/jira/browse/DERBY-165
SK(> > Project: Derby
SK(> > Type: New Feature
SK(> > Components: SQL
SK(> > Environment: Linux
SK(> > Reporter: Shreyas Kaushik
SK(> > Priority: Minor
SK(>
SK(> >
SK(> > When I try to drop columns using ALTER TABLE command I get the following error, irrespective of me using "column" keyword in addition to the drop keyword.
SK(> > ----------------------ERROR REPORT-------------------------------------------
SK(> > ij> alter table test_linux drop column dept;
SK(> > ERROR 42X01: Syntax error: Encountered "drop" at line 1, column 24.
SK(> > ij> alter table test_linux drop dept;
SK(> > ERROR 42X01: Syntax error: Encountered "drop" at line 1, column 24.
SK(> > ----------------------ERROR REPORT-------------------------------------------
SK(>
SK(> --
SK(> This message is automatically generated by JIRA.
SK(> -
SK(> If you think it was sent incorrectly contact one of the administrators:
SK(> http://issues.apache.org/jira/secure/Administrators.jspa
SK(> -
SK(> For more information on JIRA, see:
SK(> http://www.atlassian.com/software/jira
SK(>
--
Dag H. Wanvik
Sun Microsystems, Web Services, Database Technology Group
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax: +47 73842101
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact
the sender by reply email and destroy all copies of the original
message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~