Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Values less than -2147483648 can not be spicified in the INCREMENT BY clause a column defined as GENERATED AS IDENTITY [CORE6365] #6605

Open
firebird-automations opened this issue Jul 13, 2020 · 1 comment

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

recreate table test0( id bigint generated by default as identity (start with 9223372036854775807 increment by -2147483647) );

recreate table test0( id bigint generated by default as identity (start with 9223372036854775807 increment by -2147483648) );

recreate table test0( id bigint generated by default as identity (start with 9223372036854775807 increment by -2147483649) );

Second and third statements fail with:

Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 113
-2147483648 (-21474836489)

Checked on 4.0.0.2104

@firebird-automations
Copy link
Collaborator Author

Commented by: @mrotteveel

This sounds like an edge case that is unlikely to ever be relevant in real usage. Or to phrase differently, limiting the increment to an INT (or even a SMALLINT) should be sufficient for normal usage. There is no reason to extend it to a BIGINT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant