{"id":96830,"date":"2024-10-20T12:43:18","date_gmt":"2024-10-20T04:43:18","guid":{"rendered":"https:\/\/server.hk\/cnblog\/96830\/"},"modified":"2024-10-20T12:43:19","modified_gmt":"2024-10-20T04:43:19","slug":"postgresql-42725-%e6%a8%a1%e7%b3%8a%e7%9a%84%e5%87%bd%e6%95%b8-%e6%8a%a5%e9%94%99-%e6%95%85%e9%9a%9c%e4%bf%ae%e5%a4%8d-%e8%bf%9c%e7%a8%8b%e5%a4%84%e7%90%86","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/96830\/","title":{"rendered":"PostgreSQL 42725: \u6a21\u7cca\u7684\u51fd\u6578 \u62a5\u9519 \u6545\u969c\u4fee\u590d \u8fdc\u7a0b\u5904\u7406"},"content":{"rendered":"<h1 id=\"postgresql-42725-%e6%a8%a1%e7%b3%8a%e7%9a%84%e5%87%bd%e6%95%b8%e5%a0%b1%e9%8c%af%e6%95%85%e9%9a%9c%e4%bf%ae%e5%be%a9%e9%81%a0%e7%a8%8b%e8%99%95%e7%90%86-wDHKJtUHgc\">PostgreSQL 42725: \u6a21\u7cca\u7684\u51fd\u6578\u5831\u932f\u6545\u969c\u4fee\u5fa9\u9060\u7a0b\u8655\u7406<\/h1>\n<p>\u5728\u4f7f\u7528 PostgreSQL \u6578\u64da\u5eab\u6642\uff0c\u958b\u767c\u8005\u53ef\u80fd\u6703\u9047\u5230\u5404\u7a2e\u932f\u8aa4\uff0c\u5176\u4e2d\u4e4b\u4e00\u4fbf\u662f\u300c42725: \u6a21\u7cca\u7684\u51fd\u6578\u300d\u5831\u932f\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u51fa\u73fe\u5728\u51fd\u6578\u8abf\u7528\u6642\uff0c\u7576 PostgreSQL \u7121\u6cd5\u78ba\u5b9a\u61c9\u8a72\u4f7f\u7528\u54ea\u500b\u51fd\u6578\u7248\u672c\u6642\uff0c\u5c31\u6703\u5f15\u767c\u6b64\u932f\u8aa4\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e\u9019\u500b\u554f\u984c\u7684\u539f\u56e0\u53ca\u5176\u89e3\u6c7a\u65b9\u6848\uff0c\u4e26\u63d0\u4f9b\u4e00\u4e9b\u5be6\u7528\u7684\u9060\u7a0b\u8655\u7406\u5efa\u8b70\u3002<\/p>\n<h2 id=\"%e9%8c%af%e8%aa%a4%e5%8e%9f%e5%9b%a0%e5%88%86%e6%9e%90-wDHKJtUHgc\">\u932f\u8aa4\u539f\u56e0\u5206\u6790<\/h2>\n<p>PostgreSQL \u7684\u300c\u6a21\u7cca\u7684\u51fd\u6578\u300d\u932f\u8aa4\u901a\u5e38\u662f\u7531\u65bc\u4ee5\u4e0b\u5e7e\u500b\u539f\u56e0\u5f15\u8d77\u7684\uff1a<\/p>\n<ul>\n<li><strong>\u51fd\u6578\u91cd\u8f09\uff1a<\/strong>\u7576\u591a\u500b\u51fd\u6578\u5177\u6709\u76f8\u540c\u7684\u540d\u7a31\u4f46\u4e0d\u540c\u7684\u53c3\u6578\u985e\u578b\u6642\uff0cPostgreSQL \u6703\u6839\u64da\u50b3\u905e\u7684\u53c3\u6578\u985e\u578b\u4f86\u9078\u64c7\u5408\u9069\u7684\u51fd\u6578\u3002\u5982\u679c\u50b3\u905e\u7684\u53c3\u6578\u985e\u578b\u4e0d\u660e\u78ba\uff0c\u5247\u6703\u51fa\u73fe\u6a21\u7cca\u7684\u60c5\u6cc1\u3002<\/li>\n<li><strong>\u985e\u578b\u4e0d\u5339\u914d\uff1a<\/strong>\u5982\u679c\u51fd\u6578\u7684\u53c3\u6578\u985e\u578b\u8207\u50b3\u905e\u7684\u5be6\u969b\u53c3\u6578\u985e\u578b\u4e0d\u5339\u914d\uff0cPostgreSQL \u53ef\u80fd\u7121\u6cd5\u78ba\u5b9a\u61c9\u8a72\u8abf\u7528\u54ea\u500b\u7248\u672c\u7684\u51fd\u6578\u3002<\/li>\n<li><strong>\u7f3a\u5c11\u985e\u578b\u8f49\u63db\uff1a<\/strong>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0cPostgreSQL \u53ef\u80fd\u9700\u8981\u9032\u884c\u985e\u578b\u8f49\u63db\uff0c\u4f46\u5982\u679c\u6c92\u6709\u9069\u7576\u7684\u8f49\u63db\u51fd\u6578\uff0c\u5247\u6703\u5c0e\u81f4\u6a21\u7cca\u7684\u51fd\u6578\u932f\u8aa4\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%95%85%e9%9a%9c%e4%bf%ae%e5%be%a9%e6%ad%a5%e9%a9%9f-wDHKJtUHgc\">\u6545\u969c\u4fee\u5fa9\u6b65\u9a5f<\/h2>\n<p>\u8981\u4fee\u5fa9 PostgreSQL \u7684\u300c\u6a21\u7cca\u7684\u51fd\u6578\u300d\u932f\u8aa4\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\uff1a<\/p>\n<h3 id=\"1-%e6%aa%a2%e6%9f%a5%e5%87%bd%e6%95%b8%e5%ae%9a%e7%be%a9-wDHKJtUHgc\">1. \u6aa2\u67e5\u51fd\u6578\u5b9a\u7fa9<\/h3>\n<p>\u9996\u5148\uff0c\u6aa2\u67e5\u51fa\u73fe\u932f\u8aa4\u7684\u51fd\u6578\u5b9a\u7fa9\u3002\u4f7f\u7528\u4ee5\u4e0b SQL \u67e5\u8a62\u4f86\u67e5\u770b\u51fd\u6578\u7684\u8a73\u7d30\u4fe1\u606f\uff1a<\/p>\n<pre><code>SELECT proname, proargtypes FROM pg_proc WHERE proname = 'your_function_name';<\/code><\/pre>\n<h3 id=\"2-%e7%a2%ba%e8%aa%8d%e5%8f%83%e6%95%b8%e9%a1%9e%e5%9e%8b-wDHKJtUHgc\">2. \u78ba\u8a8d\u53c3\u6578\u985e\u578b<\/h3>\n<p>\u78ba\u4fdd\u8abf\u7528\u51fd\u6578\u6642\u50b3\u905e\u7684\u53c3\u6578\u985e\u578b\u8207\u51fd\u6578\u5b9a\u7fa9\u4e2d\u7684\u985e\u578b\u76f8\u7b26\u3002\u5982\u679c\u4e0d\u5339\u914d\uff0c\u5247\u9700\u8981\u9032\u884c\u8abf\u6574\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code>SELECT your_function_name('your_string'::text);<\/code><\/pre>\n<h3 id=\"3-%e4%bd%bf%e7%94%a8%e9%a1%9e%e5%9e%8b%e8%bd%89%e6%8f%9b-wDHKJtUHgc\">3. \u4f7f\u7528\u985e\u578b\u8f49\u63db<\/h3>\n<p>\u5982\u679c\u9700\u8981\uff0c\u53ef\u4ee5\u4f7f\u7528\u985e\u578b\u8f49\u63db\u4f86\u660e\u78ba\u6307\u5b9a\u53c3\u6578\u985e\u578b\u3002\u9019\u6a23\u53ef\u4ee5\u5e6b\u52a9 PostgreSQL \u78ba\u5b9a\u61c9\u8a72\u8abf\u7528\u54ea\u500b\u7248\u672c\u7684\u51fd\u6578\u3002<\/p>\n<h3 id=\"4-%e9%87%8d%e5%91%bd%e5%90%8d%e5%87%bd%e6%95%b8-wDHKJtUHgc\">4. \u91cd\u547d\u540d\u51fd\u6578<\/h3>\n<p>\u5982\u679c\u51fd\u6578\u540d\u7a31\u904e\u65bc\u6a21\u7cca\uff0c\u8003\u616e\u91cd\u547d\u540d\u51fd\u6578\u4ee5\u907f\u514d\u8207\u5176\u4ed6\u51fd\u6578\u767c\u751f\u885d\u7a81\u3002<\/p>\n<h2 id=\"%e9%81%a0%e7%a8%8b%e8%99%95%e7%90%86%e5%bb%ba%e8%ad%b0-wDHKJtUHgc\">\u9060\u7a0b\u8655\u7406\u5efa\u8b70<\/h2>\n<p>\u5728\u9060\u7a0b\u8655\u7406 PostgreSQL \u7684\u300c\u6a21\u7cca\u7684\u51fd\u6578\u300d\u932f\u8aa4\u6642\uff0c\u53ef\u4ee5\u8003\u616e\u4ee5\u4e0b\u5e7e\u9ede\uff1a<\/p>\n<ul>\n<li><strong>\u4f7f\u7528 SSH \u9023\u63a5\uff1a<\/strong>\u78ba\u4fdd\u901a\u904e\u5b89\u5168\u7684 SSH \u9023\u63a5\u5230\u6578\u64da\u5eab\u4f3a\u670d\u5668\uff0c\u4ee5\u4fbf\u9032\u884c\u6545\u969c\u6392\u9664\u548c\u4fee\u5fa9\u3002<\/li>\n<li><strong>\u65e5\u8a8c\u6a94\u6848\u6aa2\u67e5\uff1a<\/strong>\u6aa2\u67e5 PostgreSQL \u7684\u65e5\u8a8c\u6a94\u6848\uff0c\u4ee5\u7372\u53d6\u66f4\u591a\u6709\u95dc\u932f\u8aa4\u7684\u8a73\u7d30\u4fe1\u606f\u3002\u65e5\u8a8c\u6a94\u6848\u901a\u5e38\u4f4d\u65bc PostgreSQL \u7684\u6578\u64da\u76ee\u9304\u4e2d\u3002<\/li>\n<li><strong>\u6e2c\u8a66\u74b0\u5883\uff1a<\/strong>\u5728\u9032\u884c\u4efb\u4f55\u66f4\u6539\u4e4b\u524d\uff0c\u5efa\u8b70\u5728\u6e2c\u8a66\u74b0\u5883\u4e2d\u91cd\u73fe\u554f\u984c\uff0c\u4ee5\u78ba\u4fdd\u4fee\u5fa9\u63aa\u65bd\u7684\u6709\u6548\u6027\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-wDHKJtUHgc\">\u7e3d\u7d50<\/h2>\n<p>PostgreSQL \u7684\u300c\u6a21\u7cca\u7684\u51fd\u6578\u300d\u932f\u8aa4\u53ef\u80fd\u6703\u5c0d\u958b\u767c\u904e\u7a0b\u9020\u6210\u56f0\u64fe\uff0c\u4f46\u901a\u904e\u4ed4\u7d30\u6aa2\u67e5\u51fd\u6578\u5b9a\u7fa9\u3001\u78ba\u8a8d\u53c3\u6578\u985e\u578b\u4ee5\u53ca\u4f7f\u7528\u985e\u578b\u8f49\u63db\u7b49\u65b9\u6cd5\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u5c0d\u65bc\u9700\u8981\u9060\u7a0b\u8655\u7406\u7684\u60c5\u6cc1\uff0c\u4fdd\u6301\u5b89\u5168\u7684\u9023\u63a5\u548c\u6aa2\u67e5\u65e5\u8a8c\u6a94\u6848\u662f\u81f3\u95dc\u91cd\u8981\u7684\u3002<\/p>\n<p>\u5982\u9700\u9032\u4e00\u6b65\u4e86\u89e3\u5982\u4f55\u512a\u5316\u60a8\u7684\u6578\u64da\u5eab\u74b0\u5883\uff0c\u60a8\u53ef\u4ee5\u8003\u616e\u4f7f\u7528\u6211\u5011\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u670d\u52d9\uff0c\u9019\u5c07\u70ba\u60a8\u7684\u61c9\u7528\u63d0\u4f9b\u7a69\u5b9a\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u51b3PostgreSQL 42725\u9519\u8bef\uff1a\u6a21\u7cca\u51fd\u6570\u62a5\u9519\u7684\u6545\u969c\u4fee\u590d\u4e0e\u8fdc\u7a0b\u5904\u7406\u65b9\u6cd5\uff0c\u52a9\u60a8\u5feb\u901f\u6062\u590d\u6570\u636e\u5e93\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-96830","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/96830","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"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=96830"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/96830\/revisions"}],"predecessor-version":[{"id":96831,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/96830\/revisions\/96831"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=96830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=96830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=96830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}