{"id":41941,"date":"2021-10-18T07:49:17","date_gmt":"2021-10-17T23:49:17","guid":{"rendered":"http:\/\/www.idc.net\/help\/41941\/"},"modified":"2021-10-18T07:49:17","modified_gmt":"2021-10-17T23:49:17","slug":"postgresql-2f005-function_executed_no_return_statement-%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:\/\/idc.net\/help\/41941\/","title":{"rendered":"PostgreSQL 2F005: function_executed_no_return_statement \u62a5\u9519 \u6545\u969c\u4fee\u590d \u8fdc\u7a0b\u5904\u7406"},"content":{"rendered":"<h3>\u6587\u6863\u89e3\u91ca<\/h3>\n<p><span>2F005:<\/span> function_executed_no_return_statement<\/p>\n<\/p>\n<p>PostgreSQL \u9519\u8bef 2F005\uff1afunction_executed_no_return_statement<\/p>\n<p>PostgreSQL\u9519\u8bef2F005\u662f\u7531\u4e8e\u4e00\u4e2a\u6267\u884c\u7684\u51fd\u6570\u6ca1\u6709\u8fd4\u56de\u503c\u800c\u5f15\u53d1\u7684\u9519\u8bef\u3002\u53ef\u4ee5\u5728 PostgreSQL \u7cfb\u7edf\u4e2d\u7684\u6ca1\u6709\u8fd4\u56de\u503c\u7684\u76f8\u5173\u51fd\u6570\u4e0a\u770b\u52302F005\u9519\u8bef\u3002<\/p>\n<p>\u8fd9\u4e2a\u9519\u8bef\u8868\u793a\u5f53\u521b\u5efa\u4e00\u4e2a\u51fd\u6570\uff0c\u800c\u51fd\u6570\u6ca1\u6709\u4efb\u4f55RETURN\u5728\u89c6\u56fe\u65f6\uff0cPostgreSQL\u5c06\u53d1\u51fa2F005\u9519\u8bef\u3002<\/p>\n<p>\u5e38\u89c1\u6848\u4f8b<\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u6f14\u793a\u5982\u4f55\u5f15\u53d12F005 PostgreSQL \u9519\u8bef\u7684\u793a\u4f8b\uff1a<\/p>\n<p>BEGIN<\/p>\n<p> CREATE OR REPLACE FUNCTION fun_name()<\/p>\n<p> RETURNS table (<\/p>\n<p> col1 text<\/p>\n<p> )<\/p>\n<p> AS $$<\/p>\n<p> BEGIN<\/p>\n<p> END;<\/p>\n<p>END;<\/p>\n<p>\u6b64\u793a\u4f8b\u4e2d\u6ca1\u6709RETURN\u8bed\u53e5\uff0c\u8be5\u51fd\u6570\u5c06\u5bfc\u81f42F005 PostgreSQL\u9519\u8bef\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5<\/p>\n<p>\u8981\u89e3\u51b32F005 PostgreSQL\u9519\u8bef\uff0c\u53ef\u4ee5\u6dfb\u52a0\u4e00\u4e2aretutn\u8bed\u53e5\u6765\u6307\u5b9a\u4e00\u4e2a\u8fd4\u56de\u503c\uff0c\u4f8b\u5982\uff1a<\/p>\n<p>BEGIN<\/p>\n<p> CREATE OR REPLACE FUNCTION fun_name()<\/p>\n<p> RETURNS table (<\/p>\n<p> col1 text<\/p>\n<p> )<\/p>\n<p> AS $$<\/p>\n<p> BEGIN<\/p>\n<p> RETURN;<\/p>\n<p> END;<\/p>\n<p>END;<\/p>\n<p>\u6b64\u5916\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528raise notice\u8bed\u53e5\u6765\u5e2e\u52a9\u5f00\u53d1\u4eba\u5458\u8fdb\u884c\u8c03\u8bd5\uff0c\u8fd9\u662f\u4e00\u4e2a\u66f4\u53cb\u597d\u7684\u65b9\u5f0f\uff0c\u63d0\u793a\u51fd\u6570\u662f\u5426\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u8bf7\u786e\u4fdd\u4f60\u6ca1\u6709\u5728\u51fd\u6570\u5b9a\u4e49\u65f6\uff0c\u5fd8\u8bb0\u6307\u5b9a\u8fd4\u56de\u7c7b\u578b\u3002\u8fd9\u6837\uff0c\u51fd\u6570\u5c31\u4e0d\u4f1a\u8fd4\u56de\u4efb\u4f55\u5185\u5bb9\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f42F005 PostgreSQL\u9519\u8bef\u3002<\/p>\n<p>\u56e0\u6b64\uff0c PostgreSQL 2F005 \u9519\u8bef\u662f\u7531\u4e8e\u7f3a\u5c11\u8fd4\u56de\u503c\u800c\u5bfc\u81f4\u7684\u9519\u8bef\uff0c\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0RETURN\u8bed\u53e5\u6216\u4f7f\u7528raise notice\u8bed\u53e5\u6765\u89e3\u51b3\u8fd9\u4e2a\u9519\u8bef\u3002<\/p>\n<p>\u9999\u6e2f\u7f8e\u56fd\u4e91\u670d\u52a1\u5668\u9996\u9009\u540e\u6d6a\u4e91\uff0c2H2G\u9996\u670810\u5143\u5f00\u901a\u3002<br \/>\u540e\u6d6a\u4e91\uff08www.IDC.Net\uff09\u63d0\u4f9b\u7b80\u5355\u597d\u7528\uff0c\u4ef7\u683c\u539a\u9053\u7684\u9999\u6e2f\/\u7f8e\u56fd\u4e91\u670d\u52a1\u5668\u548c\u72ec\u7acb\u670d\u52a1\u5668\u3002IDC+ISP+ICP\u8d44\u8d28\u3002ARIN\u548cAPNIC\u4f1a\u5458\u3002\u6210\u719f\u6280\u672f\u56e2\u961f15\u5e74\u884c\u4e1a\u7ecf\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u6863\u89e3\u91ca 2F005: function_executed_no_return_statement Postg [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7038],"tags":[],"class_list":["post-41941","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/41941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=41941"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/41941\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=41941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=41941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=41941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}