{"id":4771,"date":"2020-02-12T16:04:08","date_gmt":"2020-02-12T08:04:08","guid":{"rendered":"https:\/\/www.xttblog.com\/?p=4771"},"modified":"2020-02-12T16:04:08","modified_gmt":"2020-02-12T08:04:08","slug":"%e9%87%8d%e6%96%b0%e8%ae%be%e7%bd%ae-postgresql-%e5%ba%8f%e5%88%97%e8%b5%b7%e5%a7%8b%e5%80%bc","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=4771","title":{"rendered":"\u91cd\u65b0\u8bbe\u7f6e PostGresql \u5e8f\u5217\u8d77\u59cb\u503c"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u4fee\u6539\u8bbe\u7f6e Postgresql \u5e8f\u5217\u503c\u7684\u573a\u666f\u5e76\u4e0d\u591a\u89c1\uff0c\u4e00\u822c\u5728\u4e0d\u89c4\u8303\u4f7f\u7528\u6570\u636e\u5e93\u7684\u60c5\u51b5\u4e0b\u5b58\u5728\uff01<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6709\u65f6\u5019\uff0c\u6570\u636e\u5e93\u7684\u5e8f\u5217\u9519\u4e71\u540e\uff0c\u4f1a\u53d1\u751f Detail: Key (xttblog_id)=(200007) already exists. \u7684\u9519\u8bef\u63d0\u793a\u3002\u8fd9\u79cd\u60c5\u51b5\u662f\u8bf4\uff0c200007 \u8fd9\u4e2a\u5e8f\u5217\u5df2\u7ecf\u88ab\u5360\u7528\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4fee\u6539\u8fd9\u4e2a\u9519\u8bef\u7684\u529e\u6cd5\u6709\u4e24\u79cd\uff0c\u4e00\u79cd\u662f\u6267\u884c nextval \u51fd\u6570\uff0c\u8df3\u8fc7\u5df2\u5b58\u5728\u7684 key\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT nextval('xttblog_id_seq');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd8\u6709\u4e00\u79cd\u60c5\u51b5\u662f\uff0c\u91cd\u65b0\u8bbe\u7f6e\u5e8f\u5217\u7684\u8d77\u59cb\u503c\uff0c\u8df3\u8fc7\u5df2\u7ecf\u5b58\u5728\u7684 key\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-- \u5e8f\u5217\u91cd\u7f6e\u52302020\nalter sequence xttblog_id_seq restart with 2020<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u9762\u6211\u91cd\u7f6e\u5e8f\u5217\u5230 2020\u3002\u90a3\u5e8f\u5217\u5c31\u4f1a\u4ece 2020 \u5f00\u59cb\uff0c\u4e4b\u524d\u5c0f\u4e8e 2020 \u7684\u5c06\u4f1a\u88ab\u8df3\u8fc7\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=4771\">\u91cd\u65b0\u8bbe\u7f6e PostGresql \u5e8f\u5217\u8d77\u59cb\u503c<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u4fee\u6539\u8bbe\u7f6e Postgresql \u5e8f\u5217\u503c\u7684\u573a\u666f\u5e76\u4e0d\u591a\u89c1\uff0c\u4e00\u822c\u5728\u4e0d\u89c4\u8303\u4f7f\u7528\u6570\u636e\u5e93\u7684\u60c5\u51b5\u4e0b\u5b58\u5728\uff01 \u6709\u65f6\u5019\uff0c\u6570\u636e\u5e93\u7684\u5e8f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[289,429,1683,1620,1619],"class_list":["post-4771","post","type-post","status-publish","format-standard","hentry","category-sql","tag-key_buffer_size","tag-postgresql","tag-next-key-locks","tag-1620","tag-1619"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4771","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4771"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4771\/revisions"}],"predecessor-version":[{"id":4772,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4771\/revisions\/4772"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}