2012 年二月 一 二 三 四 五 六 日 « 一 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 近期评论
- wlx [微博 ] 发表在《google彻底被封?》
- snake 发表在《google彻底被封?》
- Andrew Pelt 发表在《debian testing上安装oracle 10g》
- tiplip 发表在《webmap.cn使用的WEBGIS技术》
- 求助Evolution问题!! 发表在《evolution crashed in gutsy alpha》
分类目录
标签
anjuta apache backup breezy c++ compile convert dapper debian dns edgy evolution feisty firefox flash gnome gobang GRASS gutsy humor intrepid Linux mailman MapServer mysql openoffice Oracle php phpbb postfix PostGIS postgresql qgis sarge scim skype subversion svn tomcat ubuntu utf8 westdc Windows wordpress 中文
Tag Archives: serial
postgresql serial 不自动增长的问题
在手工导入原始数据后,其中的id项为serial类,由原始数据赋值,会遇到不自动增长的问题。 解决方案参考:http://bbs2.chinaunix.net/thread-1353824-1-1.html serial key其实是由sequence实现的,当你手动给serial列赋值的时候,sequence是不会自增量变化的,当你插入customer 6的时候看看customer_id sequence是多少? 最好不要给serial手工赋值 SELECT setval(‘序列名称’, max(id)) FROM 表; select setval(‘offlineapp_id_seq’,max(id)) from offlineapp;