0
No es un bug

Too big MAXVALUE for sequence (postgresql 9.3)

Grzegorz Kaczor hace 8 años actualizado por anonymous hace 8 años 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?

BIEN, ESTOY SATISFECHO.

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

Puntuación de satisfacción por Grzegorz Kaczor hace 8 años

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

No es 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.