0
Pas un bug

Too big MAXVALUE for sequence (postgresql 9.3)

Grzegorz Kaczor il y a 9 ans mis à jour par anonymous il y a 9 ans 2

Code generated for sequence is:


-- Sequence: ACCOUNT_NUMBER_GROUP_SEQCREATE SEQUENCE ACCOUNT_NUMBER_GROUP_SEQ
      INCREMENT BY 1
      MINVALUE 1
      MAXVALUE 9999999999999999999999999999
      START WITH 10000 
      
      NO CYCLE
      
;

When I try to run it in PostgreSQL 9.3.5, I get an error:


ERROR: value "9999999999999999999999999999" is out of range for type bigint

Shouldn't MAXVALUE be lower? Or perhaps MAXVALUE should be omitted in this case as the default is 2^63-1?

JE SUIS SATISFAIT

OK, I exported model to XML and changed sequence definitions. Thanks.

Note de satisfaction par Grzegorz Kaczor il y a 9 ans

This might be related to reverse engineering somehow, because the model was initially exported from Oracle to Vertabelo XML and imported back as PostgreSQL.

Pas un bug

Well, this is something that Oracle returns when reading information about sequences (this is how reverse-engineering works). Please see the screenshot:


We currently don't support migration between DBMS-es like in your case.

I think it's pretty easy to fix it. It should be sufficient to use sed or any find&replace tool to change this 999... to any value supported by PostgreSQL.