*6013* Prevent value out of range error with PostgreSQL