{"id":21304,"date":"2024-01-02T07:09:22","date_gmt":"2024-01-02T07:09:22","guid":{"rendered":"https:\/\/server.hk\/blog\/21304\/"},"modified":"2024-11-14T10:37:10","modified_gmt":"2024-11-14T02:37:10","slug":"how-to-fix-postgresql-error-code-2200g-most_specific_type_mismatch","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/21304\/","title":{"rendered":"\u5982\u4f55\u4fee\u5fa9 PostgreSQL \u932f\u8aa4\u4ee3\u78bc\uff1a2200G &#8211; most_specific_type_mismatch"},"content":{"rendered":"<h1>\u5982\u4f55\u4fee\u5fa9 PostgreSQL \u932f\u8aa4\u4ee3\u78bc\uff1a2200G &#8211; most_specific_type_mismatch<\/h1>\n<p>PostgreSQL \u662f\u4e00\u500b\u529f\u80fd\u5f37\u5927\u7684\u958b\u6e90\u95dc\u806f\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u5ee3\u6cdb\u88ab\u4f01\u696d\u548c\u958b\u767c\u8005\u4f7f\u7528\u3002\u7136\u800c\uff0c\u50cf\u6240\u6709\u8edf\u4ef6\u4e00\u6a23\uff0c\u5b83\u53ef\u80fd\u6703\u9047\u5230\u4e00\u4e9b\u932f\u8aa4\uff0c\u9019\u4e9b\u932f\u8aa4\u53ef\u80fd\u6703\u59a8\u7919\u5176\u9806\u5229\u904b\u884c\u3002\u5176\u4e2d\u4e00\u500b\u932f\u8aa4\u662f PostgreSQL \u932f\u8aa4\u4ee3\u78bc\uff1a2200G &#8211; most_specific_type_mismatch\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u5011\u5c07\u63a2\u8a0e\u6b64\u932f\u8aa4\u7684\u539f\u56e0\uff0c\u4e26\u63d0\u4f9b\u9010\u6b65\u7684\u89e3\u6c7a\u65b9\u6848\u4f86\u4fee\u5fa9\u5b83\u3002<\/p>\n<h2>\u7406\u89e3 PostgreSQL \u932f\u8aa4\u4ee3\u78bc\uff1a2200G &#8211; most_specific_type_mismatch<\/h2>\n<p>PostgreSQL \u932f\u8aa4\u4ee3\u78bc\uff1a2200G &#8211; most_specific_type_mismatch \u767c\u751f\u5728\u9810\u671f\u7684\u6578\u64da\u985e\u578b\u8207\u67e5\u8a62\u4e2d\u5be6\u969b\u4f7f\u7528\u7684\u6578\u64da\u985e\u578b\u4e0d\u5339\u914d\u6642\u3002\u7576\u9032\u884c\u6d89\u53ca\u4e0d\u540c\u6578\u64da\u985e\u578b\u7684\u64cd\u4f5c\u6642\uff0c\u4f8b\u5982\u6bd4\u8f03\u6216\u806f\u63a5\u4e0d\u517c\u5bb9\u7684\u6578\u64da\u985e\u578b\u7684\u6b04\u4f4d\uff0c\u901a\u5e38\u6703\u51fa\u73fe\u6b64\u932f\u8aa4\u3002<\/p>\n<h2>PostgreSQL \u932f\u8aa4\u4ee3\u78bc\uff1a2200G &#8211; most_specific_type_mismatch \u7684\u539f\u56e0<\/h2>\n<ol>\n<li><strong>\u4e0d\u6b63\u78ba\u7684\u6578\u64da\u985e\u578b\u4f7f\u7528\uff1a<\/strong>\u6b64\u932f\u8aa4\u7684\u4e00\u500b\u5e38\u898b\u539f\u56e0\u662f\u5728\u67e5\u8a62\u4e2d\u4f7f\u7528\u4e86\u932f\u8aa4\u7684\u6578\u64da\u985e\u578b\u3002\u4f8b\u5982\uff0c\u5c07\u5b57\u4e32\u6b04\u4f4d\u8207\u6574\u6578\u6b04\u4f4d\u9032\u884c\u6bd4\u8f03\u53ef\u80fd\u6703\u89f8\u767c\u6b64\u932f\u8aa4\u3002<\/li>\n<li><strong>\u96b1\u5f0f\u985e\u578b\u8f49\u63db\uff1a<\/strong>PostgreSQL \u6703\u57f7\u884c\u96b1\u5f0f\u985e\u578b\u8f49\u63db\u4ee5\u8655\u7406\u67d0\u4e9b\u64cd\u4f5c\u3002\u7136\u800c\uff0c\u5982\u679c\u6d89\u53ca\u7684\u6578\u64da\u985e\u578b\u7121\u6cd5\u88ab\u96b1\u5f0f\u8f49\u63db\uff0c\u5247\u53ef\u80fd\u6703\u767c\u751f\u6b64\u932f\u8aa4\u3002<\/li>\n<li><strong>\u6578\u64da\u985e\u578b\u8b8a\u66f4\uff1a<\/strong>\u5982\u679c\u5728\u64b0\u5beb\u67e5\u8a62\u5f8c\u66f4\u6539\u4e86\u6b04\u4f4d\u7684\u6578\u64da\u985e\u578b\uff0c\u5247\u53ef\u80fd\u6703\u5c0e\u81f4\u985e\u578b\u4e0d\u5339\u914d\u932f\u8aa4\u3002<\/li>\n<\/ol>\n<h2>\u89e3\u6c7a PostgreSQL \u932f\u8aa4\u4ee3\u78bc\uff1a2200G &#8211; most_specific_type_mismatch \u7684\u65b9\u6848<\/h2>\n<ol>\n<li><strong>\u6aa2\u67e5\u67e5\u8a62\u8a9e\u6cd5\uff1a<\/strong>\u4ed4\u7d30\u6aa2\u67e5\u5c0e\u81f4\u932f\u8aa4\u7684\u67e5\u8a62\uff0c\u4e26\u6aa2\u67e5\u6578\u64da\u985e\u578b\u662f\u5426\u5b58\u5728\u4e0d\u4e00\u81f4\u4e4b\u8655\u3002\u78ba\u4fdd\u5728\u6bd4\u8f03\u3001\u806f\u63a5\u6216\u5176\u4ed6\u64cd\u4f5c\u4e2d\u4f7f\u7528\u7684\u6578\u64da\u985e\u578b\u662f\u517c\u5bb9\u7684\u3002<\/li>\n<li><strong>\u986f\u5f0f\u985e\u578b\u8f49\u63db\uff1a<\/strong>\u5982\u679c\u96b1\u5f0f\u985e\u578b\u8f49\u63db\u5c0e\u81f4\u932f\u8aa4\uff0c\u8003\u616e\u4f7f\u7528\u986f\u5f0f\u985e\u578b\u8f49\u63db\u4f86\u78ba\u4fdd\u4f7f\u7528\u6b63\u78ba\u7684\u6578\u64da\u985e\u578b\u3002PostgreSQL \u63d0\u4f9b\u4e86\u50cf `CAST` \u6216 `::` \u7684\u51fd\u6578\u4f86\u986f\u5f0f\u8f49\u63db\u6578\u64da\u985e\u578b\u3002<\/li>\n<li><strong>\u4fee\u6539\u6578\u64da\u985e\u578b\uff1a<\/strong>\u5982\u679c\u932f\u8aa4\u662f\u7531\u65bc\u6578\u64da\u985e\u578b\u7684\u8b8a\u66f4\u5f15\u8d77\u7684\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u4fee\u6539\u53d7\u5f71\u97ff\u7684\u6b04\u4f4d\u6216\u8868\u3002\u78ba\u4fdd\u67e5\u8a62\u53ca\u4efb\u4f55\u76f8\u95dc\u64cd\u4f5c\u4e2d\u7684\u6578\u64da\u985e\u578b\u4fdd\u6301\u4e00\u81f4\u3002<\/li>\n<li><strong>\u4f7f\u7528\u9069\u7576\u7684\u51fd\u6578\uff1a<\/strong>PostgreSQL \u63d0\u4f9b\u4e86\u5404\u7a2e\u51fd\u6578\u4f86\u8655\u7406\u7279\u5b9a\u7684\u6578\u64da\u985e\u578b\u3002\u6839\u64da\u9700\u8981\u5229\u7528\u9019\u4e9b\u51fd\u6578\u4f86\u8f49\u63db\u6216\u64cd\u4f5c\u6578\u64da\u985e\u578b\u3002<\/li>\n<li><strong>\u6aa2\u67e5\u6578\u64da\u5b8c\u6574\u6027\uff1a<\/strong>\u901a\u904e\u6aa2\u67e5\u6d89\u53ca\u932f\u8aa4\u7684\u6b04\u4f4d\u4e2d\u5b58\u5132\u7684\u503c\u4f86\u9a57\u8b49\u6578\u64da\u7684\u5b8c\u6574\u6027\u3002\u78ba\u4fdd\u6578\u64da\u6e96\u78ba\u4e14\u8207\u9810\u671f\u7684\u6578\u64da\u985e\u578b\u4e00\u81f4\u3002<\/li>\n<\/ol>\n<h2>\u7e3d\u7d50<\/h2>\n<p>PostgreSQL \u932f\u8aa4\u4ee3\u78bc\uff1a2200G &#8211; most_specific_type_mismatch \u53ef\u4ee5\u901a\u904e\u4ed4\u7d30\u6aa2\u67e5\u67e5\u8a62\u8a9e\u6cd5\u3001\u4f7f\u7528\u986f\u5f0f\u985e\u578b\u8f49\u63db\u3001\u4fee\u6539\u6578\u64da\u985e\u578b\u3001\u5229\u7528\u9069\u7576\u7684\u51fd\u6578\u4ee5\u53ca\u6aa2\u67e5\u6578\u64da\u5b8c\u6574\u6027\u4f86\u89e3\u6c7a\u3002\u9075\u5faa\u9019\u4e9b\u6b65\u9a5f\uff0c\u60a8\u53ef\u4ee5\u514b\u670d\u6b64\u932f\u8aa4\uff0c\u78ba\u4fdd PostgreSQL \u6578\u64da\u5eab\u7684\u9806\u5229\u904b\u884c\u3002<\/p>\n<p>\u5982\u679c\u60a8\u9700\u8981\u53ef\u9760\u4e14\u9ad8\u6027\u80fd\u7684 VPS \u8a17\u7ba1\u89e3\u6c7a\u65b9\u6848\uff0c\u8acb\u8003\u616e Server.HK\u3002\u6211\u5011\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u8a17\u7ba1\u670d\u52d9\u70ba\u904b\u884c PostgreSQL \u548c\u5176\u4ed6\u61c9\u7528\u7a0b\u5e8f\u63d0\u4f9b\u7406\u60f3\u7684\u74b0\u5883\u3002\u7acb\u5373\u806f\u7d61\u6211\u5011\u4ee5\u4e86\u89e3\u66f4\u591a\u6709\u95dc\u6211\u5011\u7684\u8a17\u7ba1\u89e3\u6c7a\u65b9\u6848\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4fee\u5fa9 PostgreSQL &#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-21304","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=21304"}],"version-history":[{"count":2,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21304\/revisions"}],"predecessor-version":[{"id":24212,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21304\/revisions\/24212"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=21304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=21304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=21304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}