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/03/07 11:27:53 UTC

[jira] Created: (DERBY-165) Droppping columns with ALTER TABLE errors out

Droppping columns with ALTER TABLE errors out
---------------------------------------------

         Key: DERBY-165
         URL: http://issues.apache.org/jira/browse/DERBY-165
     Project: Derby
        Type: Bug
  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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Re: [jira] Created: (DERBY-165) Droppping columns with ALTER TABLE errors out

Posted by Mike Matrigali <mi...@sbcglobal.net>.
did you check the documentation? I don't think drop column is a 
supported feaure in derby.  If not, then this should be logged as a 
feature request, not a bug.

Shreyas Kaushik (JIRA) wrote:
> Droppping columns with ALTER TABLE errors out
> ---------------------------------------------
> 
>          Key: DERBY-165
>          URL: http://issues.apache.org/jira/browse/DERBY-165
>      Project: Derby
>         Type: Bug
>   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-------------------------------------------
> 
> 
> 


Re: [jira] Updated: (DERBY-165) Droppping columns with ALTER TABLE errors out

Posted by Jeremy Boynes <jb...@apache.org>.
Danesh Irani wrote:
> Is "alter table drop column" part of the standard? 
>

It is an optional feature in SQL-1999 and on.

--
Jeremy

Re: [jira] Updated: (DERBY-165) Droppping columns with ALTER TABLE errors out

Posted by Edward Rayl <er...@bellsouth.net>.
Danesh Irani wrote:

>Is "alter table drop column" part of the standard? 
>
>I know db2 dosent allow you to drop columns...DB2 Basic CLI 'Alter table'
>http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.udb.doc/admin/r0000888.htm
>
>DB2 'Alter table drop column' equals 'drops and re-creates the table'
>http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.udb.doc/core/c0011640.htm
>  
>
Oracle has been able to do this for a while. When telling customers they 
could do this (for the first time), I got cheers.  The rules for drop 
column are complex however. See:

http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_3001.htm#sthref3626



Re: [jira] Updated: (DERBY-165) Droppping columns with ALTER TABLE errors out

Posted by Danesh Irani <da...@gmail.com>.
Is "alter table drop column" part of the standard? 

I know db2 dosent allow you to drop columns...DB2 Basic CLI 'Alter table'
http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.udb.doc/admin/r0000888.htm

DB2 'Alter table drop column' equals 'drops and re-creates the table'
http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.udb.doc/core/c0011640.htm

Cheers,
~Danesh

On Wed, 9 Mar 2005 06:51:53 +0100 (CET), Satheesh Bandaram (JIRA)
<de...@db.apache.org> wrote:
>      [ http://issues.apache.org/jira/browse/DERBY-165?page=history ]
> 
> Satheesh Bandaram updated DERBY-165:
> ------------------------------------
> 
>     type: New Feature  (was: Bug)
> 
> I believe this is a new feature request. Derby reference manual doesn't describe drop column.
> http://incubator.apache.org/derby/manuals/reference/sqlj26.html#HDRSII-SQLJ-81859
> 
> > 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
> -
> If you want more information on JIRA, or have a bug to report 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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

[jira] Closed: (DERBY-165) Droppping columns with ALTER TABLE errors out

Posted by "Kristian Waagan (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-165?page=all ]

Kristian Waagan closed DERBY-165.
---------------------------------


Closing this duplicate issue. For general information about ALTER TABLE consult DERBY-396. For details about ALTER TABLE DROP COLUMN, see DERBY-1489.

> Droppping columns with ALTER TABLE errors out
> ---------------------------------------------
>
>                 Key: DERBY-165
>                 URL: http://issues.apache.org/jira/browse/DERBY-165
>             Project: Derby
>          Issue 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

        

[jira] Updated: (DERBY-165) Droppping columns with ALTER TABLE errors out

Posted by "Satheesh Bandaram (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-165?page=history ]

Satheesh Bandaram updated DERBY-165:
------------------------------------

    type: New Feature  (was: Bug)

I believe this is a new feature request. Derby reference manual doesn't describe drop column.
http://incubator.apache.org/derby/manuals/reference/sqlj26.html#HDRSII-SQLJ-81859

> 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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-165) Droppping columns with ALTER TABLE errors out

Posted by "Petr Jiricka (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-165?page=comments#action_62028 ]
     
Petr Jiricka commented on DERBY-165:
------------------------------------

I also miss the ability to drop columns in Derby.

> 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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-165) Droppping columns with ALTER TABLE errors out

Posted by "Satheesh Bandaram (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-165?page=all ]
     
Satheesh Bandaram resolved DERBY-165:
-------------------------------------

    Resolution: Duplicate

This is a duplicate of DERBY-396.

> 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


[jira] Commented: (DERBY-165) Droppping columns with ALTER TABLE errors out

Posted by "Shreyas Kaushik (JIRA)" <de...@db.apache.org>.
    [ 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