Is there a MAX_INT constant in Postgres?

There’s no constant for this, but I think it’s more reasonable to hard-code the number in Postgres than it is in Java.

In Java, the philosophical goal is for Integer to be an abstract value, so it makes sense that you’d want to behave as if you don’t know what the max value is.

In Postgres, you’re much closer to the bare metal and the definition of the integer type is that it is a 4-byte signed integer.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)