【postgresql】ERROR: integer out of range

查询文章都类似,只是类型没有对应上,根据实际情况处理。

前情

  • 使用postgresql数据库
  • 数据库ID类型int4
  • 实体类代码private Long id;

异常

### Cause: org.postgresql.util.PSQLException: ERROR: integer out of range
; ERROR: integer out of range; nested exception is org.postgresql.util.PSQLException: ERROR: integer out of range

结果

数据库类型int4与代码里面的Long类型不一致,需要数据库类型int8才能够和实体类Long对应上
在这里插入图片描述

【postgresql】ERROR: integer out of range_第1张图片

你可能感兴趣的:(通用表单,postgresql,数据库)