josipa.milic@gmail.com writes:
> When table is generated using pgadmin, sequence generated as serial has the
> same maxvalue as bigserial: 9223372036854775807
Yup.
> It should be max value that corresponds to integer: 2147483647
No, that's intentional. If you never run out of serial numbers,
it's not going to matter. If you do run out, you'll get an error
anyway (from trying to stuff a value > 2147483647 into an integer
column). And the sequence limit will be one less thing you'll
have to change on the way to fixing it.
regards, tom lane