{"id":21469,"date":"2024-01-02T09:54:23","date_gmt":"2024-01-02T09:54:23","guid":{"rendered":"https:\/\/server.hk\/blog\/21469\/"},"modified":"2024-11-14T10:33:46","modified_gmt":"2024-11-14T02:33:46","slug":"how-to-fix-postgresql-error-code-hv005-fdw_column_name_not_found","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/21469\/","title":{"rendered":"\u5982\u4f55\u4fee\u5fa9 PostgreSQL \u932f\u8aa4\u4ee3\u78bc\uff1aHV005 &#8211; fdw_column_name_not_found"},"content":{"rendered":"<h1>\u5982\u4f55\u4fee\u5fa9 PostgreSQL \u932f\u8aa4\u4ee3\u78bc\uff1aHV005 &#8211; fdw_column_name_not_found<\/h1>\n<p>\u7c21\u4ecb\uff1aPostgreSQL \u662f\u4e00\u500b\u529f\u80fd\u5f37\u5927\u7684\u958b\u6e90\u95dc\u806f\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u5ee3\u6cdb\u61c9\u7528\u65bc\u4f01\u696d\u548c\u958b\u767c\u8005\u3002\u7136\u800c\uff0c\u50cf\u6240\u6709\u8edf\u4ef6\u4e00\u6a23\uff0c\u5b83\u53ef\u80fd\u6703\u9047\u5230\u932f\u8aa4\uff0c\u5f9e\u800c\u59a8\u7919\u5176\u9806\u5229\u904b\u884c\u3002\u5176\u4e2d\u4e00\u500b\u932f\u8aa4\u662f HV005 \u932f\u8aa4\u4ee3\u78bc\uff0c\u5177\u9ad4\u4f86\u8aaa\u662f fdw_column_name_not_found \u932f\u8aa4\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u5011\u5c07\u63a2\u8a0e\u6b64\u932f\u8aa4\u7684\u539f\u56e0\u4e26\u63d0\u4f9b\u9010\u6b65\u89e3\u6c7a\u65b9\u6848\u3002<\/p>\n<h2>\u7406\u89e3 HV005 &#8211; fdw_column_name_not_found \u932f\u8aa4<\/h2>\n<p>HV005 \u932f\u8aa4\u4ee3\u78bc\u5728\u67e5\u8a62\u57f7\u884c\u671f\u9593\u767c\u751f\uff0c\u7576\u5916\u90e8\u6578\u64da\u5305\u88dd\u5668 (FDW) \u7684\u5217\u540d\u672a\u627e\u5230\u6642\u3002\u6b64\u932f\u8aa4\u901a\u5e38\u5728\u4f7f\u7528 PostgreSQL \u5916\u90e8\u6578\u64da\u5305\u88dd\u5668\u64f4\u5c55\u6642\u51fa\u73fe\uff0c\u8a72\u64f4\u5c55\u5141\u8a31 PostgreSQL \u8a2a\u554f\u5b58\u5132\u5728\u5916\u90e8\u6578\u64da\u5eab\u4e2d\u7684\u6578\u64da\u3002<\/p>\n<h2>HV005 \u932f\u8aa4\u7684\u539f\u56e0<\/h2>\n<ol>\n<li><strong>\u5217\u6620\u5c04\u4e0d\u6b63\u78ba\uff1a<\/strong>fdw_column_name_not_found \u932f\u8aa4\u7684\u6700\u5e38\u898b\u539f\u56e0\u662f\u5916\u90e8\u8868\u8207\u672c\u5730\u8868\u4e4b\u9593\u7684\u5217\u6620\u5c04\u4e0d\u6b63\u78ba\u3002\u7576\u5217\u540d\u6216\u6578\u64da\u985e\u578b\u4e0d\u5339\u914d\u6642\uff0c\u53ef\u80fd\u6703\u767c\u751f\u6b64\u60c5\u6cc1\u3002<\/li>\n<li><strong>\u7f3a\u5c11\u5916\u90e8\u8868\uff1a<\/strong>\u6b64\u932f\u8aa4\u7684\u53e6\u4e00\u500b\u539f\u56e0\u662f\u67e5\u8a62\u4e2d\u5f15\u7528\u7684\u5916\u90e8\u8868\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u91cd\u547d\u540d\u6216\u522a\u9664\u3002<\/li>\n<li><strong>\u6b0a\u9650\u4e0d\u8db3\uff1a<\/strong>\u5982\u679c\u57f7\u884c\u67e5\u8a62\u7684\u7528\u6236\u6c92\u6709\u5fc5\u8981\u7684\u6b0a\u9650\u4f86\u8a2a\u554f\u5916\u90e8\u8868\uff0c\u5247\u53ef\u80fd\u6703\u767c\u751f HV005 \u932f\u8aa4\u3002<\/li>\n<\/ol>\n<h2>\u4fee\u5fa9 HV005 \u932f\u8aa4\u7684\u89e3\u6c7a\u65b9\u6848<\/h2>\n<ol>\n<li><strong>\u9a57\u8b49\u5217\u6620\u5c04\uff1a<\/strong>\u6aa2\u67e5\u5916\u90e8\u8868\u8207\u672c\u5730\u8868\u4e4b\u9593\u7684\u5217\u6620\u5c04\u3002\u78ba\u4fdd\u5217\u540d\u548c\u6578\u64da\u985e\u578b\u5b8c\u5168\u5339\u914d\u3002\u4f7f\u7528 &#8220;pg_catalog.pg_foreign_table&#8221; \u7cfb\u7d71\u76ee\u9304\u8996\u5716\u4f86\u6aa2\u67e5\u5217\u6620\u5c04\u3002<\/li>\n<li><strong>\u6aa2\u67e5\u5916\u90e8\u8868\u662f\u5426\u5b58\u5728\uff1a<\/strong>\u78ba\u8a8d\u67e5\u8a62\u4e2d\u5f15\u7528\u7684\u5916\u90e8\u8868\u5b58\u5728\u4e14\u53ef\u8a2a\u554f\u3002\u4f7f\u7528 psql \u63a7\u5236\u53f0\u4e2d\u7684 &#8220;d&#8221; \u547d\u4ee4\u6216\u67e5\u8a62 &#8220;pg_catalog.pg_foreign_table&#8221; \u7cfb\u7d71\u76ee\u9304\u8996\u5716\u4f86\u9a57\u8b49\u5176\u5b58\u5728\u3002<\/li>\n<li><strong>\u6388\u4e88\u8db3\u5920\u7684\u6b0a\u9650\uff1a<\/strong>\u78ba\u4fdd\u57f7\u884c\u67e5\u8a62\u7684\u7528\u6236\u64c1\u6709\u8a2a\u554f\u5916\u90e8\u8868\u7684\u5fc5\u8981\u6b0a\u9650\u3002\u4f7f\u7528 &#8220;GRANT&#8221; \u547d\u4ee4\u6388\u4e88\u6240\u9700\u7684\u6b0a\u9650\uff0c\u6307\u5b9a\u5fc5\u8981\u7684\u8a31\u53ef\u6b0a\uff0c\u5982 SELECT\u3001INSERT\u3001UPDATE \u6216 DELETE\u3002<\/li>\n<li><strong>\u66f4\u65b0\u5916\u90e8\u6578\u64da\u5305\u88dd\u5668\u64f4\u5c55\uff1a<\/strong>\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f\u904e\u6642\u7248\u672c\u7684\u5916\u90e8\u6578\u64da\u5305\u88dd\u5668\u64f4\u5c55\uff0c\u8003\u616e\u5c07\u5176\u66f4\u65b0\u81f3\u6700\u65b0\u7248\u672c\u3002\u66f4\u65b0\u7248\u672c\u901a\u5e38\u5305\u542b\u932f\u8aa4\u4fee\u5fa9\u548c\u6539\u9032\uff0c\u53ef\u80fd\u89e3\u6c7a HV005 \u932f\u8aa4\u3002<\/li>\n<li><strong>\u6aa2\u67e5\u932f\u8aa4\u65e5\u8a8c\uff1a<\/strong>\u6aa2\u67e5 PostgreSQL \u932f\u8aa4\u65e5\u8a8c\u4ee5\u7372\u53d6\u4efb\u4f55\u9644\u52a0\u4fe1\u606f\u6216\u76f8\u95dc\u932f\u8aa4\uff0c\u9019\u4e9b\u4fe1\u606f\u53ef\u80fd\u6709\u52a9\u65bc\u91d0\u6e05 HV005 \u932f\u8aa4\u7684\u539f\u56e0\u3002\u65e5\u8a8c\u901a\u5e38\u4f4d\u65bc PostgreSQL \u6578\u64da\u76ee\u9304\u4e2d\uff0c\u901a\u5e38\u4f4d\u65bc &#8220;pg_log&#8221; \u5b50\u76ee\u9304\u3002<\/li>\n<\/ol>\n<h2>\u7e3d\u7d50<\/h2>\n<p>PostgreSQL \u4e2d\u7684 HV005 &#8211; fdw_column_name_not_found \u932f\u8aa4\u53ef\u4ee5\u901a\u904e\u4ed4\u7d30\u6aa2\u67e5\u5217\u6620\u5c04\u3001\u78ba\u4fdd\u5916\u90e8\u8868\u7684\u5b58\u5728\u3001\u6388\u4e88\u8db3\u5920\u7684\u6b0a\u9650\u3001\u66f4\u65b0\u5916\u90e8\u6578\u64da\u5305\u88dd\u5668\u64f4\u5c55\u4ee5\u53ca\u6aa2\u67e5\u932f\u8aa4\u65e5\u8a8c\u4ee5\u7372\u53d6\u9644\u52a0\u898b\u89e3\u4f86\u89e3\u6c7a\u3002\u5982\u679c\u60a8\u9047\u5230\u6b64\u932f\u8aa4\uff0c\u9075\u5faa\u9019\u4e9b\u6b65\u9a5f\u5c0d\u65bc\u78ba\u4fdd PostgreSQL \u6578\u64da\u5eab\u7684\u9806\u5229\u904b\u884c\u81f3\u95dc\u91cd\u8981\u3002<\/p>\n<p>\u5982\u9700\u53ef\u9760\u4e14\u9ad8\u6027\u80fd\u7684 VPS \u8a17\u7ba1\u89e3\u6c7a\u65b9\u6848\uff0c\u8003\u616e <a href=\"https:\/\/server.hk\">Server.HK<\/a>\u3002\u6211\u5011\u7684\u9999\u6e2f VPS \u8a17\u7ba1\u670d\u52d9\u63d0\u4f9b\u5353\u8d8a\u7684\u6027\u80fd\u548c\u53ef\u9760\u6027\uff0c\u78ba\u4fdd\u60a8\u7684\u61c9\u7528\u7a0b\u5e8f\u9806\u5229\u904b\u884c\u3002\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4ee5\u7372\u53d6\u6709\u95dc\u6211\u5011\u7684\u8a17\u7ba1\u8a08\u5283\u548c\u529f\u80fd\u7684\u66f4\u591a\u4fe1\u606f\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-21469","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21469","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=21469"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21469\/revisions"}],"predecessor-version":[{"id":24004,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21469\/revisions\/24004"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=21469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=21469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=21469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}