Quantcast

Alpha2: adding identity column with START WITH clause gives error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Alpha2: adding identity column with START WITH clause gives error

Robbert-Jan
Testing WI-T3.0.0.30809 Firebird 3.0 Alpha 2:
 
ALTER TABLE Test
ADD IdentityTest
INTEGER
GENERATED BY DEFAULT AS IDENTITY
START WITH 1
 
error:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 5, column 1
START
 
 
Note:
This works okay: ALTER TABLE Test ADD IdentityTest INTEGER GENERATED BY DEFAULT AS IDENTITY
This works also okay: ALTER TABLE Test ALTER IdentityTest RESTART WITH 1
 
Kind regards,
Robert
- NL
 

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Firebird-test mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-test
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Alpha2: adding identity column with START WITH clause gives error

Robbert-Jan
Hi,
Seems the START WITH clause needs to be between parenthesses, so:
 
   ALTER TABLE Test ADD IdentityTest INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1)
 
works!
 
However, is it possible to make the parser a little bit more intelligent so parentheses are not needed?
 
 
Kind regards,
Robert
 
Sent: Monday, February 03, 2014 1:50 PM
Subject: [Firebird-test] Alpha2: adding identity column with START WITHclause gives error
 
Testing WI-T3.0.0.30809 Firebird 3.0 Alpha 2:
 
ALTER TABLE Test
ADD IdentityTest
INTEGER
GENERATED BY DEFAULT AS IDENTITY
START WITH 1
 
error:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 5, column 1
START
 
 
Note:
This works okay: ALTER TABLE Test ADD IdentityTest INTEGER GENERATED BY DEFAULT AS IDENTITY
This works also okay: ALTER TABLE Test ALTER IdentityTest RESTART WITH 1
 
Kind regards,
Robert
- NL
 


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk


_______________________________________________
Firebird-test mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-test

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Firebird-test mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-test
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Alpha2: adding identity column with START WITH clause gives error

Dmitry Yemanov-3
03.02.2014 19:49, Robbert-Jan wrote:
>
> Seems the START WITH clause needs to be between parenthesses, so:
>     ALTER TABLE Test ADD IdentityTest INTEGER GENERATED BY DEFAULT AS
> IDENTITY (START WITH 1)
> works!
> However, is it possible to make the parser a little bit more intelligent
> so parentheses are not needed?

This is not our personal choice. The SQL specification requires
parentheses and I don't think we should relax the syntax.


Dmitry


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Firebird-test mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-test
Loading...