当前位置:Gxlcms > 数据库问题 > Postgresql 报整形字段“integer out of range”

Postgresql 报整形字段“integer out of range”

时间:2021-07-01 10:21:17 帮助过:16人阅读

2.2 整体分析

integer类型的范围是( -2147483648 to +2147483647),于是查看了下一个序列值是‘2147483648’,正好超过了integer的范围

postgres=#=> select nextval(‘cert_display_tmp2_id_seq‘);
  nextval  
------------
 2147483648
(1 row)

3、故障解决

更改id的字段类型为bigint型,再次执行函数,无报错,故障解决。

alter table cert_display_tmp alter column id bigint


附录

技术分享

本文出自 “陌路,尽头” 博客,请务必保留此出处http://molu2013.blog.51cto.com/2615175/1829524

Postgresql 报整形字段“integer out of range”

标签:数据库   postgresql   int   

人气教程排行