Page 1 of 1

PostgreSQL Sequence not created correctly for serial using Model First

Posted: Fri 17 Feb 2017 23:46
by OutOfTouch6947
Hi,

I might be doing something wrong, if I am please let me know, but it appears that the serial sequence is created as a bigserial sequence when using model first approach.

In the entity designer I checked the Auto Generated Value and made the dotnet type Int32 and the server type int4 for some tables and for some other tables I used dotnet type Int64 and bigint for the server type.

The problem is all the sequences were created with a max value of 9223372036854775807 instead of 2147483647 for the int4.

Re: PostgreSQL Sequence not created correctly for serial using Model First

Posted: Mon 20 Feb 2017 19:14
by OutOfTouch6947
This appears to be a misunderstanding on my part of PostgreSql, even when I create table in PostgreSql with a column as serial, the sequence created has the same value for max as bigserial according to the postgresql documentation: https://www.postgresql.org/docs/9.1/sta ... meric.html

Re: PostgreSQL Sequence not created correctly for serial using Model First

Posted: Tue 21 Feb 2017 17:56
by Shalex
Thank you for letting us know.