{"kind": "fdw", "major": "18", "item": {"slug": "postgres_fdw", "name": "postgres_fdw", "name_zh": "Remote PostgreSQL", "category": "\u8fdc\u7a0b PostgreSQL", "summary": "\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002", "aliases": [], "content_hash": "185dd52b14fb2c21f2483bbdfaa5cc5acf555cfa42aa5b9772daaa70bbed56ee", "versions": {"10": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "postgres_fdw_handler"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "27"}, {"label": "\u6570\u636e\u6e90", "value": "\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u626b\u63cf\u6570\u636e\u884c", "callback": "IterateForeignScan", "implementation": "postgresIterateForeignScan"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "INSERT", "callback": "ExecForeignInsert", "implementation": "postgresExecForeignInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "UPDATE", "callback": "ExecForeignUpdate", "implementation": "postgresExecForeignUpdate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "DELETE", "callback": "ExecForeignDelete", "implementation": "postgresExecForeignDelete"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "TRUNCATE", "callback": "ExecForeignTruncate", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u8fde\u63a5\u8def\u5f84\u4e0b\u63a8", "callback": "GetForeignJoinPaths", "implementation": "postgresGetForeignJoinPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u4e0a\u5c42\u8def\u5f84\uff0c\u5305\u62ec\u805a\u5408", "callback": "GetForeignUpperPaths", "implementation": "postgresGetForeignUpperPaths"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u6279\u91cf\u63d2\u5165", "callback": "ExecForeignBatchInsert", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u5f02\u6b65\u8ffd\u52a0\u6267\u884c", "callback": "ForeignAsyncRequest", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5bfc\u5165\u6a21\u5f0f", "callback": "ImportForeignSchema", "implementation": "postgresImportForeignSchema"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "schema_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002"}, {"name": "table_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "column_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "use_remote_estimate", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 postgres_fdw \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b EXPLAIN \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "fdw_startup_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "fdw_tuple_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a 0.01 \u3002"}, {"name": "extensions", "definition": "\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 PostgreSQL \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002 \u4f7f\u7528 extensions \u9009\u9879\u65f6\uff0c \u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002"}, {"name": "fetch_size", "definition": "\u8be5\u9009\u9879\u6307\u5b9a postgres_fdw \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "updatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 INSERT \u3001 UPDATE \u548c DELETE \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c information_schema \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 postgres_fdw \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002"}, {"name": "import_collate", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 COLLATE \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002 \u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a true \uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 COLLATE \"default\" \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002"}, {"name": "import_default", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 DEFAULT \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b nextval() \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_not_null", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 NOT NULL \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}], "related": [{"url": "/wiki/catalog/pg_foreign_data_wrapper/?v=10", "label": "Foreign-data wrapper \u7cfb\u7edf\u76ee\u5f55"}, {"url": "/e/postgres_fdw/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/plan/foreign-scan/?v=10", "label": "Foreign Scan \u8ba1\u5212\u8282\u70b9"}], "release": {"ref": "PostgreSQL 10.23 source archive", "label": "10.23", "major": "10", "channel": "historical", "revision": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9", "source_url": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/10/postgres-fdw.html", "path": "postgres-fdw.html", "label": "PostgreSQL 10 English manual", "sha256": "a747d947f5992c7c8ae026de25f63149e52eb32368f05a615934b3712b078b4f", "language": "en", "original_url": "/docs/10/postgres-fdw.html"}, {"url": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "line": 424, "path": "contrib/postgres_fdw/postgres_fdw.c", "label": "contrib/postgres_fdw/postgres_fdw.c:424", "sha256": "d332f8d20b63f75ef6dc84770db42ff25d75ad70b0f7d10fa9cffdaa3fc3fa7e", "archive_sha256": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406", "paragraphs": ["\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c postgres_fdw \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002", "\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a SERIALIZABLE \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \uff1b\u5426\u5219\u4f7f\u7528 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 SERIALIZABLE \u6216 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e READ COMMITTED \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 PostgreSQL \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002", "\u8bf7\u6ce8\u610f\uff0c postgres_fdw \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002"]}, {"title": "\u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316", "paragraphs": ["postgres_fdw \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 WHERE \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 WHERE \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 extensions \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f IMMUTABLE \u3002\u5bf9\u4e8e UPDATE \u6216 DELETE \u67e5\u8be2\uff0c postgres_fdw \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 WHERE \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 BEFORE \u6216 AFTER \u89e6\u53d1\u5668\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 CHECK OPTION \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 UPDATE \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001 IMMUTABLE \u64cd\u4f5c\u7b26\u6216 IMMUTABLE \u51fd\u6570\u3002", "\u5f53 postgres_fdw \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 JOIN \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 WHERE \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002", "\u53ef\u4ee5\u4f7f\u7528 EXPLAIN VERBOSE \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002"]}, {"title": "\u8de8\u7248\u672c\u517c\u5bb9\u6027", "paragraphs": ["postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002"]}, {"code": "{\n\tFdwRoutine *routine = makeNode(FdwRoutine);\n\n\t/* Functions for scanning foreign tables */\n\troutine->GetForeignRelSize = postgresGetForeignRelSize;\n\troutine->GetForeignPaths = postgresGetForeignPaths;\n\troutine->GetForeignPlan = postgresGetForeignPlan;\n\troutine->BeginForeignScan = postgresBeginForeignScan;\n\troutine->IterateForeignScan = postgresIterateForeignScan;\n\troutine->ReScanForeignScan = postgresReScanForeignScan;\n\troutine->EndForeignScan = postgresEndForeignScan;\n\n\t/* Functions for updating foreign tables */\n\troutine->AddForeignUpdateTargets = postgresAddForeignUpdateTargets;\n\troutine->PlanForeignModify = postgresPlanForeignModify;\n\troutine->BeginForeignModify = postgresBeginForeignModify;\n\troutine->ExecForeignInsert = postgresExecForeignInsert;\n\troutine->ExecForeignUpdate = postgresExecForeignUpdate;\n\troutine->ExecForeignDelete = postgresExecForeignDelete;\n\troutine->EndForeignModify = postgresEndForeignModify;\n\troutine->IsForeignRelUpdatable = postgresIsForeignRelUpdatable;\n\troutine->PlanDirectModify = postgresPlanDirectModify;\n\troutine->BeginDirectModify = postgresBeginDirectModify;\n\troutine->IterateDirectModify = postgresIterateDirectModify;\n\troutine->EndDirectModify = postgresEndDirectModify;\n\n\t/* Function for EvalPlanQual rechecks */\n\troutine->RecheckForeignScan = postgresRecheckForeignScan;\n\t/* Support functions for EXPLAIN */\n\troutine->ExplainForeignScan = postgresExplainForeignScan;\n\troutine->ExplainForeignModify = postgresExplainForeignModify;\n\troutine->ExplainDirectModify = postgresExplainDirectModify;\n\n\t/* Support functions for ANALYZE */\n\troutine->AnalyzeForeignTable = postgresAnalyzeForeignTable;\n\n\t/* Support functions for IMPORT FOREIGN SCHEMA */\n\troutine->ImportForeignSchema = postgresImportForeignSchema;\n\n\t/* Support functions for join push-down */\n\troutine->GetForeignJoinPaths = postgresGetForeignJoinPaths;\n\n\t/* Support functions for upper relation push-down */\n\troutine->GetForeignUpperPaths = postgresGetForeignUpperPaths;\n\n\tPG_RETURN_POINTER(routine);\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExplainDirectModify": "postgresExplainDirectModify", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets"}, "description": ["\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002"], "manual_html": "<div class=\"sect1\" id=\"POSTGRES-FDW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">F.34.\u00a0postgres_fdw</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u6a21\u5757\u63d0\u4f9b\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668 <code class=\"literal\">postgres_fdw</code>\uff0c\u53ef\u7528\u4e8e\u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u672c\u6a21\u5757\u63d0\u4f9b\u7684\u529f\u80fd\u4e0e\u8f83\u65e7\u7684<a class=\"xref\" href=\"/docs/10/dblink.html\" title=\"F.11.\u00a0dblink\">dblink</a>\u6a21\u5757\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u91cd\u53e0\u3002\u4f46 <code class=\"filename\">postgres_fdw</code> \u4e3a\u8bbf\u95ee\u8fdc\u7a0b\u8868\u63d0\u4f9b\u4e86\u66f4\u900f\u660e\u4e14\u7b26\u5408\u6807\u51c6\u7684\u8bed\u6cd5\uff0c\u5e76\u4e14\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u6027\u80fd\u66f4\u597d\u3002</p>\n<p lang=\"zh\">\u8981\u51c6\u5907\u901a\u8fc7 <code class=\"filename\">postgres_fdw</code> \u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee\uff1a</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5b89\u88c5 <code class=\"filename\">postgres_fdw</code> \u6269\u5c55\uff0c\u53ef\u4f7f\u7528<a class=\"xref\" href=\"/docs/10/sql-createextension.html\" title=\"CREATE EXTENSION\"><span class=\"refentrytitle\">CREATE EXTENSION</span></a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u4f7f\u7528<a class=\"xref\" href=\"/docs/10/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u5bf9\u8c61\uff0c\u7528\u6765\u8868\u793a\u6bcf\u4e2a\u8981\u8fde\u63a5\u7684\u8fdc\u7a0b\u6570\u636e\u5e93\u3002\u5c06\u9664 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u4e4b\u5916\u7684\u8fde\u63a5\u4fe1\u606f\u6307\u5b9a\u4e3a\u670d\u52a1\u5668\u5bf9\u8c61\u7684\u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u9700\u8981\u83b7\u51c6\u8bbf\u95ee\u5404\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u7528\u6237\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/10/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u521b\u5efa\u7528\u6237\u6620\u5c04\u3002\u5c06\u8981\u4f7f\u7528\u7684\u8fdc\u7a0b\u7528\u6237\u540d\u548c\u5bc6\u7801\u6307\u5b9a\u4e3a\u7528\u6237\u6620\u5c04\u7684 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u8981\u8bbf\u95ee\u7684\u8fdc\u7a0b\u8868\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/10/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u6216<a class=\"xref\" href=\"/docs/10/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5916\u90e8\u8868\u7684\u5217\u5fc5\u987b\u4e0e\u88ab\u5f15\u7528\u7684\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u5728\u5916\u90e8\u8868\u5bf9\u8c61\u7684\u9009\u9879\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8fdc\u7a0b\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0e\u8fdc\u7a0b\u8868\u4e0d\u540c\u7684\u8868\u540d\u548c/\u6216\u5217\u540d\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\">\u73b0\u5728\uff0c\u53ea\u9700\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">SELECT</code>\uff0c\u5373\u53ef\u8bbf\u95ee\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u4e2d\u5b58\u50a8\u7684\u6570\u636e\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u4fee\u6539\u8fdc\u7a0b\u8868\u3002\uff08\u5f53\u7136\uff0c\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\u7684\u8fdc\u7a0b\u7528\u6237\u5fc5\u987b\u62e5\u6709\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u6743\u9650\u3002\uff09</p>\n<p lang=\"zh\">postgres_fdw \u76ee\u524d\u4e0d\u652f\u6301\u5e26 ON CONFLICT DO UPDATE \u5b50\u53e5\u7684 INSERT\u3002\u4e0d\u8fc7\uff0c\u652f\u6301 ON CONFLICT DO NOTHING\uff0c\u524d\u63d0\u662f\u4e0d\u6307\u5b9a\u552f\u4e00\u7d22\u5f15\u63a8\u65ad\u6761\u4ef6\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5c06\u5916\u90e8\u8868\u7684\u5217\u58f0\u660e\u4e3a\u4e0e\u88ab\u5f15\u7528\u8fdc\u7a0b\u8868\u7684\u5bf9\u5e94\u5217\u5177\u6709\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u5728\u9002\u7528\u65f6\u5177\u6709\u76f8\u540c\u7684\u6392\u5e8f\u89c4\u5219\u3002\u5c3d\u7ba1 <code class=\"filename\">postgres_fdw</code> \u76ee\u524d\u5728\u6309\u9700\u6267\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u9762\u76f8\u5f53\u5bbd\u5bb9\uff0c\u4f46\u5f53\u7c7b\u578b\u6216\u6392\u5e8f\u89c4\u5219\u4e0d\u5339\u914d\u65f6\uff0c\u4ecd\u53ef\u80fd\u51fa\u73b0\u4ee4\u4eba\u610f\u5916\u7684\u8bed\u4e49\u5f02\u5e38\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5bf9\u67e5\u8be2\u6761\u4ef6\u7684\u89e3\u91ca\u53ef\u80fd\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5916\u90e8\u8868\u7684\u58f0\u660e\u53ef\u4ee5\u6bd4\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u5c11\u4e00\u4e9b\u5217\uff0c\u6216\u8005\u4f7f\u7528\u4e0d\u540c\u7684\u5217\u987a\u5e8f\u3002\u4e0e\u8fdc\u7a0b\u8868\u5217\u7684\u5339\u914d\u662f\u6309\u540d\u79f0\u800c\u4e0d\u662f\u6309\u4f4d\u7f6e\u8fdb\u884c\u7684\u3002</p>\n<div class=\"sect2\" id=\"id-1.11.7.43.10\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/10/postgres-fdw.html#id-1.11.7.43.10\">F.34.1. postgres_fdw \u7684 FDW \u9009\u9879</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.43.10.2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.34.1.1.\u00a0\u8fde\u63a5\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"filename\">postgres_fdw</code>\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e0e<span class=\"application\">libpq</span>\u8fde\u63a5\u5b57\u7b26\u4e32\u6240\u63a5\u53d7\u7684\u76f8\u540c\u9009\u9879\uff0c\u8be6\u89c1<a class=\"xref\" href=\"/docs/10/libpq.html#LIBPQ-PARAMKEYWORDS\" title=\"33.1.2.\u00a0\u53c2\u6570\u5173\u952e\u8bcd\">\u7b2c\u00a033.1.2\u00a0\u8282</a>\uff0c\u4f46\u4ee5\u4e0b\u9009\u9879\u4e0d\u88ab\u5141\u8bb8\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code>\uff08\u5e94\u6539\u4e3a\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">client_encoding</code>\uff08\u4f1a\u6839\u636e\u672c\u5730\u670d\u52a1\u5668\u7f16\u7801\u81ea\u52a8\u8bbe\u7f6e\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">fallback_application_name</code>\uff08\u59cb\u7ec8\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres_fdw</code>\uff09</p>\n</li>\n</ul>\n</div>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u4e0d\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\uff0c\u56e0\u6b64\u5e94\u59cb\u7ec8\u4e3a\u5c5e\u4e8e\u975e\u8d85\u7ea7\u7528\u6237\u7684\u7528\u6237\u6620\u5c04\u6307\u5b9a <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.43.10.3\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.34.1.2.\u00a0\u5bf9\u8c61\u540d\u79f0\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u9009\u9879\u53ef\u7528\u4e8e\u63a7\u5236\u53d1\u9001\u5230\u8fdc\u7a0b <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u7684 SQL \u8bed\u53e5\u4e2d\u6240\u4f7f\u7528\u7684\u540d\u79f0\u3002\u5f53\u521b\u5efa\u5916\u90e8\u8868\u65f6\u6240\u7528\u7684\u540d\u79f0\u4e0e\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u7684\u540d\u79f0\u4e0d\u540c\u65f6\uff0c\u5c31\u9700\u8981\u8fd9\u4e9b\u9009\u9879\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">schema_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">table_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">column_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.43.10.4\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.34.1.3.\u00a0\u4ee3\u4ef7\u4f30\u7b97\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u901a\u8fc7\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u67e5\u8be2\u6765\u83b7\u53d6\u8fdc\u7a0b\u6570\u636e\uff0c\u56e0\u6b64\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u626b\u63cf\u5916\u90e8\u8868\u7684\u4f30\u8ba1\u4ee3\u4ef7\u5e94\u5f53\u7b49\u4e8e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b8c\u6210\u8be5\u64cd\u4f5c\u7684\u4ee3\u4ef7\uff0c\u518d\u52a0\u4e0a\u4e00\u4e9b\u901a\u4fe1\u5f00\u9500\u3002\u83b7\u5f97\u8fd9\u79cd\u4f30\u7b97\u6700\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u662f\u5411\u8fdc\u7a0b\u670d\u52a1\u5668\u8be2\u95ee\uff0c\u518d\u628a\u5f00\u9500\u52a0\u4e0a\u53bb\uff1b\u4f46\u5bf9\u4e8e\u7b80\u5355\u67e5\u8be2\uff0c\u4e3a\u4e86\u53d6\u5f97\u4ee3\u4ef7\u4f30\u7b97\u800c\u989d\u5916\u53d1\u9001\u4e00\u6b21\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ef\u80fd\u5e76\u4e0d\u5212\u7b97\u3002\u56e0\u6b64 <code class=\"filename\">postgres_fdw</code> \u63d0\u4f9b\u4ee5\u4e0b\u9009\u9879\u6765\u63a7\u5236\u4ee3\u4ef7\u4f30\u7b97\u7684\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">use_remote_estimate</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b <code class=\"command\">EXPLAIN</code> \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_startup_cost</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_tuple_cost</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">0.01</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u771f\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4ece\u8fdc\u7a0b\u670d\u52a1\u5668\u83b7\u53d6\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u5047\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u5728\u672c\u5730\u6267\u884c\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u518d\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u9664\u975e\u6709\u8fdc\u7a0b\u8868\u7edf\u8ba1\u4fe1\u606f\u7684\u672c\u5730\u526f\u672c\u53ef\u7528\uff0c\u5426\u5219\u8fd9\u79cd\u672c\u5730\u4f30\u7b97\u4e0d\u592a\u53ef\u80fd\u975e\u5e38\u51c6\u786e\u3002\u66f4\u65b0\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c\u662f\u5728\u5916\u90e8\u8868\u4e0a\u8fd0\u884c<a class=\"xref\" href=\"/docs/10/sql-analyze.html\" title=\"ANALYZE\"><span class=\"refentrytitle\">ANALYZE</span></a>\uff1b\u8fd9\u6837\u4f1a\u626b\u63cf\u8fdc\u7a0b\u8868\uff0c\u7136\u540e\u50cf\u5bf9\u5f85\u672c\u5730\u8868\u4e00\u6837\u8ba1\u7b97\u5e76\u5b58\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u4fdd\u7559\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u8fdc\u7a0b\u8868\u6bcf\u6b21\u67e5\u8be2\u7684\u89c4\u5212\u5f00\u9500\uff1b\u4f46\u5982\u679c\u8fdc\u7a0b\u8868\u7ecf\u5e38\u66f4\u65b0\uff0c\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u5f88\u5feb\u5c31\u4f1a\u8fc7\u65f6\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.43.10.5\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.34.1.4.\u00a0\u8fdc\u7a0b\u6267\u884c\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709\u4f7f\u7528\u5185\u7f6e\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u624d\u4f1a\u88ab\u8003\u8651\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u3002\u6d89\u53ca\u975e\u5185\u7f6e\u51fd\u6570\u7684\u5b50\u53e5\u4f1a\u5728\u53d6\u56de\u884c\u4e4b\u540e\u5728\u672c\u5730\u68c0\u67e5\u3002\u5982\u679c\u8fd9\u4e9b\u51fd\u6570\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e5f\u53ef\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fe1\u5176\u7ed3\u679c\u4e0e\u672c\u5730\u76f8\u540c\uff0c\u5219\u5c06\u8fd9\u7c7b <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u7aef\u6267\u884c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u6b64\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">extensions</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 <span class=\"productname\">PostgreSQL</span> \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"literal\">extensions</code> \u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fetch_size</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.43.10.6\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.34.1.5.\u00a0\u53ef\u66f4\u65b0\u6027\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u66f4\u65b0\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">updatable</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u548c <code class=\"command\">DELETE</code> \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c<code class=\"literal\">information_schema</code> \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.43.10.7\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.34.1.6.\u00a0\u5bfc\u5165\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/10/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u5bfc\u5165\u5916\u90e8\u8868\u5b9a\u4e49\u3002\u8be5\u547d\u4ee4\u4f1a\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4ee5\u5339\u914d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868\u6216\u89c6\u56fe\u3002\u5982\u679c\u8981\u5bfc\u5165\u7684\u8fdc\u7a0b\u8868\u5217\u4f7f\u7528\u7528\u6237\u5b9a\u4e49\u6570\u636e\u7c7b\u578b\uff0c\u5219\u672c\u5730\u670d\u52a1\u5668\u5fc5\u987b\u5b58\u5728\u540c\u540d\u4e14\u517c\u5bb9\u7684\u7c7b\u578b\u3002</p>\n<p lang=\"zh\">\u53ef\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\uff08\u5728 <code class=\"command\">IMPORT FOREIGN SCHEMA</code> \u547d\u4ee4\u4e2d\u7ed9\u51fa\uff09\u81ea\u5b9a\u4e49\u5bfc\u5165\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">import_collate</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">COLLATE</code> \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a <code class=\"literal\">true</code>\uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 <code class=\"literal\">COLLATE \"default\"</code> \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_default</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">DEFAULT</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b<code class=\"function\">nextval()</code> \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_not_null</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">NOT NULL</code> \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u9664 <code class=\"literal\">NOT NULL</code> \u4e4b\u5916\u7684\u7ea6\u675f\u6c38\u8fdc\u4e0d\u4f1a\u4ece\u8fdc\u7a0b\u8868\u5bfc\u5165\u3002\u867d\u7136 <span class=\"productname\">PostgreSQL</span> \u786e\u5b9e\u652f\u6301\u5728\u5916\u90e8\u8868\u4e0a\u5b9a\u4e49 <code class=\"literal\">CHECK</code> \u7ea6\u675f\uff0c\u4f46\u7531\u4e8e\u7ea6\u675f\u8868\u8fbe\u5f0f\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u6c42\u503c\u4e0d\u540c\uff0c\u7cfb\u7edf\u4e0d\u4f1a\u81ea\u52a8\u5bfc\u5165\u5b83\u4eec\u3002\u6b64\u7c7b\u884c\u4e3a\u4e0d\u4e00\u81f4\u7684<code class=\"literal\">CHECK</code> \u7ea6\u675f\uff0c\u53ef\u80fd\u5bfc\u81f4\u67e5\u8be2\u4f18\u5316\u4e2d\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5e0c\u671b\u5bfc\u5165<code class=\"literal\">CHECK</code> \u7ea6\u675f\uff0c\u5fc5\u987b\u624b\u5de5\u5b8c\u6210\uff0c\u5e76\u5e94\u4ed4\u7ec6\u6838\u5b9e\u6bcf\u4e00\u4e2a\u7ea6\u675f\u7684\u8bed\u4e49\u3002\u6709\u5173\u5916\u90e8\u8868\u4e0a<code class=\"literal\">CHECK</code> \u7ea6\u675f\u5904\u7406\u65b9\u5f0f\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/10/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u3002</p>\n<p lang=\"zh\">\u4f5c\u4e3a\u5176\u4ed6\u8868\u5206\u533a\u7684\u8868\u6216\u5916\u90e8\u8868\u4f1a\u88ab\u81ea\u52a8\u6392\u9664\u3002\u5206\u533a\u8868\u4f1a\u88ab\u5bfc\u5165\uff0c\u9664\u975e\u5b83\u672c\u8eab\u4e5f\u662f\u5176\u4ed6\u8868\u7684\u5206\u533a\u3002\u7531\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u901a\u8fc7\u4f5c\u4e3a\u5206\u533a\u5c42\u6b21\u6839\u7684\u5206\u533a\u8868\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ea\u5bfc\u5165\u5206\u533a\u8868\u5373\u53ef\u8bbf\u95ee\u5168\u90e8\u6570\u636e\uff0c\u800c\u65e0\u9700\u521b\u5efa\u989d\u5916\u5bf9\u8c61\u3002</p>\n</div>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.43.11\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/10/postgres-fdw.html#id-1.11.7.43.11\">F.34.2. \u8fde\u63a5\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u5728\u9996\u6b21\u6267\u884c\u4f7f\u7528\u4e0e\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u5173\u8054\u7684\u5916\u90e8\u8868\u7684\u67e5\u8be2\u65f6\uff0c\u4f1a\u5efa\u7acb\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002\u8be5\u8fde\u63a5\u4f1a\u5728\u540c\u4e00\u4f1a\u8bdd\u4e2d\u4fdd\u7559\u5e76\u4f9b\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u3002\u5982\u679c\u4f7f\u7528\u591a\u4e2a\u7528\u6237\u6807\u8bc6\uff08\u7528\u6237\u6620\u5c04\uff09\u8bbf\u95ee\u8be5\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u4f1a\u4e3a\u6bcf\u4e2a\u7528\u6237\u6620\u5c04\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.43.12\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/10/postgres-fdw.html#id-1.11.7.43.12\">F.34.3. \u4e8b\u52a1\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c<code class=\"filename\">postgres_fdw</code> \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002</p>\n<p lang=\"zh\">\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a <code class=\"literal\">SERIALIZABLE</code> \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code>\uff1b\u5426\u5219\u4f7f\u7528 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code> \u6216 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e <code class=\"literal\">READ COMMITTED</code> \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 <span class=\"productname\">PostgreSQL</span> \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c<code class=\"filename\">postgres_fdw</code> \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.43.13\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/10/postgres-fdw.html#id-1.11.7.43.13\">F.34.4. \u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 <code class=\"literal\">extensions</code> \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f <code class=\"literal\">IMMUTABLE</code>\u3002\u5bf9\u4e8e <code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u67e5\u8be2\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 <code class=\"literal\">BEFORE</code> \u6216 <code class=\"literal\">AFTER</code> \u89e6\u53d1\u5668\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 <code class=\"literal\">CHECK OPTION</code> \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 <code class=\"command\">UPDATE</code> \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001<code class=\"literal\">IMMUTABLE</code> \u64cd\u4f5c\u7b26\u6216 <code class=\"literal\">IMMUTABLE</code> \u51fd\u6570\u3002</p>\n<p lang=\"zh\">\u5f53 <code class=\"filename\">postgres_fdw</code> \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 <code class=\"literal\">JOIN</code> \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">EXPLAIN VERBOSE</code> \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.43.14\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/10/postgres-fdw.html#id-1.11.7.43.14\">F.34.5. \u8fdc\u7a0b\u67e5\u8be2\u6267\u884c\u73af\u5883</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728 <code class=\"filename\">postgres_fdw</code> \u6253\u5f00\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u4e2d\uff0c<a class=\"xref\" href=\"/docs/10/runtime-config-client.html#GUC-SEARCH-PATH\">search_path</a>\u53c2\u6570\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u5305\u542b <code class=\"literal\">pg_catalog</code>\uff0c\u8fd9\u6837\u65e0\u9700\u6a21\u5f0f\u9650\u5b9a\u5c31\u53ea\u80fd\u770b\u5230\u5185\u7f6e\u5bf9\u8c61\u3002\u8fd9\u5bf9 <code class=\"filename\">postgres_fdw</code> \u81ea\u8eab\u751f\u6210\u7684\u67e5\u8be2\u4e0d\u662f\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u603b\u662f\u63d0\u4f9b\u8fd9\u79cd\u9650\u5b9a\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bf9\u90a3\u4e9b\u901a\u8fc7\u8fdc\u7a0b\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u6216\u89c4\u5219\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u51fd\u6570\u5e26\u6765\u98ce\u9669\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u89c6\u56fe\uff0c\u5219\u8be5\u89c6\u56fe\u4e2d\u4f7f\u7528\u7684\u4efb\u4f55\u51fd\u6570\u90fd\u4f1a\u5728\u53d7\u9650\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u6267\u884c\u3002\u5efa\u8bae\u5728\u8fd9\u7c7b\u51fd\u6570\u4e2d\u5bf9\u6240\u6709\u540d\u79f0\u90fd\u5199\u6210\u5e26\u6a21\u5f0f\u9650\u5b9a\u7684\u5f62\u5f0f\uff0c\u6216\u8005\u4e3a\u8fd9\u7c7b\u51fd\u6570\u9644\u52a0 <code class=\"literal\">SET search_path</code> \u9009\u9879\uff08\u89c1<a class=\"xref\" href=\"/docs/10/sql-createfunction.html\" title=\"CREATE FUNCTION\"><span class=\"refentrytitle\">CREATE FUNCTION</span></a>\uff09\uff0c\u4ee5\u5efa\u7acb\u5176\u9884\u671f\u7684\u641c\u7d22\u8def\u5f84\u73af\u5883\u3002</p>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u8fd8\u4f1a\u4e3a\u8fdc\u7a0b\u4f1a\u8bdd\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/10/runtime-config-client.html#GUC-TIMEZONE\">TimeZone</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">UTC</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/10/runtime-config-client.html#GUC-DATESTYLE\">DateStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">ISO</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/10/runtime-config-client.html#GUC-INTERVALSTYLE\">IntervalStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\u5bf9\u4e8e 9.0 \u53ca\u66f4\u65b0\u7248\u672c\u7684\u8fdc\u7aef\u670d\u52a1\u5668\uff0cextra_float_digits \u8bbe\u4e3a 3\uff1b\u66f4\u65e9\u7248\u672c\u5219\u8bbe\u4e3a 2\u3002</li>\n</ul>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u8bbe\u7f6e\u901a\u5e38\u4e0d\u50cf <code class=\"varname\">search_path</code> \u90a3\u6837\u5bb9\u6613\u51fa\u95ee\u9898\uff0c\u4f46\u5982\u679c\u6709\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684 <code class=\"literal\">SET</code> \u9009\u9879\u5904\u7406\u3002</p>\n<p lang=\"zh\"><span class=\"emphasis\"><em>\u4e0d</em></span>\u5efa\u8bae\u901a\u8fc7\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u7684\u4f1a\u8bdd\u7ea7\u8bbe\u7f6e\u6765\u8986\u76d6\u8fd9\u79cd\u884c\u4e3a\uff1b\u8fd9\u5f88\u53ef\u80fd\u5bfc\u81f4 <code class=\"filename\">postgres_fdw</code> \u5de5\u4f5c\u5f02\u5e38\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.43.15\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/10/postgres-fdw.html#id-1.11.7.43.15\">F.34.6. \u8de8\u7248\u672c\u517c\u5bb9\u6027</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.43.16\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/10/postgres-fdw.html#id-1.11.7.43.16\">F.34.7. \u793a\u4f8b</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4e0b\u9762\u662f\u4f7f\u7528 <code class=\"literal\">postgres_fdw</code> \u521b\u5efa\u5916\u90e8\u8868\u7684\u4e00\u4e2a\u793a\u4f8b\u3002\u9996\u5148\u5b89\u88c5\u6269\u5c55\uff1a</p>\n<pre class=\"programlisting\">CREATE EXTENSION postgres_fdw;\n</pre>\n<p lang=\"zh\">\u7136\u540e\u4f7f\u7528<a class=\"xref\" href=\"/docs/10/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8fde\u63a5\u5230\u4e00\u53f0 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\uff0c\u5b83\u8fd0\u884c\u5728\u4e3b\u673a <code class=\"literal\">192.83.123.89</code> \u4e0a\u5e76\u76d1\u542c <code class=\"literal\">5432</code> \u7aef\u53e3\u3002\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"literal\">foreign_db</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER foreign_server\n        FOREIGN DATA WRAPPER postgres_fdw\n        OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');\n</pre>\n<p lang=\"zh\">\u8fd8\u9700\u8981\u7528<a class=\"xref\" href=\"/docs/10/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u5b9a\u4e49\u4e00\u4e2a\u7528\u6237\u6620\u5c04\uff0c\u4ee5\u6807\u8bc6\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u54ea\u4e2a\u89d2\u8272\uff1a</p>\n<pre class=\"programlisting\">CREATE USER MAPPING FOR local_user\n        SERVER foreign_server\n        OPTIONS (user 'foreign_user', password 'password');\n</pre>\n<p lang=\"zh\">\u73b0\u5728\u53ef\u4ee5\u901a\u8fc7<a class=\"xref\" href=\"/docs/10/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5728\u672c\u4f8b\u4e2d\uff0c\u8981\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868<code class=\"structname\">some_schema.some_table</code>\uff0c\u5176\u672c\u5730\u540d\u79f0\u4e3a<code class=\"structname\">foreign_table</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE FOREIGN TABLE foreign_table (\n        id integer NOT NULL,\n        data text\n)\n        SERVER foreign_server\n        OPTIONS (schema_name 'some_schema', table_name 'some_table');\n</pre>\n<p lang=\"zh\">\u5fc5\u987b\u786e\u4fdd\u5728<code class=\"command\">CREATE FOREIGN TABLE</code>\u4e2d\u58f0\u660e\u7684\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u5176\u4ed6\u5c5e\u6027\uff0c\u4e0e\u5b9e\u9645\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u5217\u540d\u4e5f\u5fc5\u987b\u5339\u914d\uff0c\u9664\u975e\u4e3a\u5404\u5217\u9644\u52a0<code class=\"literal\">column_name</code>\u9009\u9879\uff0c\u6307\u660e\u5b83\u4eec\u5728\u8fdc\u7a0b\u8868\u4e2d\u7684\u540d\u79f0\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/10/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u4f18\u4e8e\u624b\u5de5\u6784\u9020\u5916\u90e8\u8868\u5b9a\u4e49\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.43.17\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/10/postgres-fdw.html#id-1.11.7.43.17\">F.34.8. \u4f5c\u8005</a></span></h3>\n</div>\n</div>\n</div>\n<p>Shigeru Hanada <code class=\"email\">&lt;<a class=\"email\" href=\"mailto:shigeru.hanada@gmail.com\">shigeru.hanada@gmail.com</a>&gt;</code></p>\n</div>\n</div>", "manual_path": "/docs/10/postgres-fdw.html", "localization": {"status": "complete", "sources": [{"url": "/docs/10/postgres-fdw.html", "method": "same-major semantic node", "sha256": "b16d58296fdacd66138588ad6819d0ba5af094aec1196d37d4993f7bf1aaae20", "language": "zh", "matched_nodes": ["#POSTGRES-FDW/div[11]/div[1]/div[0]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[11]/div[1]/p[1]", "#POSTGRES-FDW/div[11]/div[1]/p[3]", "#POSTGRES-FDW/div[11]/div[2]/div[0]", "#POSTGRES-FDW/div[11]/div[2]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[2]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[2]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[11]/div[2]/p[1]", "#POSTGRES-FDW/div[11]/div[3]/div[0]", "#POSTGRES-FDW/div[11]/div[3]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[3]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[3]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[11]/div[3]/p[1]", "#POSTGRES-FDW/div[11]/div[3]/p[3]", "#POSTGRES-FDW/div[11]/div[4]/div[0]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[4]/p[1]", "#POSTGRES-FDW/div[11]/div[5]/div[0]", "#POSTGRES-FDW/div[11]/div[5]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[11]/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[11]/div[5]/p[1]", "#POSTGRES-FDW/div[11]/div[6]/div[0]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[5]", "#POSTGRES-FDW/div[11]/div[6]/p[1]", "#POSTGRES-FDW/div[11]/div[6]/p[2]", "#POSTGRES-FDW/div[11]/div[6]/p[4]", "#POSTGRES-FDW/div[11]/div[6]/p[5]", "#POSTGRES-FDW/div[12]/p[1]", "#POSTGRES-FDW/div[13]/p[1]", "#POSTGRES-FDW/div[13]/p[2]", "#POSTGRES-FDW/div[13]/p[3]", "#POSTGRES-FDW/div[14]/p[1]", "#POSTGRES-FDW/div[14]/p[2]", "#POSTGRES-FDW/div[14]/p[3]", "#POSTGRES-FDW/div[15]/div[3]/ul[0]/li[0]", "#POSTGRES-FDW/div[15]/div[3]/ul[0]/li[1]", "#POSTGRES-FDW/div[15]/div[3]/ul[0]/li[2]", "#POSTGRES-FDW/div[15]/p[1]", "#POSTGRES-FDW/div[15]/p[2]", "#POSTGRES-FDW/div[15]/p[4]", "#POSTGRES-FDW/div[15]/p[5]", "#POSTGRES-FDW/div[17]/p[1]", "#POSTGRES-FDW/div[17]/p[3]", "#POSTGRES-FDW/div[17]/p[5]", "#POSTGRES-FDW/div[17]/p[7]", "#POSTGRES-FDW/div[17]/p[9]", "#POSTGRES-FDW/div[1]/dl[0]/dt[0]", "#POSTGRES-FDW/div[1]/dl[0]/dt[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[4]", "#POSTGRES-FDW/div[1]/dl[0]/dt[5]", "#POSTGRES-FDW/div[1]/dl[0]/dt[6]", "#POSTGRES-FDW/div[1]/dl[0]/dt[7]", "#POSTGRES-FDW/div[6]/ol[0]/li[0]", "#POSTGRES-FDW/div[6]/ol[0]/li[1]", "#POSTGRES-FDW/div[6]/ol[0]/li[2]", "#POSTGRES-FDW/div[6]/ol[0]/li[3]", "#POSTGRES-FDW/p[10]", "#POSTGRES-FDW/p[3]", "#POSTGRES-FDW/p[4]", "#POSTGRES-FDW/p[5]", "#POSTGRES-FDW/p[7]", "#POSTGRES-FDW/p[9]"]}], "language": "zh", "original_text": {"/versions/10/description/0": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/versions/10/facts/0/label": "Interface family", "/versions/10/facts/0/value": "Foreign-data wrapper", "/versions/10/facts/1/label": "Handler or routine", "/versions/10/facts/2/label": "Recorded callbacks", "/versions/10/facts/3/label": "Data source", "/versions/10/facts/3/value": "Remote PostgreSQL servers", "/versions/10/tables/0/title": "Registered interface handlers", "/versions/10/tables/1/title": "Documented options", "/versions/10/related/0/label": "Foreign-data wrapper catalog", "/versions/10/related/1/label": "Existing extension catalogue identity", "/versions/10/related/2/label": "Foreign Scan plan node", "/versions/10/sections/0/title": "Interface and capability boundaries", "/versions/10/sections/1/title": "Transaction Management", "/versions/10/sections/2/title": "Remote Query Optimization", "/versions/10/sections/3/title": "Cross-Version Compatibility", "/versions/10/sections/4/title": "Registered implementation in core source", "/versions/10/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/10/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/10/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/10/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/10/tables/0/rows/4/state": "No handler registered in this build", "/versions/10/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/10/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/10/tables/0/rows/7/state": "No handler registered in this build", "/versions/10/tables/0/rows/8/state": "No handler registered in this build", "/versions/10/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/10/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/10/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/10/sections/1/paragraphs/0": "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints.", "/versions/10/sections/1/paragraphs/1": "The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local transaction uses SERIALIZABLE or REPEATABLE READ isolation level, but it might be surprising for a READ COMMITTED local transaction. A future PostgreSQL release might modify these rules.", "/versions/10/sections/1/paragraphs/2": "Note that it is currently not supported by postgres_fdw to prepare the remote transaction for two-phase commit.", "/versions/10/sections/2/paragraphs/0": "postgres_fdw attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by sending query WHERE clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, WHERE clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an extension that's listed in the foreign server's extensions option. Operators and functions in such clauses must be IMMUTABLE as well. For an UPDATE or DELETE query, postgres_fdw attempts to optimize the query execution by sending the whole query to the remote server if there are no query WHERE clauses that cannot be sent to the remote server, no local joins for the query, no row-level local BEFORE or AFTER triggers on the target table, and no CHECK OPTION constraints from parent views. In UPDATE , expressions to assign to target columns must use only built-in data types, IMMUTABLE operators, or IMMUTABLE functions, to reduce the risk of misexecution of the query.", "/versions/10/sections/2/paragraphs/1": "When postgres_fdw encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved are subject to different user mappings. While sending the JOIN clauses, it takes the same precautions as mentioned above for the WHERE clauses.", "/versions/10/sections/2/paragraphs/2": "The query that is actually sent to the remote server for execution can be examined using EXPLAIN VERBOSE .", "/versions/10/sections/3/paragraphs/0": "postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1. A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent to it for execution, resulting in \u201c function does not exist \u201d or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table reference in a sub- SELECT with OFFSET 0 as an optimization fence, and placing the problematic function or operator outside the sub- SELECT .", "/versions/10/tables/0/rows/0/feature": "Scan rows", "/versions/10/tables/0/rows/5/feature": "Join path pushdown", "/versions/10/tables/0/rows/6/feature": "Upper paths, including aggregation", "/versions/10/tables/0/rows/7/feature": "Batch insert", "/versions/10/tables/0/rows/8/feature": "Asynchronous append execution", "/versions/10/tables/0/rows/9/feature": "Import schema", "/versions/10/tables/0/columns/0/label": "Interface operation", "/versions/10/tables/0/columns/1/label": "Source observation", "/versions/10/tables/0/columns/2/label": "Callback", "/versions/10/tables/0/columns/3/label": "Implementation", "/versions/10/tables/1/columns/0/label": "Option", "/versions/10/tables/1/columns/1/label": "Same-version definition", "/versions/10/tables/1/rows/0/definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used.", "/versions/10/tables/1/rows/1/definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used.", "/versions/10/tables/1/rows/2/definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used.", "/versions/10/tables/1/rows/3/definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false .", "/versions/10/tables/1/rows/4/definition": "This option, which can be specified for a foreign server, is a numeric value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 .", "/versions/10/tables/1/rows/5/definition": "This option, which can be specified for a foreign server, is a numeric value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 .", "/versions/10/tables/1/rows/6/definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.", "/versions/10/tables/1/rows/7/definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 .", "/versions/10/tables/1/rows/8/definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server.", "/versions/10/tables/1/rows/9/definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different.", "/versions/10/tables/1/rows/10/definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally.", "/versions/10/tables/1/rows/11/definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true .", "/versions/10/tables/0/rows/4/implementation": "Not registered", "/versions/10/tables/0/rows/7/implementation": "Not registered", "/versions/10/tables/0/rows/8/implementation": "Not registered"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "b7038528a8161fedc412c3c9dbef189bc2c81df237585739c3ee6c2fd01b951e"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "schema_name", "definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used."}, {"name": "table_name", "definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used."}, {"name": "column_name", "definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used."}, {"name": "use_remote_estimate", "definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false ."}, {"name": "fdw_startup_cost", "definition": "This option, which can be specified for a foreign server, is a numeric value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 ."}, {"name": "fdw_tuple_cost", "definition": "This option, which can be specified for a foreign server, is a numeric value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 ."}, {"name": "extensions", "definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly."}, {"name": "fetch_size", "definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 ."}, {"name": "updatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server."}, {"name": "import_collate", "definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different."}, {"name": "import_default", "definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally."}, {"name": "import_not_null", "definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true ."}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExplainDirectModify": "postgresExplainDirectModify", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets"}, "source_options": [], "protocol_versions": {}}, "comparison_hash": "68e2e4e662f2970b9c6c5c6076ea877fb184518313f8003a84bf42e5576c5bb7", "manual_language": "zh", "runtime_verified": false}, "11": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "postgres_fdw_handler"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "29"}, {"label": "\u6570\u636e\u6e90", "value": "\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u626b\u63cf\u6570\u636e\u884c", "callback": "IterateForeignScan", "implementation": "postgresIterateForeignScan"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "INSERT", "callback": "ExecForeignInsert", "implementation": "postgresExecForeignInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "UPDATE", "callback": "ExecForeignUpdate", "implementation": "postgresExecForeignUpdate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "DELETE", "callback": "ExecForeignDelete", "implementation": "postgresExecForeignDelete"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "TRUNCATE", "callback": "ExecForeignTruncate", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u8fde\u63a5\u8def\u5f84\u4e0b\u63a8", "callback": "GetForeignJoinPaths", "implementation": "postgresGetForeignJoinPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u4e0a\u5c42\u8def\u5f84\uff0c\u5305\u62ec\u805a\u5408", "callback": "GetForeignUpperPaths", "implementation": "postgresGetForeignUpperPaths"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u6279\u91cf\u63d2\u5165", "callback": "ExecForeignBatchInsert", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u5f02\u6b65\u8ffd\u52a0\u6267\u884c", "callback": "ForeignAsyncRequest", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5bfc\u5165\u6a21\u5f0f", "callback": "ImportForeignSchema", "implementation": "postgresImportForeignSchema"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "schema_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002"}, {"name": "table_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "column_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "use_remote_estimate", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 postgres_fdw \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b EXPLAIN \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "fdw_startup_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "fdw_tuple_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a 0.01 \u3002"}, {"name": "extensions", "definition": "\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 PostgreSQL \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002 \u4f7f\u7528 extensions \u9009\u9879\u65f6\uff0c \u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002"}, {"name": "fetch_size", "definition": "\u8be5\u9009\u9879\u6307\u5b9a postgres_fdw \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "updatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 INSERT \u3001 UPDATE \u548c DELETE \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c information_schema \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 postgres_fdw \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002"}, {"name": "import_collate", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 COLLATE \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002 \u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a true \uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 COLLATE \"default\" \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002"}, {"name": "import_default", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 DEFAULT \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b nextval() \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_not_null", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 NOT NULL \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}], "related": [{"url": "/wiki/catalog/pg_foreign_data_wrapper/?v=11", "label": "Foreign-data wrapper \u7cfb\u7edf\u76ee\u5f55"}, {"url": "/e/postgres_fdw/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/plan/foreign-scan/?v=11", "label": "Foreign Scan \u8ba1\u5212\u8282\u70b9"}], "release": {"ref": "PostgreSQL 11.22 source archive", "label": "11.22", "major": "11", "channel": "historical", "revision": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0", "source_url": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/11/postgres-fdw.html", "path": "postgres-fdw.html", "label": "PostgreSQL 11 English manual", "sha256": "70ee6fc4b9de4de194776eae4387bfa7c0ac3fd36af528ba040d39a7bd242514", "language": "en", "original_url": "/docs/11/postgres-fdw.html"}, {"url": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "line": 459, "path": "contrib/postgres_fdw/postgres_fdw.c", "label": "contrib/postgres_fdw/postgres_fdw.c:459", "sha256": "1f25278a46ee5704e52c01216e67b58bf193aac54e580a72fc940ad438a55338", "archive_sha256": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406", "paragraphs": ["\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c postgres_fdw \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002", "\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a SERIALIZABLE \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \uff1b\u5426\u5219\u4f7f\u7528 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 SERIALIZABLE \u6216 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e READ COMMITTED \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 PostgreSQL \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002", "\u8bf7\u6ce8\u610f\uff0c postgres_fdw \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002"]}, {"title": "\u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316", "paragraphs": ["postgres_fdw \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 WHERE \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 WHERE \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 extensions \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f IMMUTABLE \u3002\u5bf9\u4e8e UPDATE \u6216 DELETE \u67e5\u8be2\uff0c postgres_fdw \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 WHERE \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 BEFORE \u6216 AFTER \u89e6\u53d1\u5668\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 CHECK OPTION \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 UPDATE \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001 IMMUTABLE \u64cd\u4f5c\u7b26\u6216 IMMUTABLE \u51fd\u6570\u3002", "\u5f53 postgres_fdw \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 JOIN \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 WHERE \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002", "\u53ef\u4ee5\u4f7f\u7528 EXPLAIN VERBOSE \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002"]}, {"title": "\u8de8\u7248\u672c\u517c\u5bb9\u6027", "paragraphs": ["postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002"]}, {"code": "{\n\tFdwRoutine *routine = makeNode(FdwRoutine);\n\n\t/* Functions for scanning foreign tables */\n\troutine->GetForeignRelSize = postgresGetForeignRelSize;\n\troutine->GetForeignPaths = postgresGetForeignPaths;\n\troutine->GetForeignPlan = postgresGetForeignPlan;\n\troutine->BeginForeignScan = postgresBeginForeignScan;\n\troutine->IterateForeignScan = postgresIterateForeignScan;\n\troutine->ReScanForeignScan = postgresReScanForeignScan;\n\troutine->EndForeignScan = postgresEndForeignScan;\n\n\t/* Functions for updating foreign tables */\n\troutine->AddForeignUpdateTargets = postgresAddForeignUpdateTargets;\n\troutine->PlanForeignModify = postgresPlanForeignModify;\n\troutine->BeginForeignModify = postgresBeginForeignModify;\n\troutine->ExecForeignInsert = postgresExecForeignInsert;\n\troutine->ExecForeignUpdate = postgresExecForeignUpdate;\n\troutine->ExecForeignDelete = postgresExecForeignDelete;\n\troutine->EndForeignModify = postgresEndForeignModify;\n\troutine->BeginForeignInsert = postgresBeginForeignInsert;\n\troutine->EndForeignInsert = postgresEndForeignInsert;\n\troutine->IsForeignRelUpdatable = postgresIsForeignRelUpdatable;\n\troutine->PlanDirectModify = postgresPlanDirectModify;\n\troutine->BeginDirectModify = postgresBeginDirectModify;\n\troutine->IterateDirectModify = postgresIterateDirectModify;\n\troutine->EndDirectModify = postgresEndDirectModify;\n\n\t/* Function for EvalPlanQual rechecks */\n\troutine->RecheckForeignScan = postgresRecheckForeignScan;\n\t/* Support functions for EXPLAIN */\n\troutine->ExplainForeignScan = postgresExplainForeignScan;\n\troutine->ExplainForeignModify = postgresExplainForeignModify;\n\troutine->ExplainDirectModify = postgresExplainDirectModify;\n\n\t/* Support functions for ANALYZE */\n\troutine->AnalyzeForeignTable = postgresAnalyzeForeignTable;\n\n\t/* Support functions for IMPORT FOREIGN SCHEMA */\n\troutine->ImportForeignSchema = postgresImportForeignSchema;\n\n\t/* Support functions for join push-down */\n\troutine->GetForeignJoinPaths = postgresGetForeignJoinPaths;\n\n\t/* Support functions for upper relation push-down */\n\troutine->GetForeignUpperPaths = postgresGetForeignUpperPaths;\n\n\tPG_RETURN_POINTER(routine);\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExplainDirectModify": "postgresExplainDirectModify", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets"}, "description": ["\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002"], "manual_html": "<div class=\"sect1\" id=\"POSTGRES-FDW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">F.33.\u00a0postgres_fdw</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u6a21\u5757\u63d0\u4f9b\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668 <code class=\"literal\">postgres_fdw</code>\uff0c\u53ef\u7528\u4e8e\u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u672c\u6a21\u5757\u63d0\u4f9b\u7684\u529f\u80fd\u4e0e\u8f83\u65e7\u7684<a class=\"xref\" href=\"/docs/11/dblink.html\" title=\"F.10.\u00a0dblink\">dblink</a>\u6a21\u5757\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u91cd\u53e0\u3002\u4f46 <code class=\"filename\">postgres_fdw</code> \u4e3a\u8bbf\u95ee\u8fdc\u7a0b\u8868\u63d0\u4f9b\u4e86\u66f4\u900f\u660e\u4e14\u7b26\u5408\u6807\u51c6\u7684\u8bed\u6cd5\uff0c\u5e76\u4e14\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u6027\u80fd\u66f4\u597d\u3002</p>\n<p lang=\"zh\">\u8981\u51c6\u5907\u901a\u8fc7 <code class=\"filename\">postgres_fdw</code> \u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee\uff1a</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5b89\u88c5 <code class=\"filename\">postgres_fdw</code> \u6269\u5c55\uff0c\u53ef\u4f7f\u7528<a class=\"xref\" href=\"/docs/11/sql-createextension.html\" title=\"CREATE EXTENSION\"><span class=\"refentrytitle\">CREATE EXTENSION</span></a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u4f7f\u7528<a class=\"xref\" href=\"/docs/11/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u5bf9\u8c61\uff0c\u7528\u6765\u8868\u793a\u6bcf\u4e2a\u8981\u8fde\u63a5\u7684\u8fdc\u7a0b\u6570\u636e\u5e93\u3002\u5c06\u9664 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u4e4b\u5916\u7684\u8fde\u63a5\u4fe1\u606f\u6307\u5b9a\u4e3a\u670d\u52a1\u5668\u5bf9\u8c61\u7684\u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u9700\u8981\u83b7\u51c6\u8bbf\u95ee\u5404\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u7528\u6237\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/11/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u521b\u5efa\u7528\u6237\u6620\u5c04\u3002\u5c06\u8981\u4f7f\u7528\u7684\u8fdc\u7a0b\u7528\u6237\u540d\u548c\u5bc6\u7801\u6307\u5b9a\u4e3a\u7528\u6237\u6620\u5c04\u7684 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u8981\u8bbf\u95ee\u7684\u8fdc\u7a0b\u8868\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/11/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u6216<a class=\"xref\" href=\"/docs/11/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5916\u90e8\u8868\u7684\u5217\u5fc5\u987b\u4e0e\u88ab\u5f15\u7528\u7684\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u5728\u5916\u90e8\u8868\u5bf9\u8c61\u7684\u9009\u9879\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8fdc\u7a0b\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0e\u8fdc\u7a0b\u8868\u4e0d\u540c\u7684\u8868\u540d\u548c/\u6216\u5217\u540d\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\">\u73b0\u5728\uff0c\u53ea\u9700\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">SELECT</code>\uff0c\u5373\u53ef\u8bbf\u95ee\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u4e2d\u5b58\u50a8\u7684\u6570\u636e\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code> \u6216 <code class=\"command\">COPY</code> \u4fee\u6539\u8fdc\u7a0b\u8868\u3002\uff08\u5f53\u7136\uff0c\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\u7684\u8fdc\u7a0b\u7528\u6237\u5fc5\u987b\u62e5\u6709\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u6743\u9650\u3002\uff09</p>\n<p lang=\"zh\">postgres_fdw \u76ee\u524d\u4e0d\u652f\u6301\u5e26 ON CONFLICT DO UPDATE \u5b50\u53e5\u7684 INSERT\u3002\u4e0d\u8fc7\uff0c\u652f\u6301 ON CONFLICT DO NOTHING\uff0c\u524d\u63d0\u662f\u4e0d\u6307\u5b9a\u552f\u4e00\u7d22\u5f15\u63a8\u65ad\u6761\u4ef6\u3002postgres_fdw \u8fd8\u652f\u6301\u5728\u5206\u533a\u8868\u4e0a\u6267\u884c UPDATE \u6240\u89e6\u53d1\u7684\u884c\u79fb\u52a8\uff0c\u4f46\u76ee\u524d\u4e0d\u652f\u6301\u4ee5\u4e0b\u60c5\u51b5\uff1a\u7528\u4e8e\u63a5\u6536\u79fb\u5165\u884c\u7684\u8fdc\u7aef\u5206\u533a\uff0c\u540c\u65f6\u4e5f\u662f\u7a0d\u540e\u5c06\u8981\u66f4\u65b0\u7684 UPDATE \u76ee\u6807\u5206\u533a\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5c06\u5916\u90e8\u8868\u7684\u5217\u58f0\u660e\u4e3a\u4e0e\u88ab\u5f15\u7528\u8fdc\u7a0b\u8868\u7684\u5bf9\u5e94\u5217\u5177\u6709\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u5728\u9002\u7528\u65f6\u5177\u6709\u76f8\u540c\u7684\u6392\u5e8f\u89c4\u5219\u3002\u5c3d\u7ba1 <code class=\"filename\">postgres_fdw</code> \u76ee\u524d\u5728\u6309\u9700\u6267\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u9762\u76f8\u5f53\u5bbd\u5bb9\uff0c\u4f46\u5f53\u7c7b\u578b\u6216\u6392\u5e8f\u89c4\u5219\u4e0d\u5339\u914d\u65f6\uff0c\u4ecd\u53ef\u80fd\u51fa\u73b0\u4ee4\u4eba\u610f\u5916\u7684\u8bed\u4e49\u5f02\u5e38\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5bf9\u67e5\u8be2\u6761\u4ef6\u7684\u89e3\u91ca\u53ef\u80fd\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5916\u90e8\u8868\u7684\u58f0\u660e\u53ef\u4ee5\u6bd4\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u5c11\u4e00\u4e9b\u5217\uff0c\u6216\u8005\u4f7f\u7528\u4e0d\u540c\u7684\u5217\u987a\u5e8f\u3002\u4e0e\u8fdc\u7a0b\u8868\u5217\u7684\u5339\u914d\u662f\u6309\u540d\u79f0\u800c\u4e0d\u662f\u6309\u4f4d\u7f6e\u8fdb\u884c\u7684\u3002</p>\n<div class=\"sect2\" id=\"id-1.11.7.42.10\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/11/postgres-fdw.html#id-1.11.7.42.10\">F.33.1. postgres_fdw \u7684 FDW \u9009\u9879</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.1.\u00a0\u8fde\u63a5\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"filename\">postgres_fdw</code>\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e0e<span class=\"application\">libpq</span>\u8fde\u63a5\u5b57\u7b26\u4e32\u6240\u63a5\u53d7\u7684\u76f8\u540c\u9009\u9879\uff0c\u8be6\u89c1<a class=\"xref\" href=\"/docs/11/libpq.html#LIBPQ-PARAMKEYWORDS\" title=\"34.1.2.\u00a0\u53c2\u6570\u5173\u952e\u8bcd\">\u7b2c\u00a034.1.2\u00a0\u8282</a>\uff0c\u4f46\u4ee5\u4e0b\u9009\u9879\u4e0d\u88ab\u5141\u8bb8\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code>\uff08\u5e94\u6539\u4e3a\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">client_encoding</code>\uff08\u4f1a\u6839\u636e\u672c\u5730\u670d\u52a1\u5668\u7f16\u7801\u81ea\u52a8\u8bbe\u7f6e\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">fallback_application_name</code>\uff08\u59cb\u7ec8\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres_fdw</code>\uff09</p>\n</li>\n</ul>\n</div>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u4e0d\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\uff0c\u56e0\u6b64\u5e94\u59cb\u7ec8\u4e3a\u5c5e\u4e8e\u975e\u8d85\u7ea7\u7528\u6237\u7684\u7528\u6237\u6620\u5c04\u6307\u5b9a <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.3\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.2.\u00a0\u5bf9\u8c61\u540d\u79f0\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u9009\u9879\u53ef\u7528\u4e8e\u63a7\u5236\u53d1\u9001\u5230\u8fdc\u7a0b <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u7684 SQL \u8bed\u53e5\u4e2d\u6240\u4f7f\u7528\u7684\u540d\u79f0\u3002\u5f53\u521b\u5efa\u5916\u90e8\u8868\u65f6\u6240\u7528\u7684\u540d\u79f0\u4e0e\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u7684\u540d\u79f0\u4e0d\u540c\u65f6\uff0c\u5c31\u9700\u8981\u8fd9\u4e9b\u9009\u9879\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">schema_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">table_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">column_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.4\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.3.\u00a0\u4ee3\u4ef7\u4f30\u7b97\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u901a\u8fc7\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u67e5\u8be2\u6765\u83b7\u53d6\u8fdc\u7a0b\u6570\u636e\uff0c\u56e0\u6b64\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u626b\u63cf\u5916\u90e8\u8868\u7684\u4f30\u8ba1\u4ee3\u4ef7\u5e94\u5f53\u7b49\u4e8e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b8c\u6210\u8be5\u64cd\u4f5c\u7684\u4ee3\u4ef7\uff0c\u518d\u52a0\u4e0a\u4e00\u4e9b\u901a\u4fe1\u5f00\u9500\u3002\u83b7\u5f97\u8fd9\u79cd\u4f30\u7b97\u6700\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u662f\u5411\u8fdc\u7a0b\u670d\u52a1\u5668\u8be2\u95ee\uff0c\u518d\u628a\u5f00\u9500\u52a0\u4e0a\u53bb\uff1b\u4f46\u5bf9\u4e8e\u7b80\u5355\u67e5\u8be2\uff0c\u4e3a\u4e86\u53d6\u5f97\u4ee3\u4ef7\u4f30\u7b97\u800c\u989d\u5916\u53d1\u9001\u4e00\u6b21\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ef\u80fd\u5e76\u4e0d\u5212\u7b97\u3002\u56e0\u6b64 <code class=\"filename\">postgres_fdw</code> \u63d0\u4f9b\u4ee5\u4e0b\u9009\u9879\u6765\u63a7\u5236\u4ee3\u4ef7\u4f30\u7b97\u7684\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">use_remote_estimate</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b <code class=\"command\">EXPLAIN</code> \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_startup_cost</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_tuple_cost</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">0.01</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u771f\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4ece\u8fdc\u7a0b\u670d\u52a1\u5668\u83b7\u53d6\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u5047\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u5728\u672c\u5730\u6267\u884c\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u518d\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u9664\u975e\u6709\u8fdc\u7a0b\u8868\u7edf\u8ba1\u4fe1\u606f\u7684\u672c\u5730\u526f\u672c\u53ef\u7528\uff0c\u5426\u5219\u8fd9\u79cd\u672c\u5730\u4f30\u7b97\u4e0d\u592a\u53ef\u80fd\u975e\u5e38\u51c6\u786e\u3002\u66f4\u65b0\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c\u662f\u5728\u5916\u90e8\u8868\u4e0a\u8fd0\u884c<a class=\"xref\" href=\"/docs/11/sql-analyze.html\" title=\"ANALYZE\"><span class=\"refentrytitle\">ANALYZE</span></a>\uff1b\u8fd9\u6837\u4f1a\u626b\u63cf\u8fdc\u7a0b\u8868\uff0c\u7136\u540e\u50cf\u5bf9\u5f85\u672c\u5730\u8868\u4e00\u6837\u8ba1\u7b97\u5e76\u5b58\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u4fdd\u7559\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u8fdc\u7a0b\u8868\u6bcf\u6b21\u67e5\u8be2\u7684\u89c4\u5212\u5f00\u9500\uff1b\u4f46\u5982\u679c\u8fdc\u7a0b\u8868\u7ecf\u5e38\u66f4\u65b0\uff0c\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u5f88\u5feb\u5c31\u4f1a\u8fc7\u65f6\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.5\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.4.\u00a0\u8fdc\u7a0b\u6267\u884c\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709\u4f7f\u7528\u5185\u7f6e\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u624d\u4f1a\u88ab\u8003\u8651\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u3002\u6d89\u53ca\u975e\u5185\u7f6e\u51fd\u6570\u7684\u5b50\u53e5\u4f1a\u5728\u53d6\u56de\u884c\u4e4b\u540e\u5728\u672c\u5730\u68c0\u67e5\u3002\u5982\u679c\u8fd9\u4e9b\u51fd\u6570\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e5f\u53ef\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fe1\u5176\u7ed3\u679c\u4e0e\u672c\u5730\u76f8\u540c\uff0c\u5219\u5c06\u8fd9\u7c7b <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u7aef\u6267\u884c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u6b64\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">extensions</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 <span class=\"productname\">PostgreSQL</span> \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"literal\">extensions</code> \u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fetch_size</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.6\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.5.\u00a0\u53ef\u66f4\u65b0\u6027\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u66f4\u65b0\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">updatable</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u548c <code class=\"command\">DELETE</code> \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c<code class=\"literal\">information_schema</code> \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.7\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.6.\u00a0\u5bfc\u5165\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/11/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u5bfc\u5165\u5916\u90e8\u8868\u5b9a\u4e49\u3002\u8be5\u547d\u4ee4\u4f1a\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4ee5\u5339\u914d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868\u6216\u89c6\u56fe\u3002\u5982\u679c\u8981\u5bfc\u5165\u7684\u8fdc\u7a0b\u8868\u5217\u4f7f\u7528\u7528\u6237\u5b9a\u4e49\u6570\u636e\u7c7b\u578b\uff0c\u5219\u672c\u5730\u670d\u52a1\u5668\u5fc5\u987b\u5b58\u5728\u540c\u540d\u4e14\u517c\u5bb9\u7684\u7c7b\u578b\u3002</p>\n<p lang=\"zh\">\u53ef\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\uff08\u5728 <code class=\"command\">IMPORT FOREIGN SCHEMA</code> \u547d\u4ee4\u4e2d\u7ed9\u51fa\uff09\u81ea\u5b9a\u4e49\u5bfc\u5165\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">import_collate</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">COLLATE</code> \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a <code class=\"literal\">true</code>\uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 <code class=\"literal\">COLLATE \"default\"</code> \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_default</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">DEFAULT</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b<code class=\"function\">nextval()</code> \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_not_null</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">NOT NULL</code> \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u9664 <code class=\"literal\">NOT NULL</code> \u4e4b\u5916\u7684\u7ea6\u675f\u6c38\u8fdc\u4e0d\u4f1a\u4ece\u8fdc\u7a0b\u8868\u5bfc\u5165\u3002\u867d\u7136 <span class=\"productname\">PostgreSQL</span> \u786e\u5b9e\u652f\u6301\u5728\u5916\u90e8\u8868\u4e0a\u5b9a\u4e49 <code class=\"literal\">CHECK</code> \u7ea6\u675f\uff0c\u4f46\u7531\u4e8e\u7ea6\u675f\u8868\u8fbe\u5f0f\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u6c42\u503c\u4e0d\u540c\uff0c\u7cfb\u7edf\u4e0d\u4f1a\u81ea\u52a8\u5bfc\u5165\u5b83\u4eec\u3002\u6b64\u7c7b\u884c\u4e3a\u4e0d\u4e00\u81f4\u7684<code class=\"literal\">CHECK</code> \u7ea6\u675f\uff0c\u53ef\u80fd\u5bfc\u81f4\u67e5\u8be2\u4f18\u5316\u4e2d\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5e0c\u671b\u5bfc\u5165<code class=\"literal\">CHECK</code> \u7ea6\u675f\uff0c\u5fc5\u987b\u624b\u5de5\u5b8c\u6210\uff0c\u5e76\u5e94\u4ed4\u7ec6\u6838\u5b9e\u6bcf\u4e00\u4e2a\u7ea6\u675f\u7684\u8bed\u4e49\u3002\u6709\u5173\u5916\u90e8\u8868\u4e0a<code class=\"literal\">CHECK</code> \u7ea6\u675f\u5904\u7406\u65b9\u5f0f\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/11/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u3002</p>\n<p lang=\"zh\">\u4f5c\u4e3a\u5176\u4ed6\u8868\u5206\u533a\u7684\u8868\u6216\u5916\u90e8\u8868\u4f1a\u88ab\u81ea\u52a8\u6392\u9664\u3002\u5206\u533a\u8868\u4f1a\u88ab\u5bfc\u5165\uff0c\u9664\u975e\u5b83\u672c\u8eab\u4e5f\u662f\u5176\u4ed6\u8868\u7684\u5206\u533a\u3002\u7531\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u901a\u8fc7\u4f5c\u4e3a\u5206\u533a\u5c42\u6b21\u6839\u7684\u5206\u533a\u8868\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ea\u5bfc\u5165\u5206\u533a\u8868\u5373\u53ef\u8bbf\u95ee\u5168\u90e8\u6570\u636e\uff0c\u800c\u65e0\u9700\u521b\u5efa\u989d\u5916\u5bf9\u8c61\u3002</p>\n</div>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.11\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/11/postgres-fdw.html#id-1.11.7.42.11\">F.33.2. \u8fde\u63a5\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u5728\u9996\u6b21\u6267\u884c\u4f7f\u7528\u4e0e\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u5173\u8054\u7684\u5916\u90e8\u8868\u7684\u67e5\u8be2\u65f6\uff0c\u4f1a\u5efa\u7acb\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002\u8be5\u8fde\u63a5\u4f1a\u5728\u540c\u4e00\u4f1a\u8bdd\u4e2d\u4fdd\u7559\u5e76\u4f9b\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u3002\u5982\u679c\u4f7f\u7528\u591a\u4e2a\u7528\u6237\u6807\u8bc6\uff08\u7528\u6237\u6620\u5c04\uff09\u8bbf\u95ee\u8be5\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u4f1a\u4e3a\u6bcf\u4e2a\u7528\u6237\u6620\u5c04\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.12\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/11/postgres-fdw.html#id-1.11.7.42.12\">F.33.3. \u4e8b\u52a1\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c<code class=\"filename\">postgres_fdw</code> \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002</p>\n<p lang=\"zh\">\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a <code class=\"literal\">SERIALIZABLE</code> \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code>\uff1b\u5426\u5219\u4f7f\u7528 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code> \u6216 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e <code class=\"literal\">READ COMMITTED</code> \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 <span class=\"productname\">PostgreSQL</span> \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c<code class=\"filename\">postgres_fdw</code> \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.13\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/11/postgres-fdw.html#id-1.11.7.42.13\">F.33.4. \u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 <code class=\"literal\">extensions</code> \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f <code class=\"literal\">IMMUTABLE</code>\u3002\u5bf9\u4e8e <code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u67e5\u8be2\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 <code class=\"literal\">BEFORE</code> \u6216 <code class=\"literal\">AFTER</code> \u89e6\u53d1\u5668\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 <code class=\"literal\">CHECK OPTION</code> \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 <code class=\"command\">UPDATE</code> \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001<code class=\"literal\">IMMUTABLE</code> \u64cd\u4f5c\u7b26\u6216 <code class=\"literal\">IMMUTABLE</code> \u51fd\u6570\u3002</p>\n<p lang=\"zh\">\u5f53 <code class=\"filename\">postgres_fdw</code> \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 <code class=\"literal\">JOIN</code> \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">EXPLAIN VERBOSE</code> \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.14\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/11/postgres-fdw.html#id-1.11.7.42.14\">F.33.5. \u8fdc\u7a0b\u67e5\u8be2\u6267\u884c\u73af\u5883</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728 <code class=\"filename\">postgres_fdw</code> \u6253\u5f00\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u4e2d\uff0c<a class=\"xref\" href=\"/docs/11/runtime-config-client.html#GUC-SEARCH-PATH\">search_path</a>\u53c2\u6570\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u5305\u542b <code class=\"literal\">pg_catalog</code>\uff0c\u8fd9\u6837\u65e0\u9700\u6a21\u5f0f\u9650\u5b9a\u5c31\u53ea\u80fd\u770b\u5230\u5185\u7f6e\u5bf9\u8c61\u3002\u8fd9\u5bf9 <code class=\"filename\">postgres_fdw</code> \u81ea\u8eab\u751f\u6210\u7684\u67e5\u8be2\u4e0d\u662f\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u603b\u662f\u63d0\u4f9b\u8fd9\u79cd\u9650\u5b9a\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bf9\u90a3\u4e9b\u901a\u8fc7\u8fdc\u7a0b\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u6216\u89c4\u5219\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u51fd\u6570\u5e26\u6765\u98ce\u9669\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u89c6\u56fe\uff0c\u5219\u8be5\u89c6\u56fe\u4e2d\u4f7f\u7528\u7684\u4efb\u4f55\u51fd\u6570\u90fd\u4f1a\u5728\u53d7\u9650\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u6267\u884c\u3002\u5efa\u8bae\u5728\u8fd9\u7c7b\u51fd\u6570\u4e2d\u5bf9\u6240\u6709\u540d\u79f0\u90fd\u5199\u6210\u5e26\u6a21\u5f0f\u9650\u5b9a\u7684\u5f62\u5f0f\uff0c\u6216\u8005\u4e3a\u8fd9\u7c7b\u51fd\u6570\u9644\u52a0 <code class=\"literal\">SET search_path</code> \u9009\u9879\uff08\u89c1<a class=\"xref\" href=\"/docs/11/sql-createfunction.html\" title=\"CREATE FUNCTION\"><span class=\"refentrytitle\">CREATE FUNCTION</span></a>\uff09\uff0c\u4ee5\u5efa\u7acb\u5176\u9884\u671f\u7684\u641c\u7d22\u8def\u5f84\u73af\u5883\u3002</p>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u8fd8\u4f1a\u4e3a\u8fdc\u7a0b\u4f1a\u8bdd\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/11/runtime-config-client.html#GUC-TIMEZONE\">TimeZone</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">UTC</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/11/runtime-config-client.html#GUC-DATESTYLE\">DateStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">ISO</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/11/runtime-config-client.html#GUC-INTERVALSTYLE\">IntervalStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\u5bf9\u4e8e 9.0 \u53ca\u66f4\u65b0\u7248\u672c\u7684\u8fdc\u7aef\u670d\u52a1\u5668\uff0cextra_float_digits \u8bbe\u4e3a 3\uff1b\u66f4\u65e9\u7248\u672c\u5219\u8bbe\u4e3a 2\u3002</li>\n</ul>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u8bbe\u7f6e\u901a\u5e38\u4e0d\u50cf <code class=\"varname\">search_path</code> \u90a3\u6837\u5bb9\u6613\u51fa\u95ee\u9898\uff0c\u4f46\u5982\u679c\u6709\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684 <code class=\"literal\">SET</code> \u9009\u9879\u5904\u7406\u3002</p>\n<p lang=\"zh\"><span class=\"emphasis\"><em>\u4e0d</em></span>\u5efa\u8bae\u901a\u8fc7\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u7684\u4f1a\u8bdd\u7ea7\u8bbe\u7f6e\u6765\u8986\u76d6\u8fd9\u79cd\u884c\u4e3a\uff1b\u8fd9\u5f88\u53ef\u80fd\u5bfc\u81f4 <code class=\"filename\">postgres_fdw</code> \u5de5\u4f5c\u5f02\u5e38\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.15\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/11/postgres-fdw.html#id-1.11.7.42.15\">F.33.6. \u8de8\u7248\u672c\u517c\u5bb9\u6027</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.16\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/11/postgres-fdw.html#id-1.11.7.42.16\">F.33.7. \u793a\u4f8b</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4e0b\u9762\u662f\u4f7f\u7528 <code class=\"literal\">postgres_fdw</code> \u521b\u5efa\u5916\u90e8\u8868\u7684\u4e00\u4e2a\u793a\u4f8b\u3002\u9996\u5148\u5b89\u88c5\u6269\u5c55\uff1a</p>\n<pre class=\"programlisting\">CREATE EXTENSION postgres_fdw;\n</pre>\n<p lang=\"zh\">\u7136\u540e\u4f7f\u7528<a class=\"xref\" href=\"/docs/11/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8fde\u63a5\u5230\u4e00\u53f0 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\uff0c\u5b83\u8fd0\u884c\u5728\u4e3b\u673a <code class=\"literal\">192.83.123.89</code> \u4e0a\u5e76\u76d1\u542c <code class=\"literal\">5432</code> \u7aef\u53e3\u3002\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"literal\">foreign_db</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER foreign_server\n        FOREIGN DATA WRAPPER postgres_fdw\n        OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');\n</pre>\n<p lang=\"zh\">\u8fd8\u9700\u8981\u7528<a class=\"xref\" href=\"/docs/11/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u5b9a\u4e49\u4e00\u4e2a\u7528\u6237\u6620\u5c04\uff0c\u4ee5\u6807\u8bc6\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u54ea\u4e2a\u89d2\u8272\uff1a</p>\n<pre class=\"programlisting\">CREATE USER MAPPING FOR local_user\n        SERVER foreign_server\n        OPTIONS (user 'foreign_user', password 'password');\n</pre>\n<p lang=\"zh\">\u73b0\u5728\u53ef\u4ee5\u901a\u8fc7<a class=\"xref\" href=\"/docs/11/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5728\u672c\u4f8b\u4e2d\uff0c\u8981\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868<code class=\"structname\">some_schema.some_table</code>\uff0c\u5176\u672c\u5730\u540d\u79f0\u4e3a<code class=\"structname\">foreign_table</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE FOREIGN TABLE foreign_table (\n        id integer NOT NULL,\n        data text\n)\n        SERVER foreign_server\n        OPTIONS (schema_name 'some_schema', table_name 'some_table');\n</pre>\n<p lang=\"zh\">\u5fc5\u987b\u786e\u4fdd\u5728<code class=\"command\">CREATE FOREIGN TABLE</code>\u4e2d\u58f0\u660e\u7684\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u5176\u4ed6\u5c5e\u6027\uff0c\u4e0e\u5b9e\u9645\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u5217\u540d\u4e5f\u5fc5\u987b\u5339\u914d\uff0c\u9664\u975e\u4e3a\u5404\u5217\u9644\u52a0<code class=\"literal\">column_name</code>\u9009\u9879\uff0c\u6307\u660e\u5b83\u4eec\u5728\u8fdc\u7a0b\u8868\u4e2d\u7684\u540d\u79f0\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/11/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u4f18\u4e8e\u624b\u5de5\u6784\u9020\u5916\u90e8\u8868\u5b9a\u4e49\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.17\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/11/postgres-fdw.html#id-1.11.7.42.17\">F.33.8. \u4f5c\u8005</a></span></h3>\n</div>\n</div>\n</div>\n<p>Shigeru Hanada <code class=\"email\">&lt;<a class=\"email\" href=\"mailto:shigeru.hanada@gmail.com\">shigeru.hanada@gmail.com</a>&gt;</code></p>\n</div>\n</div>", "manual_path": "/docs/11/postgres-fdw.html", "localization": {"status": "complete", "sources": [{"url": "/docs/11/postgres-fdw.html", "method": "same-major semantic node", "sha256": "5cd99ce5552c71e569ac389e61f518c384d5d0591727900e1d1ad0164316d33e", "language": "zh", "matched_nodes": ["#POSTGRES-FDW/div[11]/div[1]/div[0]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[11]/div[1]/p[1]", "#POSTGRES-FDW/div[11]/div[1]/p[3]", "#POSTGRES-FDW/div[11]/div[2]/div[0]", "#POSTGRES-FDW/div[11]/div[2]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[2]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[2]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[11]/div[2]/p[1]", "#POSTGRES-FDW/div[11]/div[3]/div[0]", "#POSTGRES-FDW/div[11]/div[3]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[3]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[3]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[11]/div[3]/p[1]", "#POSTGRES-FDW/div[11]/div[3]/p[3]", "#POSTGRES-FDW/div[11]/div[4]/div[0]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[4]/p[1]", "#POSTGRES-FDW/div[11]/div[5]/div[0]", "#POSTGRES-FDW/div[11]/div[5]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[11]/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[11]/div[5]/p[1]", "#POSTGRES-FDW/div[11]/div[6]/div[0]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[5]", "#POSTGRES-FDW/div[11]/div[6]/p[1]", "#POSTGRES-FDW/div[11]/div[6]/p[2]", "#POSTGRES-FDW/div[11]/div[6]/p[4]", "#POSTGRES-FDW/div[11]/div[6]/p[5]", "#POSTGRES-FDW/div[12]/p[1]", "#POSTGRES-FDW/div[13]/p[1]", "#POSTGRES-FDW/div[13]/p[2]", "#POSTGRES-FDW/div[13]/p[3]", "#POSTGRES-FDW/div[14]/p[1]", "#POSTGRES-FDW/div[14]/p[2]", "#POSTGRES-FDW/div[14]/p[3]", "#POSTGRES-FDW/div[15]/div[3]/ul[0]/li[0]", "#POSTGRES-FDW/div[15]/div[3]/ul[0]/li[1]", "#POSTGRES-FDW/div[15]/div[3]/ul[0]/li[2]", "#POSTGRES-FDW/div[15]/p[1]", "#POSTGRES-FDW/div[15]/p[2]", "#POSTGRES-FDW/div[15]/p[4]", "#POSTGRES-FDW/div[15]/p[5]", "#POSTGRES-FDW/div[17]/p[1]", "#POSTGRES-FDW/div[17]/p[3]", "#POSTGRES-FDW/div[17]/p[5]", "#POSTGRES-FDW/div[17]/p[7]", "#POSTGRES-FDW/div[17]/p[9]", "#POSTGRES-FDW/div[1]/dl[0]/dt[0]", "#POSTGRES-FDW/div[1]/dl[0]/dt[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[4]", "#POSTGRES-FDW/div[1]/dl[0]/dt[5]", "#POSTGRES-FDW/div[1]/dl[0]/dt[6]", "#POSTGRES-FDW/div[1]/dl[0]/dt[7]", "#POSTGRES-FDW/div[6]/ol[0]/li[0]", "#POSTGRES-FDW/div[6]/ol[0]/li[1]", "#POSTGRES-FDW/div[6]/ol[0]/li[2]", "#POSTGRES-FDW/div[6]/ol[0]/li[3]", "#POSTGRES-FDW/p[10]", "#POSTGRES-FDW/p[3]", "#POSTGRES-FDW/p[4]", "#POSTGRES-FDW/p[5]", "#POSTGRES-FDW/p[7]", "#POSTGRES-FDW/p[9]"]}], "language": "zh", "original_text": {"/versions/11/description/0": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/versions/11/facts/0/label": "Interface family", "/versions/11/facts/0/value": "Foreign-data wrapper", "/versions/11/facts/1/label": "Handler or routine", "/versions/11/facts/2/label": "Recorded callbacks", "/versions/11/facts/3/label": "Data source", "/versions/11/facts/3/value": "Remote PostgreSQL servers", "/versions/11/tables/0/title": "Registered interface handlers", "/versions/11/tables/1/title": "Documented options", "/versions/11/related/0/label": "Foreign-data wrapper catalog", "/versions/11/related/1/label": "Existing extension catalogue identity", "/versions/11/related/2/label": "Foreign Scan plan node", "/versions/11/sections/0/title": "Interface and capability boundaries", "/versions/11/sections/1/title": "Transaction Management", "/versions/11/sections/2/title": "Remote Query Optimization", "/versions/11/sections/3/title": "Cross-Version Compatibility", "/versions/11/sections/4/title": "Registered implementation in core source", "/versions/11/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/11/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/11/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/11/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/11/tables/0/rows/4/state": "No handler registered in this build", "/versions/11/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/11/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/11/tables/0/rows/7/state": "No handler registered in this build", "/versions/11/tables/0/rows/8/state": "No handler registered in this build", "/versions/11/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/11/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/11/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/11/sections/1/paragraphs/0": "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints.", "/versions/11/sections/1/paragraphs/1": "The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local transaction uses SERIALIZABLE or REPEATABLE READ isolation level, but it might be surprising for a READ COMMITTED local transaction. A future PostgreSQL release might modify these rules.", "/versions/11/sections/1/paragraphs/2": "Note that it is currently not supported by postgres_fdw to prepare the remote transaction for two-phase commit.", "/versions/11/sections/2/paragraphs/0": "postgres_fdw attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by sending query WHERE clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, WHERE clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an extension that's listed in the foreign server's extensions option. Operators and functions in such clauses must be IMMUTABLE as well. For an UPDATE or DELETE query, postgres_fdw attempts to optimize the query execution by sending the whole query to the remote server if there are no query WHERE clauses that cannot be sent to the remote server, no local joins for the query, no row-level local BEFORE or AFTER triggers on the target table, and no CHECK OPTION constraints from parent views. In UPDATE , expressions to assign to target columns must use only built-in data types, IMMUTABLE operators, or IMMUTABLE functions, to reduce the risk of misexecution of the query.", "/versions/11/sections/2/paragraphs/1": "When postgres_fdw encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved are subject to different user mappings. While sending the JOIN clauses, it takes the same precautions as mentioned above for the WHERE clauses.", "/versions/11/sections/2/paragraphs/2": "The query that is actually sent to the remote server for execution can be examined using EXPLAIN VERBOSE .", "/versions/11/sections/3/paragraphs/0": "postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1. A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent to it for execution, resulting in \u201c function does not exist \u201d or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table reference in a sub- SELECT with OFFSET 0 as an optimization fence, and placing the problematic function or operator outside the sub- SELECT .", "/versions/11/tables/0/rows/0/feature": "Scan rows", "/versions/11/tables/0/rows/5/feature": "Join path pushdown", "/versions/11/tables/0/rows/6/feature": "Upper paths, including aggregation", "/versions/11/tables/0/rows/7/feature": "Batch insert", "/versions/11/tables/0/rows/8/feature": "Asynchronous append execution", "/versions/11/tables/0/rows/9/feature": "Import schema", "/versions/11/tables/0/columns/0/label": "Interface operation", "/versions/11/tables/0/columns/1/label": "Source observation", "/versions/11/tables/0/columns/2/label": "Callback", "/versions/11/tables/0/columns/3/label": "Implementation", "/versions/11/tables/1/columns/0/label": "Option", "/versions/11/tables/1/columns/1/label": "Same-version definition", "/versions/11/tables/1/rows/0/definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used.", "/versions/11/tables/1/rows/1/definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used.", "/versions/11/tables/1/rows/2/definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used.", "/versions/11/tables/1/rows/3/definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false .", "/versions/11/tables/1/rows/4/definition": "This option, which can be specified for a foreign server, is a numeric value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 .", "/versions/11/tables/1/rows/5/definition": "This option, which can be specified for a foreign server, is a numeric value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 .", "/versions/11/tables/1/rows/6/definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.", "/versions/11/tables/1/rows/7/definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 .", "/versions/11/tables/1/rows/8/definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server.", "/versions/11/tables/1/rows/9/definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different.", "/versions/11/tables/1/rows/10/definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally.", "/versions/11/tables/1/rows/11/definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true .", "/versions/11/tables/0/rows/4/implementation": "Not registered", "/versions/11/tables/0/rows/7/implementation": "Not registered", "/versions/11/tables/0/rows/8/implementation": "Not registered"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "d99c145ad2054e3f78940ecb784574648aaab8dfb57f7607550fe8962f90bd2d"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "schema_name", "definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used."}, {"name": "table_name", "definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used."}, {"name": "column_name", "definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used."}, {"name": "use_remote_estimate", "definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false ."}, {"name": "fdw_startup_cost", "definition": "This option, which can be specified for a foreign server, is a numeric value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 ."}, {"name": "fdw_tuple_cost", "definition": "This option, which can be specified for a foreign server, is a numeric value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 ."}, {"name": "extensions", "definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly."}, {"name": "fetch_size", "definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 ."}, {"name": "updatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server."}, {"name": "import_collate", "definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different."}, {"name": "import_default", "definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally."}, {"name": "import_not_null", "definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true ."}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExplainDirectModify": "postgresExplainDirectModify", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets"}, "source_options": [], "protocol_versions": {}}, "comparison_hash": "368dceb807dd9fa860296a909e409eb5b96e479b7d7b4b11ce70233975f9ebb0", "manual_language": "zh", "runtime_verified": false}, "12": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "postgres_fdw_handler"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "29"}, {"label": "\u6570\u636e\u6e90", "value": "\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u626b\u63cf\u6570\u636e\u884c", "callback": "IterateForeignScan", "implementation": "postgresIterateForeignScan"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "INSERT", "callback": "ExecForeignInsert", "implementation": "postgresExecForeignInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "UPDATE", "callback": "ExecForeignUpdate", "implementation": "postgresExecForeignUpdate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "DELETE", "callback": "ExecForeignDelete", "implementation": "postgresExecForeignDelete"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "TRUNCATE", "callback": "ExecForeignTruncate", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u8fde\u63a5\u8def\u5f84\u4e0b\u63a8", "callback": "GetForeignJoinPaths", "implementation": "postgresGetForeignJoinPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u4e0a\u5c42\u8def\u5f84\uff0c\u5305\u62ec\u805a\u5408", "callback": "GetForeignUpperPaths", "implementation": "postgresGetForeignUpperPaths"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u6279\u91cf\u63d2\u5165", "callback": "ExecForeignBatchInsert", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u5f02\u6b65\u8ffd\u52a0\u6267\u884c", "callback": "ForeignAsyncRequest", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5bfc\u5165\u6a21\u5f0f", "callback": "ImportForeignSchema", "implementation": "postgresImportForeignSchema"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "schema_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002"}, {"name": "table_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "column_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "use_remote_estimate", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 postgres_fdw \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b EXPLAIN \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "fdw_startup_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "fdw_tuple_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a 0.01 \u3002"}, {"name": "extensions", "definition": "\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 PostgreSQL \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002 \u4f7f\u7528 extensions \u9009\u9879\u65f6\uff0c \u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002"}, {"name": "fetch_size", "definition": "\u8be5\u9009\u9879\u6307\u5b9a postgres_fdw \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "updatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 INSERT \u3001 UPDATE \u548c DELETE \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c information_schema \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 postgres_fdw \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002"}, {"name": "import_collate", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 COLLATE \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002 \u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a true \uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 COLLATE \"default\" \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002"}, {"name": "import_default", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 DEFAULT \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b nextval() \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_generated", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 GENERATED \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_not_null", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 NOT NULL \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}], "related": [{"url": "/wiki/catalog/pg_foreign_data_wrapper/?v=12", "label": "Foreign-data wrapper \u7cfb\u7edf\u76ee\u5f55"}, {"url": "/e/postgres_fdw/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/plan/foreign-scan/?v=12", "label": "Foreign Scan \u8ba1\u5212\u8282\u70b9"}], "release": {"ref": "PostgreSQL 12.22 source archive", "label": "12.22", "major": "12", "channel": "historical", "revision": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b", "source_url": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/12/postgres-fdw.html", "path": "postgres-fdw.html", "label": "PostgreSQL 12 English manual", "sha256": "5b51447bd97bfb425ea233cbb954dd81e9801ce1b07e3a60ad7a199bf1455cd8", "language": "en", "original_url": "/docs/12/postgres-fdw.html"}, {"url": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "line": 510, "path": "contrib/postgres_fdw/postgres_fdw.c", "label": "contrib/postgres_fdw/postgres_fdw.c:510", "sha256": "b7ef27b1fc1b9487cdef496a198ca00f2e21036ef9acdbd0b14c72f12298807f", "archive_sha256": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406", "paragraphs": ["\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c postgres_fdw \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002", "\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a SERIALIZABLE \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \uff1b\u5426\u5219\u4f7f\u7528 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 SERIALIZABLE \u6216 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e READ COMMITTED \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 PostgreSQL \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002", "\u8bf7\u6ce8\u610f\uff0c postgres_fdw \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002"]}, {"title": "\u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316", "paragraphs": ["postgres_fdw \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 WHERE \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 WHERE \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 extensions \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f IMMUTABLE \u3002\u5bf9\u4e8e UPDATE \u6216 DELETE \u67e5\u8be2\uff0c postgres_fdw \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 WHERE \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 BEFORE \u6216 AFTER \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 CHECK OPTION \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 UPDATE \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001 IMMUTABLE \u64cd\u4f5c\u7b26\u6216 IMMUTABLE \u51fd\u6570\u3002", "\u5f53 postgres_fdw \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 JOIN \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 WHERE \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002", "\u53ef\u4ee5\u4f7f\u7528 EXPLAIN VERBOSE \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002"]}, {"title": "\u8de8\u7248\u672c\u517c\u5bb9\u6027", "paragraphs": ["postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002"]}, {"code": "{\n\tFdwRoutine *routine = makeNode(FdwRoutine);\n\n\t/* Functions for scanning foreign tables */\n\troutine->GetForeignRelSize = postgresGetForeignRelSize;\n\troutine->GetForeignPaths = postgresGetForeignPaths;\n\troutine->GetForeignPlan = postgresGetForeignPlan;\n\troutine->BeginForeignScan = postgresBeginForeignScan;\n\troutine->IterateForeignScan = postgresIterateForeignScan;\n\troutine->ReScanForeignScan = postgresReScanForeignScan;\n\troutine->EndForeignScan = postgresEndForeignScan;\n\n\t/* Functions for updating foreign tables */\n\troutine->AddForeignUpdateTargets = postgresAddForeignUpdateTargets;\n\troutine->PlanForeignModify = postgresPlanForeignModify;\n\troutine->BeginForeignModify = postgresBeginForeignModify;\n\troutine->ExecForeignInsert = postgresExecForeignInsert;\n\troutine->ExecForeignUpdate = postgresExecForeignUpdate;\n\troutine->ExecForeignDelete = postgresExecForeignDelete;\n\troutine->EndForeignModify = postgresEndForeignModify;\n\troutine->BeginForeignInsert = postgresBeginForeignInsert;\n\troutine->EndForeignInsert = postgresEndForeignInsert;\n\troutine->IsForeignRelUpdatable = postgresIsForeignRelUpdatable;\n\troutine->PlanDirectModify = postgresPlanDirectModify;\n\troutine->BeginDirectModify = postgresBeginDirectModify;\n\troutine->IterateDirectModify = postgresIterateDirectModify;\n\troutine->EndDirectModify = postgresEndDirectModify;\n\n\t/* Function for EvalPlanQual rechecks */\n\troutine->RecheckForeignScan = postgresRecheckForeignScan;\n\t/* Support functions for EXPLAIN */\n\troutine->ExplainForeignScan = postgresExplainForeignScan;\n\troutine->ExplainForeignModify = postgresExplainForeignModify;\n\troutine->ExplainDirectModify = postgresExplainDirectModify;\n\n\t/* Support functions for ANALYZE */\n\troutine->AnalyzeForeignTable = postgresAnalyzeForeignTable;\n\n\t/* Support functions for IMPORT FOREIGN SCHEMA */\n\troutine->ImportForeignSchema = postgresImportForeignSchema;\n\n\t/* Support functions for join push-down */\n\troutine->GetForeignJoinPaths = postgresGetForeignJoinPaths;\n\n\t/* Support functions for upper relation push-down */\n\troutine->GetForeignUpperPaths = postgresGetForeignUpperPaths;\n\n\tPG_RETURN_POINTER(routine);\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExplainDirectModify": "postgresExplainDirectModify", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets"}, "description": ["\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002"], "manual_html": "<div class=\"sect1\" id=\"POSTGRES-FDW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">F.33.\u00a0postgres_fdw</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u6a21\u5757\u63d0\u4f9b\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668 <code class=\"literal\">postgres_fdw</code>\uff0c\u53ef\u7528\u4e8e\u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u672c\u6a21\u5757\u63d0\u4f9b\u7684\u529f\u80fd\u4e0e\u8f83\u65e7\u7684<a class=\"xref\" href=\"/docs/12/dblink.html\" title=\"F.10.\u00a0dblink\">dblink</a>\u6a21\u5757\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u91cd\u53e0\u3002\u4f46 <code class=\"filename\">postgres_fdw</code> \u4e3a\u8bbf\u95ee\u8fdc\u7a0b\u8868\u63d0\u4f9b\u4e86\u66f4\u900f\u660e\u4e14\u7b26\u5408\u6807\u51c6\u7684\u8bed\u6cd5\uff0c\u5e76\u4e14\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u6027\u80fd\u66f4\u597d\u3002</p>\n<p lang=\"zh\">\u8981\u51c6\u5907\u901a\u8fc7 <code class=\"filename\">postgres_fdw</code> \u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee\uff1a</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5b89\u88c5 <code class=\"filename\">postgres_fdw</code> \u6269\u5c55\uff0c\u53ef\u4f7f\u7528<a class=\"xref\" href=\"/docs/12/sql-createextension.html\" title=\"CREATE EXTENSION\"><span class=\"refentrytitle\">CREATE EXTENSION</span></a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u4f7f\u7528<a class=\"xref\" href=\"/docs/12/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u5bf9\u8c61\uff0c\u7528\u6765\u8868\u793a\u6bcf\u4e2a\u8981\u8fde\u63a5\u7684\u8fdc\u7a0b\u6570\u636e\u5e93\u3002\u5c06\u9664 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u4e4b\u5916\u7684\u8fde\u63a5\u4fe1\u606f\u6307\u5b9a\u4e3a\u670d\u52a1\u5668\u5bf9\u8c61\u7684\u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u9700\u8981\u83b7\u51c6\u8bbf\u95ee\u5404\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u7528\u6237\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/12/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u521b\u5efa\u7528\u6237\u6620\u5c04\u3002\u5c06\u8981\u4f7f\u7528\u7684\u8fdc\u7a0b\u7528\u6237\u540d\u548c\u5bc6\u7801\u6307\u5b9a\u4e3a\u7528\u6237\u6620\u5c04\u7684 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u8981\u8bbf\u95ee\u7684\u8fdc\u7a0b\u8868\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/12/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u6216<a class=\"xref\" href=\"/docs/12/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5916\u90e8\u8868\u7684\u5217\u5fc5\u987b\u4e0e\u88ab\u5f15\u7528\u7684\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u5728\u5916\u90e8\u8868\u5bf9\u8c61\u7684\u9009\u9879\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8fdc\u7a0b\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0e\u8fdc\u7a0b\u8868\u4e0d\u540c\u7684\u8868\u540d\u548c/\u6216\u5217\u540d\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\">\u73b0\u5728\uff0c\u53ea\u9700\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">SELECT</code>\uff0c\u5373\u53ef\u8bbf\u95ee\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u4e2d\u5b58\u50a8\u7684\u6570\u636e\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code> \u6216 <code class=\"command\">COPY</code> \u4fee\u6539\u8fdc\u7a0b\u8868\u3002\uff08\u5f53\u7136\uff0c\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\u7684\u8fdc\u7a0b\u7528\u6237\u5fc5\u987b\u62e5\u6709\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u6743\u9650\u3002\uff09</p>\n<p lang=\"zh\">postgres_fdw \u76ee\u524d\u4e0d\u652f\u6301\u5e26 ON CONFLICT DO UPDATE \u5b50\u53e5\u7684 INSERT\u3002\u4e0d\u8fc7\uff0c\u652f\u6301 ON CONFLICT DO NOTHING\uff0c\u524d\u63d0\u662f\u4e0d\u6307\u5b9a\u552f\u4e00\u7d22\u5f15\u63a8\u65ad\u6761\u4ef6\u3002postgres_fdw \u8fd8\u652f\u6301\u5728\u5206\u533a\u8868\u4e0a\u6267\u884c UPDATE \u6240\u89e6\u53d1\u7684\u884c\u79fb\u52a8\uff0c\u4f46\u76ee\u524d\u4e0d\u652f\u6301\u4ee5\u4e0b\u60c5\u51b5\uff1a\u7528\u4e8e\u63a5\u6536\u79fb\u5165\u884c\u7684\u8fdc\u7aef\u5206\u533a\uff0c\u540c\u65f6\u4e5f\u662f\u7a0d\u540e\u5c06\u8981\u66f4\u65b0\u7684 UPDATE \u76ee\u6807\u5206\u533a\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5c06\u5916\u90e8\u8868\u7684\u5217\u58f0\u660e\u4e3a\u4e0e\u88ab\u5f15\u7528\u8fdc\u7a0b\u8868\u7684\u5bf9\u5e94\u5217\u5177\u6709\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u5728\u9002\u7528\u65f6\u5177\u6709\u76f8\u540c\u7684\u6392\u5e8f\u89c4\u5219\u3002\u5c3d\u7ba1 <code class=\"filename\">postgres_fdw</code> \u76ee\u524d\u5728\u6309\u9700\u6267\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u9762\u76f8\u5f53\u5bbd\u5bb9\uff0c\u4f46\u5f53\u7c7b\u578b\u6216\u6392\u5e8f\u89c4\u5219\u4e0d\u5339\u914d\u65f6\uff0c\u4ecd\u53ef\u80fd\u51fa\u73b0\u4ee4\u4eba\u610f\u5916\u7684\u8bed\u4e49\u5f02\u5e38\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5bf9\u67e5\u8be2\u6761\u4ef6\u7684\u89e3\u91ca\u53ef\u80fd\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5916\u90e8\u8868\u7684\u58f0\u660e\u53ef\u4ee5\u6bd4\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u5c11\u4e00\u4e9b\u5217\uff0c\u6216\u8005\u4f7f\u7528\u4e0d\u540c\u7684\u5217\u987a\u5e8f\u3002\u4e0e\u8fdc\u7a0b\u8868\u5217\u7684\u5339\u914d\u662f\u6309\u540d\u79f0\u800c\u4e0d\u662f\u6309\u4f4d\u7f6e\u8fdb\u884c\u7684\u3002</p>\n<div class=\"sect2\" id=\"id-1.11.7.42.10\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/12/postgres-fdw.html#id-1.11.7.42.10\">F.33.1. postgres_fdw \u7684 FDW \u9009\u9879</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.1.\u00a0\u8fde\u63a5\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"filename\">postgres_fdw</code>\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e0e<span class=\"application\">libpq</span>\u8fde\u63a5\u5b57\u7b26\u4e32\u6240\u63a5\u53d7\u7684\u76f8\u540c\u9009\u9879\uff0c\u8be6\u89c1<a class=\"xref\" href=\"/docs/12/libpq.html#LIBPQ-PARAMKEYWORDS\" title=\"33.1.2.\u00a0\u53c2\u6570\u5173\u952e\u8bcd\">\u7b2c\u00a033.1.2\u00a0\u8282</a>\uff0c\u4f46\u4ee5\u4e0b\u9009\u9879\u4e0d\u88ab\u5141\u8bb8\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code>\uff08\u5e94\u6539\u4e3a\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">client_encoding</code>\uff08\u4f1a\u6839\u636e\u672c\u5730\u670d\u52a1\u5668\u7f16\u7801\u81ea\u52a8\u8bbe\u7f6e\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">fallback_application_name</code>\uff08\u59cb\u7ec8\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres_fdw</code>\uff09</p>\n</li>\n</ul>\n</div>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u4e0d\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\uff0c\u56e0\u6b64\u5e94\u59cb\u7ec8\u4e3a\u5c5e\u4e8e\u975e\u8d85\u7ea7\u7528\u6237\u7684\u7528\u6237\u6620\u5c04\u6307\u5b9a <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.3\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.2.\u00a0\u5bf9\u8c61\u540d\u79f0\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u9009\u9879\u53ef\u7528\u4e8e\u63a7\u5236\u53d1\u9001\u5230\u8fdc\u7a0b <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u7684 SQL \u8bed\u53e5\u4e2d\u6240\u4f7f\u7528\u7684\u540d\u79f0\u3002\u5f53\u521b\u5efa\u5916\u90e8\u8868\u65f6\u6240\u7528\u7684\u540d\u79f0\u4e0e\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u7684\u540d\u79f0\u4e0d\u540c\u65f6\uff0c\u5c31\u9700\u8981\u8fd9\u4e9b\u9009\u9879\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">schema_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">table_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">column_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.4\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.3.\u00a0\u4ee3\u4ef7\u4f30\u7b97\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u901a\u8fc7\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u67e5\u8be2\u6765\u83b7\u53d6\u8fdc\u7a0b\u6570\u636e\uff0c\u56e0\u6b64\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u626b\u63cf\u5916\u90e8\u8868\u7684\u4f30\u8ba1\u4ee3\u4ef7\u5e94\u5f53\u7b49\u4e8e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b8c\u6210\u8be5\u64cd\u4f5c\u7684\u4ee3\u4ef7\uff0c\u518d\u52a0\u4e0a\u4e00\u4e9b\u901a\u4fe1\u5f00\u9500\u3002\u83b7\u5f97\u8fd9\u79cd\u4f30\u7b97\u6700\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u662f\u5411\u8fdc\u7a0b\u670d\u52a1\u5668\u8be2\u95ee\uff0c\u518d\u628a\u5f00\u9500\u52a0\u4e0a\u53bb\uff1b\u4f46\u5bf9\u4e8e\u7b80\u5355\u67e5\u8be2\uff0c\u4e3a\u4e86\u53d6\u5f97\u4ee3\u4ef7\u4f30\u7b97\u800c\u989d\u5916\u53d1\u9001\u4e00\u6b21\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ef\u80fd\u5e76\u4e0d\u5212\u7b97\u3002\u56e0\u6b64 <code class=\"filename\">postgres_fdw</code> \u63d0\u4f9b\u4ee5\u4e0b\u9009\u9879\u6765\u63a7\u5236\u4ee3\u4ef7\u4f30\u7b97\u7684\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">use_remote_estimate</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b <code class=\"command\">EXPLAIN</code> \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_startup_cost</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_tuple_cost</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">0.01</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u771f\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4ece\u8fdc\u7a0b\u670d\u52a1\u5668\u83b7\u53d6\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u5047\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u5728\u672c\u5730\u6267\u884c\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u518d\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u9664\u975e\u6709\u8fdc\u7a0b\u8868\u7edf\u8ba1\u4fe1\u606f\u7684\u672c\u5730\u526f\u672c\u53ef\u7528\uff0c\u5426\u5219\u8fd9\u79cd\u672c\u5730\u4f30\u7b97\u4e0d\u592a\u53ef\u80fd\u975e\u5e38\u51c6\u786e\u3002\u66f4\u65b0\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c\u662f\u5728\u5916\u90e8\u8868\u4e0a\u8fd0\u884c<a class=\"xref\" href=\"/docs/12/sql-analyze.html\" title=\"ANALYZE\"><span class=\"refentrytitle\">ANALYZE</span></a>\uff1b\u8fd9\u6837\u4f1a\u626b\u63cf\u8fdc\u7a0b\u8868\uff0c\u7136\u540e\u50cf\u5bf9\u5f85\u672c\u5730\u8868\u4e00\u6837\u8ba1\u7b97\u5e76\u5b58\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u4fdd\u7559\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u8fdc\u7a0b\u8868\u6bcf\u6b21\u67e5\u8be2\u7684\u89c4\u5212\u5f00\u9500\uff1b\u4f46\u5982\u679c\u8fdc\u7a0b\u8868\u7ecf\u5e38\u66f4\u65b0\uff0c\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u5f88\u5feb\u5c31\u4f1a\u8fc7\u65f6\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.5\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.4.\u00a0\u8fdc\u7a0b\u6267\u884c\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709\u4f7f\u7528\u5185\u7f6e\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u624d\u4f1a\u88ab\u8003\u8651\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u3002\u6d89\u53ca\u975e\u5185\u7f6e\u51fd\u6570\u7684\u5b50\u53e5\u4f1a\u5728\u53d6\u56de\u884c\u4e4b\u540e\u5728\u672c\u5730\u68c0\u67e5\u3002\u5982\u679c\u8fd9\u4e9b\u51fd\u6570\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e5f\u53ef\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fe1\u5176\u7ed3\u679c\u4e0e\u672c\u5730\u76f8\u540c\uff0c\u5219\u5c06\u8fd9\u7c7b <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u7aef\u6267\u884c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u6b64\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">extensions</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 <span class=\"productname\">PostgreSQL</span> \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"literal\">extensions</code> \u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fetch_size</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.6\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.5.\u00a0\u53ef\u66f4\u65b0\u6027\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u66f4\u65b0\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">updatable</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u548c <code class=\"command\">DELETE</code> \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c<code class=\"literal\">information_schema</code> \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.7\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.6.\u00a0\u5bfc\u5165\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/12/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u5bfc\u5165\u5916\u90e8\u8868\u5b9a\u4e49\u3002\u8be5\u547d\u4ee4\u4f1a\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4ee5\u5339\u914d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868\u6216\u89c6\u56fe\u3002\u5982\u679c\u8981\u5bfc\u5165\u7684\u8fdc\u7a0b\u8868\u5217\u4f7f\u7528\u7528\u6237\u5b9a\u4e49\u6570\u636e\u7c7b\u578b\uff0c\u5219\u672c\u5730\u670d\u52a1\u5668\u5fc5\u987b\u5b58\u5728\u540c\u540d\u4e14\u517c\u5bb9\u7684\u7c7b\u578b\u3002</p>\n<p lang=\"zh\">\u53ef\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\uff08\u5728 <code class=\"command\">IMPORT FOREIGN SCHEMA</code> \u547d\u4ee4\u4e2d\u7ed9\u51fa\uff09\u81ea\u5b9a\u4e49\u5bfc\u5165\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">import_collate</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">COLLATE</code> \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a <code class=\"literal\">true</code>\uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 <code class=\"literal\">COLLATE \"default\"</code> \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_default</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">DEFAULT</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b<code class=\"function\">nextval()</code> \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_generated</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">GENERATED</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_not_null</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">NOT NULL</code> \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u9664 <code class=\"literal\">NOT NULL</code> \u4e4b\u5916\u7684\u7ea6\u675f\u6c38\u8fdc\u4e0d\u4f1a\u4ece\u8fdc\u7a0b\u8868\u5bfc\u5165\u3002\u867d\u7136 <span class=\"productname\">PostgreSQL</span> \u786e\u5b9e\u652f\u6301\u5728\u5916\u90e8\u8868\u4e0a\u5b9a\u4e49 <code class=\"literal\">CHECK</code> \u7ea6\u675f\uff0c\u4f46\u7531\u4e8e\u7ea6\u675f\u8868\u8fbe\u5f0f\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u6c42\u503c\u4e0d\u540c\uff0c\u7cfb\u7edf\u4e0d\u4f1a\u81ea\u52a8\u5bfc\u5165\u5b83\u4eec\u3002\u6b64\u7c7b\u884c\u4e3a\u4e0d\u4e00\u81f4\u7684<code class=\"literal\">CHECK</code> \u7ea6\u675f\uff0c\u53ef\u80fd\u5bfc\u81f4\u67e5\u8be2\u4f18\u5316\u4e2d\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5e0c\u671b\u5bfc\u5165<code class=\"literal\">CHECK</code> \u7ea6\u675f\uff0c\u5fc5\u987b\u624b\u5de5\u5b8c\u6210\uff0c\u5e76\u5e94\u4ed4\u7ec6\u6838\u5b9e\u6bcf\u4e00\u4e2a\u7ea6\u675f\u7684\u8bed\u4e49\u3002\u6709\u5173\u5916\u90e8\u8868\u4e0a<code class=\"literal\">CHECK</code> \u7ea6\u675f\u5904\u7406\u65b9\u5f0f\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/12/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u3002</p>\n<p lang=\"zh\">\u4f5c\u4e3a\u5176\u4ed6\u8868\u5206\u533a\u7684\u8868\u6216\u5916\u90e8\u8868\u4f1a\u88ab\u81ea\u52a8\u6392\u9664\u3002\u5206\u533a\u8868\u4f1a\u88ab\u5bfc\u5165\uff0c\u9664\u975e\u5b83\u672c\u8eab\u4e5f\u662f\u5176\u4ed6\u8868\u7684\u5206\u533a\u3002\u7531\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u901a\u8fc7\u4f5c\u4e3a\u5206\u533a\u5c42\u6b21\u6839\u7684\u5206\u533a\u8868\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ea\u5bfc\u5165\u5206\u533a\u8868\u5373\u53ef\u8bbf\u95ee\u5168\u90e8\u6570\u636e\uff0c\u800c\u65e0\u9700\u521b\u5efa\u989d\u5916\u5bf9\u8c61\u3002</p>\n</div>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.11\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/12/postgres-fdw.html#id-1.11.7.42.11\">F.33.2. \u8fde\u63a5\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u5728\u9996\u6b21\u6267\u884c\u4f7f\u7528\u4e0e\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u5173\u8054\u7684\u5916\u90e8\u8868\u7684\u67e5\u8be2\u65f6\uff0c\u4f1a\u5efa\u7acb\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002\u8be5\u8fde\u63a5\u4f1a\u5728\u540c\u4e00\u4f1a\u8bdd\u4e2d\u4fdd\u7559\u5e76\u4f9b\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u3002\u5982\u679c\u4f7f\u7528\u591a\u4e2a\u7528\u6237\u6807\u8bc6\uff08\u7528\u6237\u6620\u5c04\uff09\u8bbf\u95ee\u8be5\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u4f1a\u4e3a\u6bcf\u4e2a\u7528\u6237\u6620\u5c04\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.12\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/12/postgres-fdw.html#id-1.11.7.42.12\">F.33.3. \u4e8b\u52a1\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c<code class=\"filename\">postgres_fdw</code> \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002</p>\n<p lang=\"zh\">\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a <code class=\"literal\">SERIALIZABLE</code> \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code>\uff1b\u5426\u5219\u4f7f\u7528 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code> \u6216 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e <code class=\"literal\">READ COMMITTED</code> \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 <span class=\"productname\">PostgreSQL</span> \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c<code class=\"filename\">postgres_fdw</code> \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.13\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/12/postgres-fdw.html#id-1.11.7.42.13\">F.33.4. \u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 <code class=\"literal\">extensions</code> \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f <code class=\"literal\">IMMUTABLE</code>\u3002\u5bf9\u4e8e <code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u67e5\u8be2\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 <code class=\"literal\">BEFORE</code> \u6216 <code class=\"literal\">AFTER</code> \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 <code class=\"literal\">CHECK OPTION</code> \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 <code class=\"command\">UPDATE</code> \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001<code class=\"literal\">IMMUTABLE</code> \u64cd\u4f5c\u7b26\u6216 <code class=\"literal\">IMMUTABLE</code> \u51fd\u6570\u3002</p>\n<p lang=\"zh\">\u5f53 <code class=\"filename\">postgres_fdw</code> \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 <code class=\"literal\">JOIN</code> \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">EXPLAIN VERBOSE</code> \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.14\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/12/postgres-fdw.html#id-1.11.7.42.14\">F.33.5. \u8fdc\u7a0b\u67e5\u8be2\u6267\u884c\u73af\u5883</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728 <code class=\"filename\">postgres_fdw</code> \u6253\u5f00\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u4e2d\uff0c<a class=\"xref\" href=\"/docs/12/runtime-config-client.html#GUC-SEARCH-PATH\">search_path</a>\u53c2\u6570\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u5305\u542b <code class=\"literal\">pg_catalog</code>\uff0c\u8fd9\u6837\u65e0\u9700\u6a21\u5f0f\u9650\u5b9a\u5c31\u53ea\u80fd\u770b\u5230\u5185\u7f6e\u5bf9\u8c61\u3002\u8fd9\u5bf9 <code class=\"filename\">postgres_fdw</code> \u81ea\u8eab\u751f\u6210\u7684\u67e5\u8be2\u4e0d\u662f\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u603b\u662f\u63d0\u4f9b\u8fd9\u79cd\u9650\u5b9a\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bf9\u90a3\u4e9b\u901a\u8fc7\u8fdc\u7a0b\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u6216\u89c4\u5219\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u51fd\u6570\u5e26\u6765\u98ce\u9669\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u89c6\u56fe\uff0c\u5219\u8be5\u89c6\u56fe\u4e2d\u4f7f\u7528\u7684\u4efb\u4f55\u51fd\u6570\u90fd\u4f1a\u5728\u53d7\u9650\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u6267\u884c\u3002\u5efa\u8bae\u5728\u8fd9\u7c7b\u51fd\u6570\u4e2d\u5bf9\u6240\u6709\u540d\u79f0\u90fd\u5199\u6210\u5e26\u6a21\u5f0f\u9650\u5b9a\u7684\u5f62\u5f0f\uff0c\u6216\u8005\u4e3a\u8fd9\u7c7b\u51fd\u6570\u9644\u52a0 <code class=\"literal\">SET search_path</code> \u9009\u9879\uff08\u89c1<a class=\"xref\" href=\"/docs/12/sql-createfunction.html\" title=\"CREATE FUNCTION\"><span class=\"refentrytitle\">CREATE FUNCTION</span></a>\uff09\uff0c\u4ee5\u5efa\u7acb\u5176\u9884\u671f\u7684\u641c\u7d22\u8def\u5f84\u73af\u5883\u3002</p>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u8fd8\u4f1a\u4e3a\u8fdc\u7a0b\u4f1a\u8bdd\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/12/runtime-config-client.html#GUC-TIMEZONE\">TimeZone</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">UTC</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/12/runtime-config-client.html#GUC-DATESTYLE\">DateStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">ISO</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/12/runtime-config-client.html#GUC-INTERVALSTYLE\">IntervalStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\u5bf9\u4e8e 9.0 \u53ca\u66f4\u65b0\u7248\u672c\u7684\u8fdc\u7aef\u670d\u52a1\u5668\uff0cextra_float_digits \u8bbe\u4e3a 3\uff1b\u66f4\u65e9\u7248\u672c\u5219\u8bbe\u4e3a 2\u3002</li>\n</ul>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u8bbe\u7f6e\u901a\u5e38\u4e0d\u50cf <code class=\"varname\">search_path</code> \u90a3\u6837\u5bb9\u6613\u51fa\u95ee\u9898\uff0c\u4f46\u5982\u679c\u6709\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684 <code class=\"literal\">SET</code> \u9009\u9879\u5904\u7406\u3002</p>\n<p lang=\"zh\"><span class=\"emphasis\"><em>\u4e0d</em></span>\u5efa\u8bae\u901a\u8fc7\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u7684\u4f1a\u8bdd\u7ea7\u8bbe\u7f6e\u6765\u8986\u76d6\u8fd9\u79cd\u884c\u4e3a\uff1b\u8fd9\u5f88\u53ef\u80fd\u5bfc\u81f4 <code class=\"filename\">postgres_fdw</code> \u5de5\u4f5c\u5f02\u5e38\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.15\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/12/postgres-fdw.html#id-1.11.7.42.15\">F.33.6. \u8de8\u7248\u672c\u517c\u5bb9\u6027</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.16\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/12/postgres-fdw.html#id-1.11.7.42.16\">F.33.7. \u793a\u4f8b</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4e0b\u9762\u662f\u4f7f\u7528 <code class=\"literal\">postgres_fdw</code> \u521b\u5efa\u5916\u90e8\u8868\u7684\u4e00\u4e2a\u793a\u4f8b\u3002\u9996\u5148\u5b89\u88c5\u6269\u5c55\uff1a</p>\n<pre class=\"programlisting\">CREATE EXTENSION postgres_fdw;\n</pre>\n<p lang=\"zh\">\u7136\u540e\u4f7f\u7528<a class=\"xref\" href=\"/docs/12/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8fde\u63a5\u5230\u4e00\u53f0 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\uff0c\u5b83\u8fd0\u884c\u5728\u4e3b\u673a <code class=\"literal\">192.83.123.89</code> \u4e0a\u5e76\u76d1\u542c <code class=\"literal\">5432</code> \u7aef\u53e3\u3002\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"literal\">foreign_db</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER foreign_server\n        FOREIGN DATA WRAPPER postgres_fdw\n        OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');\n</pre>\n<p lang=\"zh\">\u8fd8\u9700\u8981\u7528<a class=\"xref\" href=\"/docs/12/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u5b9a\u4e49\u4e00\u4e2a\u7528\u6237\u6620\u5c04\uff0c\u4ee5\u6807\u8bc6\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u54ea\u4e2a\u89d2\u8272\uff1a</p>\n<pre class=\"programlisting\">CREATE USER MAPPING FOR local_user\n        SERVER foreign_server\n        OPTIONS (user 'foreign_user', password 'password');\n</pre>\n<p lang=\"zh\">\u73b0\u5728\u53ef\u4ee5\u901a\u8fc7<a class=\"xref\" href=\"/docs/12/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5728\u672c\u4f8b\u4e2d\uff0c\u8981\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868<code class=\"structname\">some_schema.some_table</code>\uff0c\u5176\u672c\u5730\u540d\u79f0\u4e3a<code class=\"structname\">foreign_table</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE FOREIGN TABLE foreign_table (\n        id integer NOT NULL,\n        data text\n)\n        SERVER foreign_server\n        OPTIONS (schema_name 'some_schema', table_name 'some_table');\n</pre>\n<p lang=\"zh\">\u5fc5\u987b\u786e\u4fdd\u5728<code class=\"command\">CREATE FOREIGN TABLE</code>\u4e2d\u58f0\u660e\u7684\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u5176\u4ed6\u5c5e\u6027\uff0c\u4e0e\u5b9e\u9645\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u5217\u540d\u4e5f\u5fc5\u987b\u5339\u914d\uff0c\u9664\u975e\u4e3a\u5404\u5217\u9644\u52a0<code class=\"literal\">column_name</code>\u9009\u9879\uff0c\u6307\u660e\u5b83\u4eec\u5728\u8fdc\u7a0b\u8868\u4e2d\u7684\u540d\u79f0\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/12/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u4f18\u4e8e\u624b\u5de5\u6784\u9020\u5916\u90e8\u8868\u5b9a\u4e49\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.17\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/12/postgres-fdw.html#id-1.11.7.42.17\">F.33.8. \u4f5c\u8005</a></span></h3>\n</div>\n</div>\n</div>\n<p>Shigeru Hanada <code class=\"email\">&lt;<a class=\"email\" href=\"mailto:shigeru.hanada@gmail.com\">shigeru.hanada@gmail.com</a>&gt;</code></p>\n</div>\n</div>", "manual_path": "/docs/12/postgres-fdw.html", "localization": {"status": "complete", "sources": [{"url": "/docs/12/postgres-fdw.html", "method": "same-major semantic node", "sha256": "0a5aa6b79cd39c46703d0163dcbcefa0f107b7b4c77c22c9cefd861d8407080b", "language": "zh", "matched_nodes": ["#POSTGRES-FDW/div[11]/div[1]/div[0]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[11]/div[1]/p[1]", "#POSTGRES-FDW/div[11]/div[1]/p[3]", "#POSTGRES-FDW/div[11]/div[2]/div[0]", "#POSTGRES-FDW/div[11]/div[2]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[2]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[2]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[11]/div[2]/p[1]", "#POSTGRES-FDW/div[11]/div[3]/div[0]", "#POSTGRES-FDW/div[11]/div[3]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[3]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[3]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[11]/div[3]/p[1]", "#POSTGRES-FDW/div[11]/div[3]/p[3]", "#POSTGRES-FDW/div[11]/div[4]/div[0]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[4]/p[1]", "#POSTGRES-FDW/div[11]/div[5]/div[0]", "#POSTGRES-FDW/div[11]/div[5]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[11]/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[11]/div[5]/p[1]", "#POSTGRES-FDW/div[11]/div[6]/div[0]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[5]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[7]", "#POSTGRES-FDW/div[11]/div[6]/p[1]", "#POSTGRES-FDW/div[11]/div[6]/p[2]", "#POSTGRES-FDW/div[11]/div[6]/p[4]", "#POSTGRES-FDW/div[11]/div[6]/p[5]", "#POSTGRES-FDW/div[12]/p[1]", "#POSTGRES-FDW/div[13]/p[1]", "#POSTGRES-FDW/div[13]/p[2]", "#POSTGRES-FDW/div[13]/p[3]", "#POSTGRES-FDW/div[14]/p[1]", "#POSTGRES-FDW/div[14]/p[2]", "#POSTGRES-FDW/div[14]/p[3]", "#POSTGRES-FDW/div[15]/div[3]/ul[0]/li[0]", "#POSTGRES-FDW/div[15]/div[3]/ul[0]/li[1]", "#POSTGRES-FDW/div[15]/div[3]/ul[0]/li[2]", "#POSTGRES-FDW/div[15]/p[1]", "#POSTGRES-FDW/div[15]/p[2]", "#POSTGRES-FDW/div[15]/p[4]", "#POSTGRES-FDW/div[15]/p[5]", "#POSTGRES-FDW/div[17]/p[1]", "#POSTGRES-FDW/div[17]/p[3]", "#POSTGRES-FDW/div[17]/p[5]", "#POSTGRES-FDW/div[17]/p[7]", "#POSTGRES-FDW/div[17]/p[9]", "#POSTGRES-FDW/div[1]/dl[0]/dt[0]", "#POSTGRES-FDW/div[1]/dl[0]/dt[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[4]", "#POSTGRES-FDW/div[1]/dl[0]/dt[5]", "#POSTGRES-FDW/div[1]/dl[0]/dt[6]", "#POSTGRES-FDW/div[1]/dl[0]/dt[7]", "#POSTGRES-FDW/div[6]/ol[0]/li[0]", "#POSTGRES-FDW/div[6]/ol[0]/li[1]", "#POSTGRES-FDW/div[6]/ol[0]/li[2]", "#POSTGRES-FDW/div[6]/ol[0]/li[3]", "#POSTGRES-FDW/p[10]", "#POSTGRES-FDW/p[3]", "#POSTGRES-FDW/p[4]", "#POSTGRES-FDW/p[5]", "#POSTGRES-FDW/p[7]", "#POSTGRES-FDW/p[9]"]}], "language": "zh", "original_text": {"/versions/12/description/0": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/versions/12/facts/0/label": "Interface family", "/versions/12/facts/0/value": "Foreign-data wrapper", "/versions/12/facts/1/label": "Handler or routine", "/versions/12/facts/2/label": "Recorded callbacks", "/versions/12/facts/3/label": "Data source", "/versions/12/facts/3/value": "Remote PostgreSQL servers", "/versions/12/tables/0/title": "Registered interface handlers", "/versions/12/tables/1/title": "Documented options", "/versions/12/related/0/label": "Foreign-data wrapper catalog", "/versions/12/related/1/label": "Existing extension catalogue identity", "/versions/12/related/2/label": "Foreign Scan plan node", "/versions/12/sections/0/title": "Interface and capability boundaries", "/versions/12/sections/1/title": "Transaction Management", "/versions/12/sections/2/title": "Remote Query Optimization", "/versions/12/sections/3/title": "Cross-Version Compatibility", "/versions/12/sections/4/title": "Registered implementation in core source", "/versions/12/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/12/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/12/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/12/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/12/tables/0/rows/4/state": "No handler registered in this build", "/versions/12/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/12/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/12/tables/0/rows/7/state": "No handler registered in this build", "/versions/12/tables/0/rows/8/state": "No handler registered in this build", "/versions/12/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/12/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/12/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/12/sections/1/paragraphs/0": "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints.", "/versions/12/sections/1/paragraphs/1": "The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local transaction uses SERIALIZABLE or REPEATABLE READ isolation level, but it might be surprising for a READ COMMITTED local transaction. A future PostgreSQL release might modify these rules.", "/versions/12/sections/1/paragraphs/2": "Note that it is currently not supported by postgres_fdw to prepare the remote transaction for two-phase commit.", "/versions/12/sections/2/paragraphs/0": "postgres_fdw attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by sending query WHERE clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, WHERE clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an extension that's listed in the foreign server's extensions option. Operators and functions in such clauses must be IMMUTABLE as well. For an UPDATE or DELETE query, postgres_fdw attempts to optimize the query execution by sending the whole query to the remote server if there are no query WHERE clauses that cannot be sent to the remote server, no local joins for the query, no row-level local BEFORE or AFTER triggers or stored generated columns on the target table, and no CHECK OPTION constraints from parent views. In UPDATE , expressions to assign to target columns must use only built-in data types, IMMUTABLE operators, or IMMUTABLE functions, to reduce the risk of misexecution of the query.", "/versions/12/sections/2/paragraphs/1": "When postgres_fdw encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved are subject to different user mappings. While sending the JOIN clauses, it takes the same precautions as mentioned above for the WHERE clauses.", "/versions/12/sections/2/paragraphs/2": "The query that is actually sent to the remote server for execution can be examined using EXPLAIN VERBOSE .", "/versions/12/sections/3/paragraphs/0": "postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1. A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent to it for execution, resulting in \u201c function does not exist \u201d or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table reference in a sub- SELECT with OFFSET 0 as an optimization fence, and placing the problematic function or operator outside the sub- SELECT .", "/versions/12/tables/0/rows/0/feature": "Scan rows", "/versions/12/tables/0/rows/5/feature": "Join path pushdown", "/versions/12/tables/0/rows/6/feature": "Upper paths, including aggregation", "/versions/12/tables/0/rows/7/feature": "Batch insert", "/versions/12/tables/0/rows/8/feature": "Asynchronous append execution", "/versions/12/tables/0/rows/9/feature": "Import schema", "/versions/12/tables/0/columns/0/label": "Interface operation", "/versions/12/tables/0/columns/1/label": "Source observation", "/versions/12/tables/0/columns/2/label": "Callback", "/versions/12/tables/0/columns/3/label": "Implementation", "/versions/12/tables/1/columns/0/label": "Option", "/versions/12/tables/1/columns/1/label": "Same-version definition", "/versions/12/tables/1/rows/0/definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used.", "/versions/12/tables/1/rows/1/definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used.", "/versions/12/tables/1/rows/2/definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used.", "/versions/12/tables/1/rows/3/definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false .", "/versions/12/tables/1/rows/4/definition": "This option, which can be specified for a foreign server, is a numeric value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 .", "/versions/12/tables/1/rows/5/definition": "This option, which can be specified for a foreign server, is a numeric value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 .", "/versions/12/tables/1/rows/6/definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.", "/versions/12/tables/1/rows/7/definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 .", "/versions/12/tables/1/rows/8/definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server.", "/versions/12/tables/1/rows/9/definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different.", "/versions/12/tables/1/rows/10/definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally.", "/versions/12/tables/1/rows/11/definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally.", "/versions/12/tables/1/rows/12/definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true .", "/versions/12/tables/0/rows/4/implementation": "Not registered", "/versions/12/tables/0/rows/7/implementation": "Not registered", "/versions/12/tables/0/rows/8/implementation": "Not registered"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "270ab3fd276428d093bb99dbf9d5aa98600efaf96e87e8ea16ba1127b167b1c2"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "schema_name", "definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used."}, {"name": "table_name", "definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used."}, {"name": "column_name", "definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used."}, {"name": "use_remote_estimate", "definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false ."}, {"name": "fdw_startup_cost", "definition": "This option, which can be specified for a foreign server, is a numeric value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 ."}, {"name": "fdw_tuple_cost", "definition": "This option, which can be specified for a foreign server, is a numeric value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 ."}, {"name": "extensions", "definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly."}, {"name": "fetch_size", "definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 ."}, {"name": "updatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server."}, {"name": "import_collate", "definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different."}, {"name": "import_default", "definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally."}, {"name": "import_generated", "definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally."}, {"name": "import_not_null", "definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true ."}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExplainDirectModify": "postgresExplainDirectModify", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets"}, "source_options": [], "protocol_versions": {}}, "comparison_hash": "871fd9c664077a02a0b6c9abd2a1bf0cc3d5614a0c9cdae3f7b6c2f325db8ebb", "manual_language": "zh", "runtime_verified": false}, "13": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "postgres_fdw_handler"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "29"}, {"label": "\u6570\u636e\u6e90", "value": "\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u626b\u63cf\u6570\u636e\u884c", "callback": "IterateForeignScan", "implementation": "postgresIterateForeignScan"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "INSERT", "callback": "ExecForeignInsert", "implementation": "postgresExecForeignInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "UPDATE", "callback": "ExecForeignUpdate", "implementation": "postgresExecForeignUpdate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "DELETE", "callback": "ExecForeignDelete", "implementation": "postgresExecForeignDelete"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "TRUNCATE", "callback": "ExecForeignTruncate", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u8fde\u63a5\u8def\u5f84\u4e0b\u63a8", "callback": "GetForeignJoinPaths", "implementation": "postgresGetForeignJoinPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u4e0a\u5c42\u8def\u5f84\uff0c\u5305\u62ec\u805a\u5408", "callback": "GetForeignUpperPaths", "implementation": "postgresGetForeignUpperPaths"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u6279\u91cf\u63d2\u5165", "callback": "ExecForeignBatchInsert", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u6b64\u6784\u5efa\u672a\u6ce8\u518c\u5904\u7406\u51fd\u6570", "feature": "\u5f02\u6b65\u8ffd\u52a0\u6267\u884c", "callback": "ForeignAsyncRequest", "implementation": "\u672a\u767b\u8bb0"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5bfc\u5165\u6a21\u5f0f", "callback": "ImportForeignSchema", "implementation": "postgresImportForeignSchema"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "schema_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002"}, {"name": "table_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "column_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "use_remote_estimate", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 postgres_fdw \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b EXPLAIN \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "fdw_startup_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "fdw_tuple_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a 0.01 \u3002"}, {"name": "extensions", "definition": "\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 PostgreSQL \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002 \u4f7f\u7528 extensions \u9009\u9879\u65f6\uff0c \u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002"}, {"name": "fetch_size", "definition": "\u8be5\u9009\u9879\u6307\u5b9a postgres_fdw \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "updatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 INSERT \u3001 UPDATE \u548c DELETE \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c information_schema \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 postgres_fdw \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002"}, {"name": "import_collate", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 COLLATE \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002 \u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a true \uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 COLLATE \"default\" \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002"}, {"name": "import_default", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 DEFAULT \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b nextval() \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_generated", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 GENERATED \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_not_null", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 NOT NULL \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}], "related": [{"url": "/wiki/catalog/pg_foreign_data_wrapper/?v=13", "label": "Foreign-data wrapper \u7cfb\u7edf\u76ee\u5f55"}, {"url": "/e/postgres_fdw/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/plan/foreign-scan/?v=13", "label": "Foreign Scan \u8ba1\u5212\u8282\u70b9"}], "release": {"ref": "PostgreSQL 13.23 source archive", "label": "13.23", "major": "13", "channel": "historical", "revision": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6", "source_url": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/13/postgres-fdw.html", "path": "postgres-fdw.html", "label": "PostgreSQL 13 English manual", "sha256": "b5903b880f7181d861f6e66be0880adfcc5ca88233c5efd39bf2be3921ebc635", "language": "en", "original_url": "/docs/13/postgres-fdw.html"}, {"url": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "line": 513, "path": "contrib/postgres_fdw/postgres_fdw.c", "label": "contrib/postgres_fdw/postgres_fdw.c:513", "sha256": "d673f22c777e76b736ba45afdc5bb80f99181434d4c4c030081d50a785d5ce93", "archive_sha256": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406", "paragraphs": ["\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c postgres_fdw \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002", "\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a SERIALIZABLE \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \uff1b\u5426\u5219\u4f7f\u7528 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 SERIALIZABLE \u6216 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e READ COMMITTED \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 PostgreSQL \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002", "\u8bf7\u6ce8\u610f\uff0c postgres_fdw \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002"]}, {"title": "\u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316", "paragraphs": ["postgres_fdw \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 WHERE \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 WHERE \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 extensions \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f IMMUTABLE \u3002\u5bf9\u4e8e UPDATE \u6216 DELETE \u67e5\u8be2\uff0c postgres_fdw \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 WHERE \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 BEFORE \u6216 AFTER \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 CHECK OPTION \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 UPDATE \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001 IMMUTABLE \u64cd\u4f5c\u7b26\u6216 IMMUTABLE \u51fd\u6570\u3002", "\u5f53 postgres_fdw \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 JOIN \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 WHERE \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002", "\u53ef\u4ee5\u4f7f\u7528 EXPLAIN VERBOSE \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002"]}, {"title": "\u8de8\u7248\u672c\u517c\u5bb9\u6027", "paragraphs": ["postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002"]}, {"code": "{\n\tFdwRoutine *routine = makeNode(FdwRoutine);\n\n\t/* Functions for scanning foreign tables */\n\troutine->GetForeignRelSize = postgresGetForeignRelSize;\n\troutine->GetForeignPaths = postgresGetForeignPaths;\n\troutine->GetForeignPlan = postgresGetForeignPlan;\n\troutine->BeginForeignScan = postgresBeginForeignScan;\n\troutine->IterateForeignScan = postgresIterateForeignScan;\n\troutine->ReScanForeignScan = postgresReScanForeignScan;\n\troutine->EndForeignScan = postgresEndForeignScan;\n\n\t/* Functions for updating foreign tables */\n\troutine->AddForeignUpdateTargets = postgresAddForeignUpdateTargets;\n\troutine->PlanForeignModify = postgresPlanForeignModify;\n\troutine->BeginForeignModify = postgresBeginForeignModify;\n\troutine->ExecForeignInsert = postgresExecForeignInsert;\n\troutine->ExecForeignUpdate = postgresExecForeignUpdate;\n\troutine->ExecForeignDelete = postgresExecForeignDelete;\n\troutine->EndForeignModify = postgresEndForeignModify;\n\troutine->BeginForeignInsert = postgresBeginForeignInsert;\n\troutine->EndForeignInsert = postgresEndForeignInsert;\n\troutine->IsForeignRelUpdatable = postgresIsForeignRelUpdatable;\n\troutine->PlanDirectModify = postgresPlanDirectModify;\n\troutine->BeginDirectModify = postgresBeginDirectModify;\n\troutine->IterateDirectModify = postgresIterateDirectModify;\n\troutine->EndDirectModify = postgresEndDirectModify;\n\n\t/* Function for EvalPlanQual rechecks */\n\troutine->RecheckForeignScan = postgresRecheckForeignScan;\n\t/* Support functions for EXPLAIN */\n\troutine->ExplainForeignScan = postgresExplainForeignScan;\n\troutine->ExplainForeignModify = postgresExplainForeignModify;\n\troutine->ExplainDirectModify = postgresExplainDirectModify;\n\n\t/* Support functions for ANALYZE */\n\troutine->AnalyzeForeignTable = postgresAnalyzeForeignTable;\n\n\t/* Support functions for IMPORT FOREIGN SCHEMA */\n\troutine->ImportForeignSchema = postgresImportForeignSchema;\n\n\t/* Support functions for join push-down */\n\troutine->GetForeignJoinPaths = postgresGetForeignJoinPaths;\n\n\t/* Support functions for upper relation push-down */\n\troutine->GetForeignUpperPaths = postgresGetForeignUpperPaths;\n\n\tPG_RETURN_POINTER(routine);\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExplainDirectModify": "postgresExplainDirectModify", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets"}, "description": ["\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002"], "manual_html": "<div class=\"sect1\" id=\"POSTGRES-FDW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">F.33.\u00a0postgres_fdw</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u6a21\u5757\u63d0\u4f9b\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668 <code class=\"literal\">postgres_fdw</code>\uff0c\u53ef\u7528\u4e8e\u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u672c\u6a21\u5757\u63d0\u4f9b\u7684\u529f\u80fd\u4e0e\u8f83\u65e7\u7684<a class=\"xref\" href=\"/docs/13/dblink.html\" title=\"F.10.\u00a0dblink\">dblink</a>\u6a21\u5757\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u91cd\u53e0\u3002\u4f46 <code class=\"filename\">postgres_fdw</code> \u4e3a\u8bbf\u95ee\u8fdc\u7a0b\u8868\u63d0\u4f9b\u4e86\u66f4\u900f\u660e\u4e14\u7b26\u5408\u6807\u51c6\u7684\u8bed\u6cd5\uff0c\u5e76\u4e14\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u6027\u80fd\u66f4\u597d\u3002</p>\n<p lang=\"zh\">\u8981\u51c6\u5907\u901a\u8fc7 <code class=\"filename\">postgres_fdw</code> \u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee\uff1a</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5b89\u88c5 <code class=\"filename\">postgres_fdw</code> \u6269\u5c55\uff0c\u53ef\u4f7f\u7528<a class=\"xref\" href=\"/docs/13/sql-createextension.html\" title=\"CREATE EXTENSION\"><span class=\"refentrytitle\">CREATE EXTENSION</span></a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u4f7f\u7528<a class=\"xref\" href=\"/docs/13/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u5bf9\u8c61\uff0c\u7528\u6765\u8868\u793a\u6bcf\u4e2a\u8981\u8fde\u63a5\u7684\u8fdc\u7a0b\u6570\u636e\u5e93\u3002\u5c06\u9664 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u4e4b\u5916\u7684\u8fde\u63a5\u4fe1\u606f\u6307\u5b9a\u4e3a\u670d\u52a1\u5668\u5bf9\u8c61\u7684\u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u9700\u8981\u83b7\u51c6\u8bbf\u95ee\u5404\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u7528\u6237\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/13/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u521b\u5efa\u7528\u6237\u6620\u5c04\u3002\u5c06\u8981\u4f7f\u7528\u7684\u8fdc\u7a0b\u7528\u6237\u540d\u548c\u5bc6\u7801\u6307\u5b9a\u4e3a\u7528\u6237\u6620\u5c04\u7684 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u8981\u8bbf\u95ee\u7684\u8fdc\u7a0b\u8868\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/13/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u6216<a class=\"xref\" href=\"/docs/13/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5916\u90e8\u8868\u7684\u5217\u5fc5\u987b\u4e0e\u88ab\u5f15\u7528\u7684\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u5728\u5916\u90e8\u8868\u5bf9\u8c61\u7684\u9009\u9879\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8fdc\u7a0b\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0e\u8fdc\u7a0b\u8868\u4e0d\u540c\u7684\u8868\u540d\u548c/\u6216\u5217\u540d\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\">\u73b0\u5728\uff0c\u53ea\u9700\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">SELECT</code>\uff0c\u5373\u53ef\u8bbf\u95ee\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u4e2d\u5b58\u50a8\u7684\u6570\u636e\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code> \u6216 <code class=\"command\">COPY</code> \u4fee\u6539\u8fdc\u7a0b\u8868\u3002\uff08\u5f53\u7136\uff0c\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\u7684\u8fdc\u7a0b\u7528\u6237\u5fc5\u987b\u62e5\u6709\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u6743\u9650\u3002\uff09</p>\n<p lang=\"zh\">postgres_fdw \u76ee\u524d\u4e0d\u652f\u6301\u5e26 ON CONFLICT DO UPDATE \u5b50\u53e5\u7684 INSERT\u3002\u4e0d\u8fc7\uff0c\u652f\u6301 ON CONFLICT DO NOTHING\uff0c\u524d\u63d0\u662f\u4e0d\u6307\u5b9a\u552f\u4e00\u7d22\u5f15\u63a8\u65ad\u6761\u4ef6\u3002postgres_fdw \u8fd8\u652f\u6301\u5728\u5206\u533a\u8868\u4e0a\u6267\u884c UPDATE \u6240\u89e6\u53d1\u7684\u884c\u79fb\u52a8\uff0c\u4f46\u76ee\u524d\u4e0d\u652f\u6301\u4ee5\u4e0b\u60c5\u51b5\uff1a\u7528\u4e8e\u63a5\u6536\u79fb\u5165\u884c\u7684\u8fdc\u7aef\u5206\u533a\uff0c\u540c\u65f6\u4e5f\u662f\u7a0d\u540e\u5c06\u8981\u66f4\u65b0\u7684 UPDATE \u76ee\u6807\u5206\u533a\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5c06\u5916\u90e8\u8868\u7684\u5217\u58f0\u660e\u4e3a\u4e0e\u88ab\u5f15\u7528\u8fdc\u7a0b\u8868\u7684\u5bf9\u5e94\u5217\u5177\u6709\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u5728\u9002\u7528\u65f6\u5177\u6709\u76f8\u540c\u7684\u6392\u5e8f\u89c4\u5219\u3002\u5c3d\u7ba1 <code class=\"filename\">postgres_fdw</code> \u76ee\u524d\u5728\u6309\u9700\u6267\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u9762\u76f8\u5f53\u5bbd\u5bb9\uff0c\u4f46\u5f53\u7c7b\u578b\u6216\u6392\u5e8f\u89c4\u5219\u4e0d\u5339\u914d\u65f6\uff0c\u4ecd\u53ef\u80fd\u51fa\u73b0\u4ee4\u4eba\u610f\u5916\u7684\u8bed\u4e49\u5f02\u5e38\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5bf9\u67e5\u8be2\u6761\u4ef6\u7684\u89e3\u91ca\u53ef\u80fd\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5916\u90e8\u8868\u7684\u58f0\u660e\u53ef\u4ee5\u6bd4\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u5c11\u4e00\u4e9b\u5217\uff0c\u6216\u8005\u4f7f\u7528\u4e0d\u540c\u7684\u5217\u987a\u5e8f\u3002\u4e0e\u8fdc\u7a0b\u8868\u5217\u7684\u5339\u914d\u662f\u6309\u540d\u79f0\u800c\u4e0d\u662f\u6309\u4f4d\u7f6e\u8fdb\u884c\u7684\u3002</p>\n<div class=\"sect2\" id=\"id-1.11.7.42.10\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/13/postgres-fdw.html#id-1.11.7.42.10\">F.33.1. postgres_fdw \u7684 FDW \u9009\u9879</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.1.\u00a0\u8fde\u63a5\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"filename\">postgres_fdw</code>\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e0e<span class=\"application\">libpq</span>\u8fde\u63a5\u5b57\u7b26\u4e32\u6240\u63a5\u53d7\u7684\u76f8\u540c\u9009\u9879\uff0c\u8be6\u89c1<a class=\"xref\" href=\"/docs/13/libpq.html#LIBPQ-PARAMKEYWORDS\" title=\"33.1.2.\u00a0\u53c2\u6570\u5173\u952e\u8bcd\">\u7b2c\u00a033.1.2\u00a0\u8282</a>\uff0c\u4f46\u4ee5\u4e0b\u9009\u9879\u4e0d\u88ab\u5141\u8bb8\uff0c\u6216\u4f1a\u53d7\u5230\u7279\u6b8a\u5904\u7406\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">user</code>\u3001<code class=\"literal\">password</code> \u548c <code class=\"literal\">sslpassword</code>\uff08\u8bf7\u6539\u4e3a\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\uff0c\u6216\u4f7f\u7528\u670d\u52a1\u6587\u4ef6\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">client_encoding</code>\uff08\u4f1a\u6839\u636e\u672c\u5730\u670d\u52a1\u5668\u7f16\u7801\u81ea\u52a8\u8bbe\u7f6e\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">fallback_application_name</code>\uff08\u59cb\u7ec8\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres_fdw</code>\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">sslkey</code> \u548c <code class=\"literal\">sslcert</code> \u53ef\u4ee5\u51fa\u73b0\u5728<span class=\"emphasis\"><em>\u8fde\u63a5\u9009\u9879\u3001\u7528\u6237\u6620\u5c04\u4e2d\u7684\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c\u7528\u6237\u6620\u5c04\u8bbe\u7f6e\u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002</p>\n</li>\n</ul>\n</div>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u521b\u5efa\u6216\u4fee\u6539\u5e26\u6709 <code class=\"literal\">sslcert</code> \u6216 <code class=\"literal\">sslkey</code> \u8bbe\u7f6e\u7684\u7528\u6237\u6620\u5c04\u3002</p>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u4e0d\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\uff0c\u56e0\u6b64\u5e94\u59cb\u7ec8\u4e3a\u5c5e\u4e8e\u975e\u8d85\u7ea7\u7528\u6237\u7684\u7528\u6237\u6620\u5c04\u6307\u5b9a <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u7528\u6237\u6620\u5c04\u9009\u9879<code class=\"literal\">password_required 'false'</code>\uff0c\u6309\u7528\u6237\u6620\u5c04\u5355\u72ec\u8986\u76d6\u6b64\u68c0\u67e5\u3002\u4f8b\u5982\uff1a</p>\n<pre class=\"programlisting\">ALTER USER MAPPING FOR some_non_superuser SERVER loopback_nopw\nOPTIONS (ADD password_required 'false');\n</pre>\n<p lang=\"zh\">\u4e3a\u4e86\u9632\u6b62\u975e\u7279\u6743\u7528\u6237\u5229\u7528 postgres \u670d\u52a1\u5668\u6240\u8fd0\u884c\u7684 unix \u7528\u6237\u7684\u8ba4\u8bc1\u6743\u9650\uff0c\u63d0\u5347\u5230\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u5728\u7528\u6237\u6620\u5c04\u4e0a\u8bbe\u7f6e\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u5fc5\u987b\u8c28\u614e\uff0c\u786e\u4fdd\u8fd9\u4e0d\u4f1a\u4f7f\u6620\u5c04\u7528\u6237\u80fd\u591f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\u5230\u6620\u5c04\u7684\u6570\u636e\u5e93\uff0c\u53c2\u89c1 CVE-2007-3278 \u548c CVE-2007-6601\u3002\u4e0d\u8981\u4e3a public \u89d2\u8272\u8bbe\u7f6e password_required=false\u3002\u8bf7\u6ce8\u610f\uff0c\u6620\u5c04\u7528\u6237\u53ef\u80fd\u4f7f\u7528\u8fd0\u884c postgres \u670d\u52a1\u5668\u7684\u7cfb\u7edf\u7528\u6237\u7684 Unix \u4e3b\u76ee\u5f55\u4e2d\u7684\u4efb\u4f55\u5ba2\u6237\u7aef\u8bc1\u4e66\u3001.pgpass\u3001.pg_service.conf \u7b49\uff0c\u4e5f\u53ef\u80fd\u5229\u7528 peer\u3001ident \u7b49\u8ba4\u8bc1\u65b9\u5f0f\u6388\u4e88\u7684\u4efb\u4f55\u4fe1\u4efb\u5173\u7cfb\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.3\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.2.\u00a0\u5bf9\u8c61\u540d\u79f0\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u9009\u9879\u53ef\u7528\u4e8e\u63a7\u5236\u53d1\u9001\u5230\u8fdc\u7a0b <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u7684 SQL \u8bed\u53e5\u4e2d\u6240\u4f7f\u7528\u7684\u540d\u79f0\u3002\u5f53\u521b\u5efa\u5916\u90e8\u8868\u65f6\u6240\u7528\u7684\u540d\u79f0\u4e0e\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u7684\u540d\u79f0\u4e0d\u540c\u65f6\uff0c\u5c31\u9700\u8981\u8fd9\u4e9b\u9009\u9879\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">schema_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">table_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">column_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.4\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.3.\u00a0\u4ee3\u4ef7\u4f30\u7b97\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u901a\u8fc7\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u67e5\u8be2\u6765\u83b7\u53d6\u8fdc\u7a0b\u6570\u636e\uff0c\u56e0\u6b64\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u626b\u63cf\u5916\u90e8\u8868\u7684\u4f30\u8ba1\u4ee3\u4ef7\u5e94\u5f53\u7b49\u4e8e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b8c\u6210\u8be5\u64cd\u4f5c\u7684\u4ee3\u4ef7\uff0c\u518d\u52a0\u4e0a\u4e00\u4e9b\u901a\u4fe1\u5f00\u9500\u3002\u83b7\u5f97\u8fd9\u79cd\u4f30\u7b97\u6700\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u662f\u5411\u8fdc\u7a0b\u670d\u52a1\u5668\u8be2\u95ee\uff0c\u518d\u628a\u5f00\u9500\u52a0\u4e0a\u53bb\uff1b\u4f46\u5bf9\u4e8e\u7b80\u5355\u67e5\u8be2\uff0c\u4e3a\u4e86\u53d6\u5f97\u4ee3\u4ef7\u4f30\u7b97\u800c\u989d\u5916\u53d1\u9001\u4e00\u6b21\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ef\u80fd\u5e76\u4e0d\u5212\u7b97\u3002\u56e0\u6b64 <code class=\"filename\">postgres_fdw</code> \u63d0\u4f9b\u4ee5\u4e0b\u9009\u9879\u6765\u63a7\u5236\u4ee3\u4ef7\u4f30\u7b97\u7684\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">use_remote_estimate</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b <code class=\"command\">EXPLAIN</code> \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_startup_cost</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_tuple_cost</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6570\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">0.01</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u771f\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4ece\u8fdc\u7a0b\u670d\u52a1\u5668\u83b7\u53d6\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u5047\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u5728\u672c\u5730\u6267\u884c\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u518d\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u9664\u975e\u6709\u8fdc\u7a0b\u8868\u7edf\u8ba1\u4fe1\u606f\u7684\u672c\u5730\u526f\u672c\u53ef\u7528\uff0c\u5426\u5219\u8fd9\u79cd\u672c\u5730\u4f30\u7b97\u4e0d\u592a\u53ef\u80fd\u975e\u5e38\u51c6\u786e\u3002\u66f4\u65b0\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c\u662f\u5728\u5916\u90e8\u8868\u4e0a\u8fd0\u884c<a class=\"xref\" href=\"/docs/13/sql-analyze.html\" title=\"ANALYZE\"><span class=\"refentrytitle\">ANALYZE</span></a>\uff1b\u8fd9\u6837\u4f1a\u626b\u63cf\u8fdc\u7a0b\u8868\uff0c\u7136\u540e\u50cf\u5bf9\u5f85\u672c\u5730\u8868\u4e00\u6837\u8ba1\u7b97\u5e76\u5b58\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u4fdd\u7559\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u8fdc\u7a0b\u8868\u6bcf\u6b21\u67e5\u8be2\u7684\u89c4\u5212\u5f00\u9500\uff1b\u4f46\u5982\u679c\u8fdc\u7a0b\u8868\u7ecf\u5e38\u66f4\u65b0\uff0c\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u5f88\u5feb\u5c31\u4f1a\u8fc7\u65f6\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.5\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.4.\u00a0\u8fdc\u7a0b\u6267\u884c\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709\u4f7f\u7528\u5185\u7f6e\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u624d\u4f1a\u88ab\u8003\u8651\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u3002\u6d89\u53ca\u975e\u5185\u7f6e\u51fd\u6570\u7684\u5b50\u53e5\u4f1a\u5728\u53d6\u56de\u884c\u4e4b\u540e\u5728\u672c\u5730\u68c0\u67e5\u3002\u5982\u679c\u8fd9\u4e9b\u51fd\u6570\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e5f\u53ef\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fe1\u5176\u7ed3\u679c\u4e0e\u672c\u5730\u76f8\u540c\uff0c\u5219\u5c06\u8fd9\u7c7b <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u7aef\u6267\u884c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u6b64\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">extensions</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 <span class=\"productname\">PostgreSQL</span> \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"literal\">extensions</code> \u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fetch_size</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.6\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.5.\u00a0\u53ef\u66f4\u65b0\u6027\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u66f4\u65b0\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">updatable</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u548c <code class=\"command\">DELETE</code> \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c<code class=\"literal\">information_schema</code> \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.42.10.7\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.33.1.6.\u00a0\u5bfc\u5165\u9009\u9879</h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/13/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u5bfc\u5165\u5916\u90e8\u8868\u5b9a\u4e49\u3002\u8be5\u547d\u4ee4\u4f1a\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4ee5\u5339\u914d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868\u6216\u89c6\u56fe\u3002\u5982\u679c\u8981\u5bfc\u5165\u7684\u8fdc\u7a0b\u8868\u5217\u4f7f\u7528\u7528\u6237\u5b9a\u4e49\u6570\u636e\u7c7b\u578b\uff0c\u5219\u672c\u5730\u670d\u52a1\u5668\u5fc5\u987b\u5b58\u5728\u540c\u540d\u4e14\u517c\u5bb9\u7684\u7c7b\u578b\u3002</p>\n<p lang=\"zh\">\u53ef\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\uff08\u5728 <code class=\"command\">IMPORT FOREIGN SCHEMA</code> \u547d\u4ee4\u4e2d\u7ed9\u51fa\uff09\u81ea\u5b9a\u4e49\u5bfc\u5165\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">import_collate</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">COLLATE</code> \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a <code class=\"literal\">true</code>\uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 <code class=\"literal\">COLLATE \"default\"</code> \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_default</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">DEFAULT</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b<code class=\"function\">nextval()</code> \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_generated</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">GENERATED</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_not_null</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">NOT NULL</code> \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u9664 <code class=\"literal\">NOT NULL</code> \u4e4b\u5916\u7684\u7ea6\u675f\u6c38\u8fdc\u4e0d\u4f1a\u4ece\u8fdc\u7a0b\u8868\u5bfc\u5165\u3002\u867d\u7136 <span class=\"productname\">PostgreSQL</span> \u786e\u5b9e\u652f\u6301\u5728\u5916\u90e8\u8868\u4e0a\u5b9a\u4e49 <code class=\"literal\">CHECK</code> \u7ea6\u675f\uff0c\u4f46\u7531\u4e8e\u7ea6\u675f\u8868\u8fbe\u5f0f\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u6c42\u503c\u4e0d\u540c\uff0c\u7cfb\u7edf\u4e0d\u4f1a\u81ea\u52a8\u5bfc\u5165\u5b83\u4eec\u3002\u6b64\u7c7b\u884c\u4e3a\u4e0d\u4e00\u81f4\u7684<code class=\"literal\">CHECK</code> \u7ea6\u675f\uff0c\u53ef\u80fd\u5bfc\u81f4\u67e5\u8be2\u4f18\u5316\u4e2d\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5e0c\u671b\u5bfc\u5165<code class=\"literal\">CHECK</code> \u7ea6\u675f\uff0c\u5fc5\u987b\u624b\u5de5\u5b8c\u6210\uff0c\u5e76\u5e94\u4ed4\u7ec6\u6838\u5b9e\u6bcf\u4e00\u4e2a\u7ea6\u675f\u7684\u8bed\u4e49\u3002\u6709\u5173\u5916\u90e8\u8868\u4e0a<code class=\"literal\">CHECK</code> \u7ea6\u675f\u5904\u7406\u65b9\u5f0f\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/13/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u3002</p>\n<p lang=\"zh\">\u4f5c\u4e3a\u5176\u4ed6\u8868\u5206\u533a\u7684\u8868\u6216\u5916\u90e8\u8868\u4f1a\u88ab\u81ea\u52a8\u6392\u9664\u3002\u5206\u533a\u8868\u4f1a\u88ab\u5bfc\u5165\uff0c\u9664\u975e\u5b83\u672c\u8eab\u4e5f\u662f\u5176\u4ed6\u8868\u7684\u5206\u533a\u3002\u7531\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u901a\u8fc7\u4f5c\u4e3a\u5206\u533a\u5c42\u6b21\u6839\u7684\u5206\u533a\u8868\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ea\u5bfc\u5165\u5206\u533a\u8868\u5373\u53ef\u8bbf\u95ee\u5168\u90e8\u6570\u636e\uff0c\u800c\u65e0\u9700\u521b\u5efa\u989d\u5916\u5bf9\u8c61\u3002</p>\n</div>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.11\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/13/postgres-fdw.html#id-1.11.7.42.11\">F.33.2. \u8fde\u63a5\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u5728\u9996\u6b21\u6267\u884c\u4f7f\u7528\u4e0e\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u5173\u8054\u7684\u5916\u90e8\u8868\u7684\u67e5\u8be2\u65f6\uff0c\u4f1a\u5efa\u7acb\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002\u8be5\u8fde\u63a5\u4f1a\u5728\u540c\u4e00\u4f1a\u8bdd\u4e2d\u4fdd\u7559\u5e76\u4f9b\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u3002\u5982\u679c\u4f7f\u7528\u591a\u4e2a\u7528\u6237\u6807\u8bc6\uff08\u7528\u6237\u6620\u5c04\uff09\u8bbf\u95ee\u8be5\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u4f1a\u4e3a\u6bcf\u4e2a\u7528\u6237\u6620\u5c04\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.12\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/13/postgres-fdw.html#id-1.11.7.42.12\">F.33.3. \u4e8b\u52a1\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c<code class=\"filename\">postgres_fdw</code> \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002</p>\n<p lang=\"zh\">\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a <code class=\"literal\">SERIALIZABLE</code> \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code>\uff1b\u5426\u5219\u4f7f\u7528 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code> \u6216 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e <code class=\"literal\">READ COMMITTED</code> \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 <span class=\"productname\">PostgreSQL</span> \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c<code class=\"filename\">postgres_fdw</code> \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.13\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/13/postgres-fdw.html#id-1.11.7.42.13\">F.33.4. \u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 <code class=\"literal\">extensions</code> \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f <code class=\"literal\">IMMUTABLE</code>\u3002\u5bf9\u4e8e <code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u67e5\u8be2\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 <code class=\"literal\">BEFORE</code> \u6216 <code class=\"literal\">AFTER</code> \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 <code class=\"literal\">CHECK OPTION</code> \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 <code class=\"command\">UPDATE</code> \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001<code class=\"literal\">IMMUTABLE</code> \u64cd\u4f5c\u7b26\u6216 <code class=\"literal\">IMMUTABLE</code> \u51fd\u6570\u3002</p>\n<p lang=\"zh\">\u5f53 <code class=\"filename\">postgres_fdw</code> \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 <code class=\"literal\">JOIN</code> \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">EXPLAIN VERBOSE</code> \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.14\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/13/postgres-fdw.html#id-1.11.7.42.14\">F.33.5. \u8fdc\u7a0b\u67e5\u8be2\u6267\u884c\u73af\u5883</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728 <code class=\"filename\">postgres_fdw</code> \u6253\u5f00\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u4e2d\uff0c<a class=\"xref\" href=\"/docs/13/runtime-config-client.html#GUC-SEARCH-PATH\">search_path</a>\u53c2\u6570\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u5305\u542b <code class=\"literal\">pg_catalog</code>\uff0c\u8fd9\u6837\u65e0\u9700\u6a21\u5f0f\u9650\u5b9a\u5c31\u53ea\u80fd\u770b\u5230\u5185\u7f6e\u5bf9\u8c61\u3002\u8fd9\u5bf9 <code class=\"filename\">postgres_fdw</code> \u81ea\u8eab\u751f\u6210\u7684\u67e5\u8be2\u4e0d\u662f\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u603b\u662f\u63d0\u4f9b\u8fd9\u79cd\u9650\u5b9a\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bf9\u90a3\u4e9b\u901a\u8fc7\u8fdc\u7a0b\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u6216\u89c4\u5219\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u51fd\u6570\u5e26\u6765\u98ce\u9669\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u89c6\u56fe\uff0c\u5219\u8be5\u89c6\u56fe\u4e2d\u4f7f\u7528\u7684\u4efb\u4f55\u51fd\u6570\u90fd\u4f1a\u5728\u53d7\u9650\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u6267\u884c\u3002\u5efa\u8bae\u5728\u8fd9\u7c7b\u51fd\u6570\u4e2d\u5bf9\u6240\u6709\u540d\u79f0\u90fd\u5199\u6210\u5e26\u6a21\u5f0f\u9650\u5b9a\u7684\u5f62\u5f0f\uff0c\u6216\u8005\u4e3a\u8fd9\u7c7b\u51fd\u6570\u9644\u52a0 <code class=\"literal\">SET search_path</code> \u9009\u9879\uff08\u89c1<a class=\"xref\" href=\"/docs/13/sql-createfunction.html\" title=\"CREATE FUNCTION\"><span class=\"refentrytitle\">CREATE FUNCTION</span></a>\uff09\uff0c\u4ee5\u5efa\u7acb\u5176\u9884\u671f\u7684\u641c\u7d22\u8def\u5f84\u73af\u5883\u3002</p>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u8fd8\u4f1a\u4e3a\u8fdc\u7a0b\u4f1a\u8bdd\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/13/runtime-config-client.html#GUC-TIMEZONE\">TimeZone</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">UTC</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/13/runtime-config-client.html#GUC-DATESTYLE\">DateStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">ISO</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/13/runtime-config-client.html#GUC-INTERVALSTYLE\">IntervalStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\u5bf9\u4e8e 9.0 \u53ca\u66f4\u65b0\u7248\u672c\u7684\u8fdc\u7aef\u670d\u52a1\u5668\uff0cextra_float_digits \u8bbe\u4e3a 3\uff1b\u66f4\u65e9\u7248\u672c\u5219\u8bbe\u4e3a 2\u3002</li>\n</ul>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u8bbe\u7f6e\u901a\u5e38\u4e0d\u50cf <code class=\"varname\">search_path</code> \u90a3\u6837\u5bb9\u6613\u51fa\u95ee\u9898\uff0c\u4f46\u5982\u679c\u6709\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684 <code class=\"literal\">SET</code> \u9009\u9879\u5904\u7406\u3002</p>\n<p lang=\"zh\"><span class=\"emphasis\"><em>\u4e0d</em></span>\u5efa\u8bae\u901a\u8fc7\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u7684\u4f1a\u8bdd\u7ea7\u8bbe\u7f6e\u6765\u8986\u76d6\u8fd9\u79cd\u884c\u4e3a\uff1b\u8fd9\u5f88\u53ef\u80fd\u5bfc\u81f4 <code class=\"filename\">postgres_fdw</code> \u5de5\u4f5c\u5f02\u5e38\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.15\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/13/postgres-fdw.html#id-1.11.7.42.15\">F.33.6. \u8de8\u7248\u672c\u517c\u5bb9\u6027</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.16\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/13/postgres-fdw.html#id-1.11.7.42.16\">F.33.7. \u793a\u4f8b</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4e0b\u9762\u662f\u4f7f\u7528 <code class=\"literal\">postgres_fdw</code> \u521b\u5efa\u5916\u90e8\u8868\u7684\u4e00\u4e2a\u793a\u4f8b\u3002\u9996\u5148\u5b89\u88c5\u6269\u5c55\uff1a</p>\n<pre class=\"programlisting\">CREATE EXTENSION postgres_fdw;\n</pre>\n<p lang=\"zh\">\u7136\u540e\u4f7f\u7528<a class=\"xref\" href=\"/docs/13/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8fde\u63a5\u5230\u4e00\u53f0 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\uff0c\u5b83\u8fd0\u884c\u5728\u4e3b\u673a <code class=\"literal\">192.83.123.89</code> \u4e0a\u5e76\u76d1\u542c <code class=\"literal\">5432</code> \u7aef\u53e3\u3002\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"literal\">foreign_db</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER foreign_server\n        FOREIGN DATA WRAPPER postgres_fdw\n        OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');\n</pre>\n<p lang=\"zh\">\u8fd8\u9700\u8981\u7528<a class=\"xref\" href=\"/docs/13/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u5b9a\u4e49\u4e00\u4e2a\u7528\u6237\u6620\u5c04\uff0c\u4ee5\u6807\u8bc6\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u54ea\u4e2a\u89d2\u8272\uff1a</p>\n<pre class=\"programlisting\">CREATE USER MAPPING FOR local_user\n        SERVER foreign_server\n        OPTIONS (user 'foreign_user', password 'password');\n</pre>\n<p lang=\"zh\">\u73b0\u5728\u53ef\u4ee5\u901a\u8fc7<a class=\"xref\" href=\"/docs/13/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5728\u672c\u4f8b\u4e2d\uff0c\u8981\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868<code class=\"structname\">some_schema.some_table</code>\uff0c\u5176\u672c\u5730\u540d\u79f0\u4e3a<code class=\"structname\">foreign_table</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE FOREIGN TABLE foreign_table (\n        id integer NOT NULL,\n        data text\n)\n        SERVER foreign_server\n        OPTIONS (schema_name 'some_schema', table_name 'some_table');\n</pre>\n<p lang=\"zh\">\u5fc5\u987b\u786e\u4fdd\u5728<code class=\"command\">CREATE FOREIGN TABLE</code>\u4e2d\u58f0\u660e\u7684\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u5176\u4ed6\u5c5e\u6027\uff0c\u4e0e\u5b9e\u9645\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u5217\u540d\u4e5f\u5fc5\u987b\u5339\u914d\uff0c\u9664\u975e\u4e3a\u5404\u5217\u9644\u52a0<code class=\"literal\">column_name</code>\u9009\u9879\uff0c\u6307\u660e\u5b83\u4eec\u5728\u8fdc\u7a0b\u8868\u4e2d\u7684\u540d\u79f0\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/13/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u4f18\u4e8e\u624b\u5de5\u6784\u9020\u5916\u90e8\u8868\u5b9a\u4e49\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.42.17\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/13/postgres-fdw.html#id-1.11.7.42.17\">F.33.8. \u4f5c\u8005</a></span></h3>\n</div>\n</div>\n</div>\n<p>Shigeru Hanada <code class=\"email\">&lt;<a class=\"email\" href=\"mailto:shigeru.hanada@gmail.com\">shigeru.hanada@gmail.com</a>&gt;</code></p>\n</div>\n</div>", "manual_path": "/docs/13/postgres-fdw.html", "localization": {"status": "complete", "sources": [{"url": "/docs/13/postgres-fdw.html", "method": "same-major semantic node", "sha256": "febb45538dd1a34ad3cc639fc1ef8360b86f2da54efdad1c70143323cc23d317", "language": "zh", "matched_nodes": ["#POSTGRES-FDW/div[11]/div[1]/div[0]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[11]/div[1]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[11]/div[1]/p[1]", "#POSTGRES-FDW/div[11]/div[1]/p[3]", "#POSTGRES-FDW/div[11]/div[1]/p[4]", "#POSTGRES-FDW/div[11]/div[1]/p[5]", "#POSTGRES-FDW/div[11]/div[1]/p[7]", "#POSTGRES-FDW/div[11]/div[2]/div[0]", "#POSTGRES-FDW/div[11]/div[2]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[2]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[2]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[11]/div[2]/p[1]", "#POSTGRES-FDW/div[11]/div[3]/div[0]", "#POSTGRES-FDW/div[11]/div[3]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[3]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[3]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[11]/div[3]/p[1]", "#POSTGRES-FDW/div[11]/div[3]/p[3]", "#POSTGRES-FDW/div[11]/div[4]/div[0]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[11]/div[4]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[4]/p[1]", "#POSTGRES-FDW/div[11]/div[5]/div[0]", "#POSTGRES-FDW/div[11]/div[5]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[11]/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[11]/div[5]/p[1]", "#POSTGRES-FDW/div[11]/div[6]/div[0]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[1]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[3]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[5]", "#POSTGRES-FDW/div[11]/div[6]/div[3]/dl[0]/dd[7]", "#POSTGRES-FDW/div[11]/div[6]/p[1]", "#POSTGRES-FDW/div[11]/div[6]/p[2]", "#POSTGRES-FDW/div[11]/div[6]/p[4]", "#POSTGRES-FDW/div[11]/div[6]/p[5]", "#POSTGRES-FDW/div[12]/p[1]", "#POSTGRES-FDW/div[13]/p[1]", "#POSTGRES-FDW/div[13]/p[2]", "#POSTGRES-FDW/div[13]/p[3]", "#POSTGRES-FDW/div[14]/p[1]", "#POSTGRES-FDW/div[14]/p[2]", "#POSTGRES-FDW/div[14]/p[3]", "#POSTGRES-FDW/div[15]/div[3]/ul[0]/li[0]", "#POSTGRES-FDW/div[15]/div[3]/ul[0]/li[1]", "#POSTGRES-FDW/div[15]/div[3]/ul[0]/li[2]", "#POSTGRES-FDW/div[15]/p[1]", "#POSTGRES-FDW/div[15]/p[2]", "#POSTGRES-FDW/div[15]/p[4]", "#POSTGRES-FDW/div[15]/p[5]", "#POSTGRES-FDW/div[17]/p[1]", "#POSTGRES-FDW/div[17]/p[3]", "#POSTGRES-FDW/div[17]/p[5]", "#POSTGRES-FDW/div[17]/p[7]", "#POSTGRES-FDW/div[17]/p[9]", "#POSTGRES-FDW/div[1]/dl[0]/dt[0]", "#POSTGRES-FDW/div[1]/dl[0]/dt[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[4]", "#POSTGRES-FDW/div[1]/dl[0]/dt[5]", "#POSTGRES-FDW/div[1]/dl[0]/dt[6]", "#POSTGRES-FDW/div[1]/dl[0]/dt[7]", "#POSTGRES-FDW/div[6]/ol[0]/li[0]", "#POSTGRES-FDW/div[6]/ol[0]/li[1]", "#POSTGRES-FDW/div[6]/ol[0]/li[2]", "#POSTGRES-FDW/div[6]/ol[0]/li[3]", "#POSTGRES-FDW/p[10]", "#POSTGRES-FDW/p[3]", "#POSTGRES-FDW/p[4]", "#POSTGRES-FDW/p[5]", "#POSTGRES-FDW/p[7]", "#POSTGRES-FDW/p[9]"]}], "language": "zh", "original_text": {"/versions/13/description/0": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/versions/13/facts/0/label": "Interface family", "/versions/13/facts/0/value": "Foreign-data wrapper", "/versions/13/facts/1/label": "Handler or routine", "/versions/13/facts/2/label": "Recorded callbacks", "/versions/13/facts/3/label": "Data source", "/versions/13/facts/3/value": "Remote PostgreSQL servers", "/versions/13/tables/0/title": "Registered interface handlers", "/versions/13/tables/1/title": "Documented options", "/versions/13/related/0/label": "Foreign-data wrapper catalog", "/versions/13/related/1/label": "Existing extension catalogue identity", "/versions/13/related/2/label": "Foreign Scan plan node", "/versions/13/sections/0/title": "Interface and capability boundaries", "/versions/13/sections/1/title": "Transaction Management", "/versions/13/sections/2/title": "Remote Query Optimization", "/versions/13/sections/3/title": "Cross-Version Compatibility", "/versions/13/sections/4/title": "Registered implementation in core source", "/versions/13/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/13/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/13/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/13/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/13/tables/0/rows/4/state": "No handler registered in this build", "/versions/13/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/13/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/13/tables/0/rows/7/state": "No handler registered in this build", "/versions/13/tables/0/rows/8/state": "No handler registered in this build", "/versions/13/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/13/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/13/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/13/sections/1/paragraphs/0": "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints.", "/versions/13/sections/1/paragraphs/1": "The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local transaction uses SERIALIZABLE or REPEATABLE READ isolation level, but it might be surprising for a READ COMMITTED local transaction. A future PostgreSQL release might modify these rules.", "/versions/13/sections/1/paragraphs/2": "Note that it is currently not supported by postgres_fdw to prepare the remote transaction for two-phase commit.", "/versions/13/sections/2/paragraphs/0": "postgres_fdw attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by sending query WHERE clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, WHERE clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an extension that's listed in the foreign server's extensions option. Operators and functions in such clauses must be IMMUTABLE as well. For an UPDATE or DELETE query, postgres_fdw attempts to optimize the query execution by sending the whole query to the remote server if there are no query WHERE clauses that cannot be sent to the remote server, no local joins for the query, no row-level local BEFORE or AFTER triggers or stored generated columns on the target table, and no CHECK OPTION constraints from parent views. In UPDATE , expressions to assign to target columns must use only built-in data types, IMMUTABLE operators, or IMMUTABLE functions, to reduce the risk of misexecution of the query.", "/versions/13/sections/2/paragraphs/1": "When postgres_fdw encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved are subject to different user mappings. While sending the JOIN clauses, it takes the same precautions as mentioned above for the WHERE clauses.", "/versions/13/sections/2/paragraphs/2": "The query that is actually sent to the remote server for execution can be examined using EXPLAIN VERBOSE .", "/versions/13/sections/3/paragraphs/0": "postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1. A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent to it for execution, resulting in \u201c function does not exist \u201d or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table reference in a sub- SELECT with OFFSET 0 as an optimization fence, and placing the problematic function or operator outside the sub- SELECT .", "/versions/13/tables/0/rows/0/feature": "Scan rows", "/versions/13/tables/0/rows/5/feature": "Join path pushdown", "/versions/13/tables/0/rows/6/feature": "Upper paths, including aggregation", "/versions/13/tables/0/rows/7/feature": "Batch insert", "/versions/13/tables/0/rows/8/feature": "Asynchronous append execution", "/versions/13/tables/0/rows/9/feature": "Import schema", "/versions/13/tables/0/columns/0/label": "Interface operation", "/versions/13/tables/0/columns/1/label": "Source observation", "/versions/13/tables/0/columns/2/label": "Callback", "/versions/13/tables/0/columns/3/label": "Implementation", "/versions/13/tables/1/columns/0/label": "Option", "/versions/13/tables/1/columns/1/label": "Same-version definition", "/versions/13/tables/1/rows/0/definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used.", "/versions/13/tables/1/rows/1/definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used.", "/versions/13/tables/1/rows/2/definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used.", "/versions/13/tables/1/rows/3/definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false .", "/versions/13/tables/1/rows/4/definition": "This option, which can be specified for a foreign server, is a numeric value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 .", "/versions/13/tables/1/rows/5/definition": "This option, which can be specified for a foreign server, is a numeric value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 .", "/versions/13/tables/1/rows/6/definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.", "/versions/13/tables/1/rows/7/definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 .", "/versions/13/tables/1/rows/8/definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server.", "/versions/13/tables/1/rows/9/definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different.", "/versions/13/tables/1/rows/10/definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally.", "/versions/13/tables/1/rows/11/definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally.", "/versions/13/tables/1/rows/12/definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true .", "/versions/13/tables/0/rows/4/implementation": "Not registered", "/versions/13/tables/0/rows/7/implementation": "Not registered", "/versions/13/tables/0/rows/8/implementation": "Not registered"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "211fd5f99f6230a2f014bcc787457996c4912a64fe0d355969a11411dcbe26b2"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "schema_name", "definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used."}, {"name": "table_name", "definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used."}, {"name": "column_name", "definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used."}, {"name": "use_remote_estimate", "definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false ."}, {"name": "fdw_startup_cost", "definition": "This option, which can be specified for a foreign server, is a numeric value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 ."}, {"name": "fdw_tuple_cost", "definition": "This option, which can be specified for a foreign server, is a numeric value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 ."}, {"name": "extensions", "definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly."}, {"name": "fetch_size", "definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 ."}, {"name": "updatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server."}, {"name": "import_collate", "definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different."}, {"name": "import_default", "definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally."}, {"name": "import_generated", "definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally."}, {"name": "import_not_null", "definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true ."}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExplainDirectModify": "postgresExplainDirectModify", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets"}, "source_options": [], "protocol_versions": {}}, "comparison_hash": "871fd9c664077a02a0b6c9abd2a1bf0cc3d5614a0c9cdae3f7b6c2f325db8ebb", "manual_language": "zh", "runtime_verified": false}, "14": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "postgres_fdw_handler"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "36"}, {"label": "\u6570\u636e\u6e90", "value": "\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u626b\u63cf\u6570\u636e\u884c", "callback": "IterateForeignScan", "implementation": "postgresIterateForeignScan"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "INSERT", "callback": "ExecForeignInsert", "implementation": "postgresExecForeignInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "UPDATE", "callback": "ExecForeignUpdate", "implementation": "postgresExecForeignUpdate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "DELETE", "callback": "ExecForeignDelete", "implementation": "postgresExecForeignDelete"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "ExecForeignTruncate", "implementation": "postgresExecForeignTruncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u8fde\u63a5\u8def\u5f84\u4e0b\u63a8", "callback": "GetForeignJoinPaths", "implementation": "postgresGetForeignJoinPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u4e0a\u5c42\u8def\u5f84\uff0c\u5305\u62ec\u805a\u5408", "callback": "GetForeignUpperPaths", "implementation": "postgresGetForeignUpperPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6279\u91cf\u63d2\u5165", "callback": "ExecForeignBatchInsert", "implementation": "postgresExecForeignBatchInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f02\u6b65\u8ffd\u52a0\u6267\u884c", "callback": "ForeignAsyncRequest", "implementation": "postgresForeignAsyncRequest"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5bfc\u5165\u6a21\u5f0f", "callback": "ImportForeignSchema", "implementation": "postgresImportForeignSchema"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "schema_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002"}, {"name": "table_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "column_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "use_remote_estimate", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 postgres_fdw \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b EXPLAIN \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "fdw_startup_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "fdw_tuple_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a 0.01 \u3002"}, {"name": "extensions", "definition": "\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 PostgreSQL \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002 \u4f7f\u7528 extensions \u9009\u9879\u65f6\uff0c \u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002"}, {"name": "fetch_size", "definition": "\u8be5\u9009\u9879\u6307\u5b9a postgres_fdw \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "batch_size", "definition": "\u6b64\u9009\u9879\u6307\u5b9a postgres_fdw \u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u5e94\u63d2\u5165\u7684\u884c\u6570\uff0c\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u8868\u7ea7\u8bbe\u7f6e\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u8bbe\u7f6e\uff0c\u9ed8\u8ba4\u503c\u4e3a 1\u3002\u5b9e\u9645\u4e00\u6b21\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u548c batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u4e00\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570\u4e58\u4ee5 batch_size \u8d85\u51fa\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u62a5\u9519\u3002"}, {"name": "async_capable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002 \u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c postgres_fdw \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002 \u5373\u4f7f Append \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 postgres_fdw \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002"}, {"name": "updatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 INSERT \u3001 UPDATE \u548c DELETE \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c information_schema \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 postgres_fdw \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002"}, {"name": "truncatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 TRUNCATE \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002"}, {"name": "import_collate", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 COLLATE \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002 \u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a true \uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 COLLATE \"default\" \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002"}, {"name": "import_default", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 DEFAULT \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b nextval() \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_generated", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 GENERATED \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_not_null", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 NOT NULL \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002"}, {"name": "keep_connections", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a on \u3002\u5982\u679c\u8bbe\u7f6e\u4e3a off \uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}], "related": [{"url": "/wiki/catalog/pg_foreign_data_wrapper/?v=14", "label": "Foreign-data wrapper \u7cfb\u7edf\u76ee\u5f55"}, {"url": "/e/postgres_fdw/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/plan/foreign-scan/?v=14", "label": "Foreign Scan \u8ba1\u5212\u8282\u70b9"}], "release": {"ref": "PostgreSQL 14.24 source archive", "label": "14.24", "major": "14", "channel": "stable", "revision": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897", "source_url": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/14/postgres-fdw.html", "path": "postgres-fdw.html", "label": "PostgreSQL 14 English manual", "sha256": "60090e77bd3d8853b329bfc06e9ffd378163a0acd6e06e029ce5eb04c7922d4b", "language": "en", "original_url": "/docs/14/postgres-fdw.html"}, {"url": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "line": 554, "path": "contrib/postgres_fdw/postgres_fdw.c", "label": "contrib/postgres_fdw/postgres_fdw.c:554", "sha256": "8c3f9c8757488fd4128b26a1536f015c69b3d5804ed40560e7c4210624abccc1", "archive_sha256": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u5f02\u6b65\u6267\u884c\u9009\u9879", "paragraphs": ["postgres_fdw \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c Append \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406", "paragraphs": ["\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c postgres_fdw \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002", "\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a SERIALIZABLE \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \uff1b\u5426\u5219\u4f7f\u7528 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 SERIALIZABLE \u6216 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e READ COMMITTED \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 PostgreSQL \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002", "\u8bf7\u6ce8\u610f\uff0c postgres_fdw \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002"]}, {"title": "\u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316", "paragraphs": ["postgres_fdw \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 WHERE \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 WHERE \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 extensions \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f IMMUTABLE \u3002\u5bf9\u4e8e UPDATE \u6216 DELETE \u67e5\u8be2\uff0c postgres_fdw \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 WHERE \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 BEFORE \u6216 AFTER \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 CHECK OPTION \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 UPDATE \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001 IMMUTABLE \u64cd\u4f5c\u7b26\u6216 IMMUTABLE \u51fd\u6570\u3002", "\u5f53 postgres_fdw \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 JOIN \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 WHERE \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002", "\u53ef\u4ee5\u4f7f\u7528 EXPLAIN VERBOSE \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002"]}, {"title": "\u8de8\u7248\u672c\u517c\u5bb9\u6027", "paragraphs": ["postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002"]}, {"code": "{\n\tFdwRoutine *routine = makeNode(FdwRoutine);\n\n\t/* Functions for scanning foreign tables */\n\troutine->GetForeignRelSize = postgresGetForeignRelSize;\n\troutine->GetForeignPaths = postgresGetForeignPaths;\n\troutine->GetForeignPlan = postgresGetForeignPlan;\n\troutine->BeginForeignScan = postgresBeginForeignScan;\n\troutine->IterateForeignScan = postgresIterateForeignScan;\n\troutine->ReScanForeignScan = postgresReScanForeignScan;\n\troutine->EndForeignScan = postgresEndForeignScan;\n\n\t/* Functions for updating foreign tables */\n\troutine->AddForeignUpdateTargets = postgresAddForeignUpdateTargets;\n\troutine->PlanForeignModify = postgresPlanForeignModify;\n\troutine->BeginForeignModify = postgresBeginForeignModify;\n\troutine->ExecForeignInsert = postgresExecForeignInsert;\n\troutine->ExecForeignBatchInsert = postgresExecForeignBatchInsert;\n\troutine->GetForeignModifyBatchSize = postgresGetForeignModifyBatchSize;\n\troutine->ExecForeignUpdate = postgresExecForeignUpdate;\n\troutine->ExecForeignDelete = postgresExecForeignDelete;\n\troutine->EndForeignModify = postgresEndForeignModify;\n\troutine->BeginForeignInsert = postgresBeginForeignInsert;\n\troutine->EndForeignInsert = postgresEndForeignInsert;\n\troutine->IsForeignRelUpdatable = postgresIsForeignRelUpdatable;\n\troutine->PlanDirectModify = postgresPlanDirectModify;\n\troutine->BeginDirectModify = postgresBeginDirectModify;\n\troutine->IterateDirectModify = postgresIterateDirectModify;\n\troutine->EndDirectModify = postgresEndDirectModify;\n\n\t/* Function for EvalPlanQual rechecks */\n\troutine->RecheckForeignScan = postgresRecheckForeignScan;\n\t/* Support functions for EXPLAIN */\n\troutine->ExplainForeignScan = postgresExplainForeignScan;\n\troutine->ExplainForeignModify = postgresExplainForeignModify;\n\troutine->ExplainDirectModify = postgresExplainDirectModify;\n\n\t/* Support function for TRUNCATE */\n\troutine->ExecForeignTruncate = postgresExecForeignTruncate;\n\n\t/* Support functions for ANALYZE */\n\troutine->AnalyzeForeignTable = postgresAnalyzeForeignTable;\n\n\t/* Support functions for IMPORT FOREIGN SCHEMA */\n\troutine->ImportForeignSchema = postgresImportForeignSchema;\n\n\t/* Support functions for join push-down */\n\troutine->GetForeignJoinPaths = postgresGetForeignJoinPaths;\n\n\t/* Support functions for upper relation push-down */\n\troutine->GetForeignUpperPaths = postgresGetForeignUpperPaths;\n\n\t/* Support functions for asynchronous execution */\n\troutine->IsForeignPathAsyncCapable = postgresIsForeignPathAsyncCapable;\n\troutine->ForeignAsyncRequest = postgresForeignAsyncRequest;\n\troutine->ForeignAsyncConfigureWait = postgresForeignAsyncConfigureWait;\n\troutine->ForeignAsyncNotify = postgresForeignAsyncNotify;\n\n\tPG_RETURN_POINTER(routine);\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "description": ["\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002"], "manual_html": "<div class=\"sect1\" id=\"POSTGRES-FDW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">F.35.\u00a0postgres_fdw</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u6a21\u5757\u63d0\u4f9b\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668 <code class=\"literal\">postgres_fdw</code>\uff0c\u53ef\u7528\u4e8e\u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u672c\u6a21\u5757\u63d0\u4f9b\u7684\u529f\u80fd\u4e0e\u8f83\u65e7\u7684<a class=\"xref\" href=\"/docs/14/dblink.html\" title=\"F.10.\u00a0dblink\">dblink</a>\u6a21\u5757\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u91cd\u53e0\u3002\u4f46 <code class=\"filename\">postgres_fdw</code> \u4e3a\u8bbf\u95ee\u8fdc\u7a0b\u8868\u63d0\u4f9b\u4e86\u66f4\u900f\u660e\u4e14\u7b26\u5408\u6807\u51c6\u7684\u8bed\u6cd5\uff0c\u5e76\u4e14\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u6027\u80fd\u66f4\u597d\u3002</p>\n<p lang=\"zh\">\u8981\u51c6\u5907\u901a\u8fc7 <code class=\"filename\">postgres_fdw</code> \u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee\uff1a</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5b89\u88c5 <code class=\"filename\">postgres_fdw</code> \u6269\u5c55\uff0c\u53ef\u4f7f\u7528<a class=\"xref\" href=\"/docs/14/sql-createextension.html\" title=\"CREATE EXTENSION\"><span class=\"refentrytitle\">CREATE EXTENSION</span></a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u4f7f\u7528<a class=\"xref\" href=\"/docs/14/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u5bf9\u8c61\uff0c\u7528\u6765\u8868\u793a\u6bcf\u4e2a\u8981\u8fde\u63a5\u7684\u8fdc\u7a0b\u6570\u636e\u5e93\u3002\u5c06\u9664 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u4e4b\u5916\u7684\u8fde\u63a5\u4fe1\u606f\u6307\u5b9a\u4e3a\u670d\u52a1\u5668\u5bf9\u8c61\u7684\u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u9700\u8981\u83b7\u51c6\u8bbf\u95ee\u5404\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u7528\u6237\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/14/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u521b\u5efa\u7528\u6237\u6620\u5c04\u3002\u5c06\u8981\u4f7f\u7528\u7684\u8fdc\u7a0b\u7528\u6237\u540d\u548c\u5bc6\u7801\u6307\u5b9a\u4e3a\u7528\u6237\u6620\u5c04\u7684 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u8981\u8bbf\u95ee\u7684\u8fdc\u7a0b\u8868\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/14/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u6216<a class=\"xref\" href=\"/docs/14/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5916\u90e8\u8868\u7684\u5217\u5fc5\u987b\u4e0e\u88ab\u5f15\u7528\u7684\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u5728\u5916\u90e8\u8868\u5bf9\u8c61\u7684\u9009\u9879\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8fdc\u7a0b\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0e\u8fdc\u7a0b\u8868\u4e0d\u540c\u7684\u8868\u540d\u548c/\u6216\u5217\u540d\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\">\u73b0\u5728\uff0c\u53ea\u9700\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">SELECT</code>\uff0c\u5373\u53ef\u8bbf\u95ee\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u4e2d\u5b58\u50a8\u7684\u6570\u636e\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code>\u3001<code class=\"command\">COPY</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4fee\u6539\u8fdc\u7a0b\u8868\u3002\uff08\u5f53\u7136\uff0c\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\u7684\u8fdc\u7a0b\u7528\u6237\u5fc5\u987b\u62e5\u6709\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u6743\u9650\u3002\uff09</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5728\u8bbf\u95ee\u6216\u4fee\u6539\u8fdc\u7a0b\u8868\u65f6\uff0c<code class=\"literal\">ONLY</code> \u9009\u9879\u5728 <code class=\"command\">SELECT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4e2d\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n<p lang=\"zh\">postgres_fdw \u76ee\u524d\u4e0d\u652f\u6301\u5e26 ON CONFLICT DO UPDATE \u5b50\u53e5\u7684 INSERT\u3002\u4e0d\u8fc7\uff0c\u652f\u6301 ON CONFLICT DO NOTHING\uff0c\u524d\u63d0\u662f\u4e0d\u6307\u5b9a\u552f\u4e00\u7d22\u5f15\u63a8\u65ad\u6761\u4ef6\u3002postgres_fdw \u8fd8\u652f\u6301\u5728\u5206\u533a\u8868\u4e0a\u6267\u884c UPDATE \u6240\u89e6\u53d1\u7684\u884c\u79fb\u52a8\uff0c\u4f46\u76ee\u524d\u4e0d\u652f\u6301\u4ee5\u4e0b\u60c5\u51b5\uff1a\u7528\u4e8e\u63a5\u6536\u79fb\u5165\u884c\u7684\u8fdc\u7aef\u5206\u533a\uff0c\u540c\u65f6\u4e5f\u662f\u540c\u4e00\u547d\u4ee4\u4e2d\u5176\u4ed6\u4f4d\u7f6e\u5c06\u8981\u66f4\u65b0\u7684 UPDATE \u76ee\u6807\u5206\u533a\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5c06\u5916\u90e8\u8868\u7684\u5217\u58f0\u660e\u4e3a\u4e0e\u88ab\u5f15\u7528\u8fdc\u7a0b\u8868\u7684\u5bf9\u5e94\u5217\u5177\u6709\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u5728\u9002\u7528\u65f6\u5177\u6709\u76f8\u540c\u7684\u6392\u5e8f\u89c4\u5219\u3002\u5c3d\u7ba1 <code class=\"filename\">postgres_fdw</code> \u76ee\u524d\u5728\u6309\u9700\u6267\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u9762\u76f8\u5f53\u5bbd\u5bb9\uff0c\u4f46\u5f53\u7c7b\u578b\u6216\u6392\u5e8f\u89c4\u5219\u4e0d\u5339\u914d\u65f6\uff0c\u4ecd\u53ef\u80fd\u51fa\u73b0\u4ee4\u4eba\u610f\u5916\u7684\u8bed\u4e49\u5f02\u5e38\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5bf9\u67e5\u8be2\u6761\u4ef6\u7684\u89e3\u91ca\u53ef\u80fd\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5916\u90e8\u8868\u7684\u58f0\u660e\u53ef\u4ee5\u6bd4\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u5c11\u4e00\u4e9b\u5217\uff0c\u6216\u8005\u4f7f\u7528\u4e0d\u540c\u7684\u5217\u987a\u5e8f\u3002\u4e0e\u8fdc\u7a0b\u8868\u5217\u7684\u5339\u914d\u662f\u6309\u540d\u79f0\u800c\u4e0d\u662f\u6309\u4f4d\u7f6e\u8fdb\u884c\u7684\u3002</p>\n<div class=\"sect2\" id=\"id-1.11.7.44.11\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/14/postgres-fdw.html#POSTGRES-FDW-OPTIONS\">F.35.1. postgres_fdw \u7684 FDW \u9009\u9879</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.44.11.2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.35.1.1.\u00a0\u8fde\u63a5\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528<code class=\"filename\">postgres_fdw</code>\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e0e<span class=\"application\">libpq</span>\u8fde\u63a5\u5b57\u7b26\u4e32\u6240\u63a5\u53d7\u7684\u76f8\u540c\u9009\u9879\uff0c\u8be6\u89c1<a class=\"xref\" href=\"/docs/14/libpq.html#LIBPQ-PARAMKEYWORDS\" title=\"34.1.2.\u00a0\u53c2\u6570\u5173\u952e\u8bcd\">\u7b2c\u00a034.1.2\u00a0\u8282</a>\uff0c\u4f46\u4ee5\u4e0b\u9009\u9879\u4e0d\u88ab\u5141\u8bb8\uff0c\u6216\u4f1a\u53d7\u5230\u7279\u6b8a\u5904\u7406\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">user</code>\u3001<code class=\"literal\">password</code> \u548c <code class=\"literal\">sslpassword</code>\uff08\u8bf7\u6539\u4e3a\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\uff0c\u6216\u4f7f\u7528\u670d\u52a1\u6587\u4ef6\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">client_encoding</code>\uff08\u4f1a\u6839\u636e\u672c\u5730\u670d\u52a1\u5668\u7f16\u7801\u81ea\u52a8\u8bbe\u7f6e\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">fallback_application_name</code>\uff08\u59cb\u7ec8\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres_fdw</code>\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">sslkey</code> \u548c <code class=\"literal\">sslcert</code> \u53ef\u4ee5\u51fa\u73b0\u5728<span class=\"emphasis\"><em>\u8fde\u63a5\u9009\u9879\u3001\u7528\u6237\u6620\u5c04\u4e2d\u7684\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c\u7528\u6237\u6620\u5c04\u8bbe\u7f6e\u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002</p>\n</li>\n</ul>\n</div>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u521b\u5efa\u6216\u4fee\u6539\u5e26\u6709 <code class=\"literal\">sslcert</code> \u6216 <code class=\"literal\">sslkey</code> \u8bbe\u7f6e\u7684\u7528\u6237\u6620\u5c04\u3002</p>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u4e0d\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\uff0c\u56e0\u6b64\u5e94\u59cb\u7ec8\u4e3a\u5c5e\u4e8e\u975e\u8d85\u7ea7\u7528\u6237\u7684\u7528\u6237\u6620\u5c04\u6307\u5b9a <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u7528\u6237\u6620\u5c04\u9009\u9879<code class=\"literal\">password_required 'false'</code>\uff0c\u6309\u7528\u6237\u6620\u5c04\u5355\u72ec\u8986\u76d6\u6b64\u68c0\u67e5\u3002\u4f8b\u5982\uff1a</p>\n<pre class=\"programlisting\">ALTER USER MAPPING FOR some_non_superuser SERVER loopback_nopw\nOPTIONS (ADD password_required 'false');\n</pre>\n<p lang=\"zh\">\u4e3a\u4e86\u9632\u6b62\u975e\u7279\u6743\u7528\u6237\u5229\u7528 postgres \u670d\u52a1\u5668\u6240\u8fd0\u884c\u7684 unix \u7528\u6237\u7684\u8ba4\u8bc1\u6743\u9650\uff0c\u63d0\u5347\u5230\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u5728\u7528\u6237\u6620\u5c04\u4e0a\u8bbe\u7f6e\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u5fc5\u987b\u8c28\u614e\uff0c\u786e\u4fdd\u8fd9\u4e0d\u4f1a\u4f7f\u6620\u5c04\u7528\u6237\u80fd\u591f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\u5230\u6620\u5c04\u7684\u6570\u636e\u5e93\uff0c\u53c2\u89c1 CVE-2007-3278 \u548c CVE-2007-6601\u3002\u4e0d\u8981\u4e3a public \u89d2\u8272\u8bbe\u7f6e password_required=false\u3002\u8bf7\u6ce8\u610f\uff0c\u6620\u5c04\u7528\u6237\u53ef\u80fd\u4f7f\u7528\u8fd0\u884c postgres \u670d\u52a1\u5668\u7684\u7cfb\u7edf\u7528\u6237\u7684 Unix \u4e3b\u76ee\u5f55\u4e2d\u7684\u4efb\u4f55\u5ba2\u6237\u7aef\u8bc1\u4e66\u3001.pgpass\u3001.pg_service.conf \u7b49\uff0c\u4e5f\u53ef\u80fd\u5229\u7528 peer\u3001ident \u7b49\u8ba4\u8bc1\u65b9\u5f0f\u6388\u4e88\u7684\u4efb\u4f55\u4fe1\u4efb\u5173\u7cfb\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.44.11.3\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.35.1.2.\u00a0\u5bf9\u8c61\u540d\u79f0\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u9009\u9879\u53ef\u7528\u4e8e\u63a7\u5236\u53d1\u9001\u5230\u8fdc\u7a0b <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u7684 SQL \u8bed\u53e5\u4e2d\u6240\u4f7f\u7528\u7684\u540d\u79f0\u3002\u5f53\u521b\u5efa\u5916\u90e8\u8868\u65f6\u6240\u7528\u7684\u540d\u79f0\u4e0e\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u7684\u540d\u79f0\u4e0d\u540c\u65f6\uff0c\u5c31\u9700\u8981\u8fd9\u4e9b\u9009\u9879\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">schema_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">table_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">column_name</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.44.11.4\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.35.1.3.\u00a0\u4ee3\u4ef7\u4f30\u7b97\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u901a\u8fc7\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u67e5\u8be2\u6765\u83b7\u53d6\u8fdc\u7a0b\u6570\u636e\uff0c\u56e0\u6b64\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u626b\u63cf\u5916\u90e8\u8868\u7684\u4f30\u8ba1\u4ee3\u4ef7\u5e94\u5f53\u7b49\u4e8e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b8c\u6210\u8be5\u64cd\u4f5c\u7684\u4ee3\u4ef7\uff0c\u518d\u52a0\u4e0a\u4e00\u4e9b\u901a\u4fe1\u5f00\u9500\u3002\u83b7\u5f97\u8fd9\u79cd\u4f30\u7b97\u6700\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u662f\u5411\u8fdc\u7a0b\u670d\u52a1\u5668\u8be2\u95ee\uff0c\u518d\u628a\u5f00\u9500\u52a0\u4e0a\u53bb\uff1b\u4f46\u5bf9\u4e8e\u7b80\u5355\u67e5\u8be2\uff0c\u4e3a\u4e86\u53d6\u5f97\u4ee3\u4ef7\u4f30\u7b97\u800c\u989d\u5916\u53d1\u9001\u4e00\u6b21\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ef\u80fd\u5e76\u4e0d\u5212\u7b97\u3002\u56e0\u6b64 <code class=\"filename\">postgres_fdw</code> \u63d0\u4f9b\u4ee5\u4e0b\u9009\u9879\u6765\u63a7\u5236\u4ee3\u4ef7\u4f30\u7b97\u7684\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">use_remote_estimate</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b <code class=\"command\">EXPLAIN</code> \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_startup_cost</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_tuple_cost</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">0.01</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u771f\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4ece\u8fdc\u7a0b\u670d\u52a1\u5668\u83b7\u53d6\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u5047\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u5728\u672c\u5730\u6267\u884c\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u518d\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u9664\u975e\u6709\u8fdc\u7a0b\u8868\u7edf\u8ba1\u4fe1\u606f\u7684\u672c\u5730\u526f\u672c\u53ef\u7528\uff0c\u5426\u5219\u8fd9\u79cd\u672c\u5730\u4f30\u7b97\u4e0d\u592a\u53ef\u80fd\u975e\u5e38\u51c6\u786e\u3002\u66f4\u65b0\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c\u662f\u5728\u5916\u90e8\u8868\u4e0a\u8fd0\u884c<a class=\"xref\" href=\"/docs/14/sql-analyze.html\" title=\"ANALYZE\"><span class=\"refentrytitle\">ANALYZE</span></a>\uff1b\u8fd9\u6837\u4f1a\u626b\u63cf\u8fdc\u7a0b\u8868\uff0c\u7136\u540e\u50cf\u5bf9\u5f85\u672c\u5730\u8868\u4e00\u6837\u8ba1\u7b97\u5e76\u5b58\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u4fdd\u7559\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u8fdc\u7a0b\u8868\u6bcf\u6b21\u67e5\u8be2\u7684\u89c4\u5212\u5f00\u9500\uff1b\u4f46\u5982\u679c\u8fdc\u7a0b\u8868\u7ecf\u5e38\u66f4\u65b0\uff0c\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u5f88\u5feb\u5c31\u4f1a\u8fc7\u65f6\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.44.11.5\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.35.1.4.\u00a0\u8fdc\u7a0b\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709\u4f7f\u7528\u5185\u7f6e\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u624d\u4f1a\u88ab\u8003\u8651\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u3002\u6d89\u53ca\u975e\u5185\u7f6e\u51fd\u6570\u7684\u5b50\u53e5\u4f1a\u5728\u53d6\u56de\u884c\u4e4b\u540e\u5728\u672c\u5730\u68c0\u67e5\u3002\u5982\u679c\u8fd9\u4e9b\u51fd\u6570\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e5f\u53ef\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fe1\u5176\u7ed3\u679c\u4e0e\u672c\u5730\u76f8\u540c\uff0c\u5219\u5c06\u8fd9\u7c7b <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u7aef\u6267\u884c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u6b64\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">extensions</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 <span class=\"productname\">PostgreSQL</span> \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"literal\">extensions</code> \u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fetch_size</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">batch_size</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u4e2d\u5e94\u63d2\u5165\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">1</code>\u3002</p>\n<p lang=\"zh\">postgres_fdw \u6bcf\u6b21\u5b9e\u9645\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u4e0e\u6307\u5b9a\u7684 batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u5355\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7aef\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u91cf\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570 * batch_size \u8d85\u8fc7\u6b64\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u9519\u8bef\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.44.11.6\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.35.1.5.\u00a0\u5f02\u6b65\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c <code class=\"structname\">Append</code> \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">async_capable</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n<p lang=\"zh\">\u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c<code class=\"filename\">postgres_fdw</code> \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f <code class=\"structname\">Append</code> \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.44.11.7\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.35.1.6.\u00a0\u53ef\u66f4\u65b0\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u66f4\u65b0\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">updatable</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u548c <code class=\"command\">DELETE</code> \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c<code class=\"literal\">information_schema</code> \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.44.11.8\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.35.1.7.\u00a0\u53ef\u622a\u65ad\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u622a\u65ad\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">truncatable</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">TRUNCATE</code> \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.44.11.9\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.35.1.8.\u00a0\u5bfc\u5165\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/14/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u5bfc\u5165\u5916\u90e8\u8868\u5b9a\u4e49\u3002\u8be5\u547d\u4ee4\u4f1a\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4ee5\u5339\u914d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868\u6216\u89c6\u56fe\u3002\u5982\u679c\u8981\u5bfc\u5165\u7684\u8fdc\u7a0b\u8868\u5217\u4f7f\u7528\u7528\u6237\u5b9a\u4e49\u6570\u636e\u7c7b\u578b\uff0c\u5219\u672c\u5730\u670d\u52a1\u5668\u5fc5\u987b\u5b58\u5728\u540c\u540d\u4e14\u517c\u5bb9\u7684\u7c7b\u578b\u3002</p>\n<p lang=\"zh\">\u53ef\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\uff08\u5728 <code class=\"command\">IMPORT FOREIGN SCHEMA</code> \u547d\u4ee4\u4e2d\u7ed9\u51fa\uff09\u81ea\u5b9a\u4e49\u5bfc\u5165\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">import_collate</code></span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">COLLATE</code> \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a <code class=\"literal\">true</code>\uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 <code class=\"literal\">COLLATE \"default\"</code> \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_default</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">DEFAULT</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b<code class=\"function\">nextval()</code> \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_generated</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">GENERATED</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_not_null</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">NOT NULL</code> \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u9664 <code class=\"literal\">NOT NULL</code> \u4e4b\u5916\u7684\u7ea6\u675f\u6c38\u8fdc\u4e0d\u4f1a\u4ece\u8fdc\u7a0b\u8868\u5bfc\u5165\u3002\u867d\u7136 <span class=\"productname\">PostgreSQL</span> \u786e\u5b9e\u652f\u6301\u5728\u5916\u90e8\u8868\u4e0a\u5b9a\u4e49\u68c0\u67e5\u7ea6\u675f\uff0c\u4f46\u7531\u4e8e\u7ea6\u675f\u8868\u8fbe\u5f0f\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u6c42\u503c\u4e0d\u540c\uff0c\u7cfb\u7edf\u4e0d\u4f1a\u81ea\u52a8\u5bfc\u5165\u5b83\u4eec\u3002\u6b64\u7c7b\u884c\u4e3a\u4e0d\u4e00\u81f4\u7684\u68c0\u67e5\u7ea6\u675f\uff0c\u53ef\u80fd\u5bfc\u81f4\u67e5\u8be2\u4f18\u5316\u4e2d\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5e0c\u671b\u5bfc\u5165\u68c0\u67e5\u7ea6\u675f\uff0c\u5fc5\u987b\u624b\u5de5\u5b8c\u6210\uff0c\u5e76\u5e94\u4ed4\u7ec6\u6838\u5b9e\u6bcf\u4e00\u4e2a\u7ea6\u675f\u7684\u8bed\u4e49\u3002\u6709\u5173\u5916\u90e8\u8868\u4e0a\u68c0\u67e5\u7ea6\u675f\u5904\u7406\u65b9\u5f0f\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/14/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u3002</p>\n<p lang=\"zh\">\u4f5c\u4e3a\u5176\u4ed6\u8868\u5206\u533a\u7684\u8868\u6216\u5916\u90e8\u8868\uff0c\u4ec5\u5728\u5b83\u4eec\u88ab\u660e\u786e\u5199\u5165 <code class=\"literal\">LIMIT TO</code> \u5b50\u53e5\u65f6\u624d\u4f1a\u5bfc\u5165\u3002\u5426\u5219\uff0c\u5b83\u4eec\u4f1a\u88ab\u81ea\u52a8\u6392\u9664\u5728<a class=\"xref\" href=\"/docs/14/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u4e4b\u5916\u3002\u7531\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u901a\u8fc7\u4f5c\u4e3a\u5206\u533a\u5c42\u6b21\u6839\u7684\u5206\u533a\u8868\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ea\u5bfc\u5165\u5206\u533a\u8868\u5373\u53ef\u8bbf\u95ee\u5168\u90e8\u6570\u636e\uff0c\u800c\u65e0\u9700\u521b\u5efa\u989d\u5916\u5bf9\u8c61\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.44.11.10\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.35.1.9.\u00a0\u8fde\u63a5\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u672c\u5730\u4f1a\u8bdd\u4e2d\u4fdd\u6301\u6253\u5f00\uff0c\u4ee5\u4fbf\u91cd\u590d\u4f7f\u7528\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">keep_connections</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">on</code>\u3002\u5982\u679c\u8bbe\u7f6e\u4e3a <code class=\"literal\">off</code>\uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.44.12\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/14/postgres-fdw.html#POSTGRES-FDW-FUNCTIONS\">F.35.2. \u51fd\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_get_connections(OUT server_name text, OUT valid boolean) returns setof record</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u8fd4\u56de<code class=\"filename\">postgres_fdw</code>\u4ece\u672c\u5730\u4f1a\u8bdd\u5411\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6240\u6709\u6253\u5f00\u8fde\u63a5\u7684\u5916\u90e8\u670d\u52a1\u5668\u540d\u79f0\u3002\u5b83\u8fd8\u8fd4\u56de\u6bcf\u4e2a\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002\u5982\u679c\u5916\u90e8\u670d\u52a1\u5668\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u88ab\u4f7f\u7528\uff0c\u4f46\u5176\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u88ab\u66f4\u6539\u6216\u5220\u9664\uff0c\u5219\u8fd4\u56de<code class=\"literal\">false</code>\uff08\u6ce8\u610f\uff0c\u5982\u679c\u670d\u52a1\u5668\u88ab\u5220\u9664\uff0c\u65e0\u6548\u8fde\u63a5\u7684\u670d\u52a1\u5668\u540d\u79f0\u5c06\u4e3a<code class=\"literal\">NULL</code>\uff09\uff0c\u7136\u540e\u8fd9\u6837\u7684\u65e0\u6548\u8fde\u63a5\u5c06\u5728\u8be5\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u5173\u95ed\u3002\u5426\u5219\u8fd4\u56de<code class=\"literal\">true</code>\u3002\u5982\u679c\u6ca1\u6709\u6253\u5f00\u7684\u8fde\u63a5\uff0c\u5219\u4e0d\u8fd4\u56de\u4efb\u4f55\u8bb0\u5f55\u3002\u8be5\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT * FROM postgres_fdw_get_connections() ORDER BY 1;\n server_name | valid \n-------------+-------\n loopback1   | t\n loopback2   | f\n</pre>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect(server_name text) returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u8bf7\u6ce8\u610f\uff0c\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\u65f6\uff0c\u5bf9\u540c\u4e00\u670d\u52a1\u5668\u53ef\u80fd\u5b58\u5728\u591a\u4e2a\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u5982\u679c\u627e\u4e0d\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u62a5\u544a\u9519\u8bef\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect('loopback1');\n postgres_fdw_disconnect \n-------------------------\n t\n</pre>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect_all() returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5168\u90e8\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect_all();\n postgres_fdw_disconnect_all \n-----------------------------\n t\n</pre>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.44.13\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/14/postgres-fdw.html#POSTGRES-FDW-CONNECTION-MANAGEMENT\">F.35.3. \u8fde\u63a5\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u5728\u9996\u6b21\u6267\u884c\u4f7f\u7528\u4e0e\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u5173\u8054\u7684\u5916\u90e8\u8868\u7684\u67e5\u8be2\u65f6\uff0c\u4f1a\u5efa\u7acb\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8be5\u8fde\u63a5\u4f1a\u5728\u540c\u4e00\u4f1a\u8bdd\u4e2d\u4fdd\u7559\u5e76\u4f9b\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u3002\u8fd9\u4e00\u884c\u4e3a\u53ef\u901a\u8fc7\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\u63a7\u5236\u3002\u5982\u679c\u4f7f\u7528\u591a\u4e2a\u7528\u6237\u6807\u8bc6\uff08\u7528\u6237\u6620\u5c04\uff09\u8bbf\u95ee\u8be5\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u4f1a\u4e3a\u6bcf\u4e2a\u7528\u6237\u6620\u5c04\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002</p>\n<p lang=\"zh\">\u5f53\u66f4\u6539\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u7684\u5b9a\u4e49\uff0c\u6216\u5c06\u5176\u5220\u9664\u65f6\uff0c\u76f8\u5173\u8fde\u63a5\u4f1a\u88ab\u5173\u95ed\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c\u5982\u679c\u4efb\u4f55\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u5728\u4f7f\u7528\uff0c\u5219\u4f1a\u4fdd\u7559\u5230\u4e8b\u52a1\u7ed3\u675f\u3002\u5173\u95ed\u7684\u8fde\u63a5\u4f1a\u5728\u540e\u7eed\u4f7f\u7528\u5916\u90e8\u8868\u7684\u67e5\u8be2\u9700\u8981\u5b83\u4eec\u65f6\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\">\u4e00\u65e6\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5b83\u4f1a\u4e00\u76f4\u4fdd\u7559\u5230\u672c\u5730\u4f1a\u8bdd\u6216\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u9000\u51fa\u3002\u8981\u663e\u5f0f\u65ad\u5f00\u8fde\u63a5\uff0c\u53ef\u4ee5\u7981\u7528\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\uff0c\u6216\u4f7f\u7528 <code class=\"function\">postgres_fdw_disconnect</code> \u548c <code class=\"function\">postgres_fdw_disconnect_all</code> \u51fd\u6570\u3002\u4f8b\u5982\uff0c\u8fd9\u4e9b\u51fd\u6570\u53ef\u7528\u4e8e\u5173\u95ed\u4e0d\u518d\u9700\u8981\u7684\u8fde\u63a5\uff0c\u4ece\u800c\u91ca\u653e\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u8fde\u63a5\u8d44\u6e90\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.44.14\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/14/postgres-fdw.html#POSTGRES-FDW-TRANSACTION-MANAGEMENT\">F.35.4. \u4e8b\u52a1\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c<code class=\"filename\">postgres_fdw</code> \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002</p>\n<p lang=\"zh\">\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a <code class=\"literal\">SERIALIZABLE</code> \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code>\uff1b\u5426\u5219\u4f7f\u7528 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code> \u6216 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e <code class=\"literal\">READ COMMITTED</code> \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 <span class=\"productname\">PostgreSQL</span> \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c<code class=\"filename\">postgres_fdw</code> \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.44.15\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/14/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">F.35.5. \u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 <code class=\"literal\">extensions</code> \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f <code class=\"literal\">IMMUTABLE</code>\u3002\u5bf9\u4e8e <code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u67e5\u8be2\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 <code class=\"literal\">BEFORE</code> \u6216 <code class=\"literal\">AFTER</code> \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 <code class=\"literal\">CHECK OPTION</code> \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 <code class=\"command\">UPDATE</code> \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001<code class=\"literal\">IMMUTABLE</code> \u64cd\u4f5c\u7b26\u6216 <code class=\"literal\">IMMUTABLE</code> \u51fd\u6570\u3002</p>\n<p lang=\"zh\">\u5f53 <code class=\"filename\">postgres_fdw</code> \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 <code class=\"literal\">JOIN</code> \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">EXPLAIN VERBOSE</code> \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.44.16\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/14/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">F.35.6. \u8fdc\u7a0b\u67e5\u8be2\u6267\u884c\u73af\u5883</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728 <code class=\"filename\">postgres_fdw</code> \u6253\u5f00\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u4e2d\uff0c<a class=\"xref\" href=\"/docs/14/runtime-config-client.html#GUC-SEARCH-PATH\">search_path</a>\u53c2\u6570\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u5305\u542b <code class=\"literal\">pg_catalog</code>\uff0c\u8fd9\u6837\u65e0\u9700\u6a21\u5f0f\u9650\u5b9a\u5c31\u53ea\u80fd\u770b\u5230\u5185\u7f6e\u5bf9\u8c61\u3002\u8fd9\u5bf9 <code class=\"filename\">postgres_fdw</code> \u81ea\u8eab\u751f\u6210\u7684\u67e5\u8be2\u4e0d\u662f\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u603b\u662f\u63d0\u4f9b\u8fd9\u79cd\u9650\u5b9a\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bf9\u90a3\u4e9b\u901a\u8fc7\u8fdc\u7a0b\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u6216\u89c4\u5219\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u51fd\u6570\u5e26\u6765\u98ce\u9669\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u89c6\u56fe\uff0c\u5219\u8be5\u89c6\u56fe\u4e2d\u4f7f\u7528\u7684\u4efb\u4f55\u51fd\u6570\u90fd\u4f1a\u5728\u53d7\u9650\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u6267\u884c\u3002\u5efa\u8bae\u5728\u8fd9\u7c7b\u51fd\u6570\u4e2d\u5bf9\u6240\u6709\u540d\u79f0\u90fd\u5199\u6210\u5e26\u6a21\u5f0f\u9650\u5b9a\u7684\u5f62\u5f0f\uff0c\u6216\u8005\u4e3a\u8fd9\u7c7b\u51fd\u6570\u9644\u52a0 <code class=\"literal\">SET search_path</code> \u9009\u9879\uff08\u89c1<a class=\"xref\" href=\"/docs/14/sql-createfunction.html\" title=\"CREATE FUNCTION\"><span class=\"refentrytitle\">CREATE FUNCTION</span></a>\uff09\uff0c\u4ee5\u5efa\u7acb\u5176\u9884\u671f\u7684\u641c\u7d22\u8def\u5f84\u73af\u5883\u3002</p>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u8fd8\u4f1a\u4e3a\u8fdc\u7a0b\u4f1a\u8bdd\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/14/runtime-config-client.html#GUC-TIMEZONE\">TimeZone</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">UTC</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/14/runtime-config-client.html#GUC-DATESTYLE\">DateStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">ISO</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/14/runtime-config-client.html#GUC-INTERVALSTYLE\">IntervalStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\u5bf9\u4e8e 9.0 \u53ca\u66f4\u65b0\u7248\u672c\u7684\u8fdc\u7aef\u670d\u52a1\u5668\uff0cextra_float_digits \u8bbe\u4e3a 3\uff1b\u66f4\u65e9\u7248\u672c\u5219\u8bbe\u4e3a 2\u3002</li>\n</ul>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u8bbe\u7f6e\u901a\u5e38\u4e0d\u50cf <code class=\"varname\">search_path</code> \u90a3\u6837\u5bb9\u6613\u51fa\u95ee\u9898\uff0c\u4f46\u5982\u679c\u6709\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684 <code class=\"literal\">SET</code> \u9009\u9879\u5904\u7406\u3002</p>\n<p lang=\"zh\"><span class=\"emphasis\"><em>\u4e0d</em></span>\u5efa\u8bae\u901a\u8fc7\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u7684\u4f1a\u8bdd\u7ea7\u8bbe\u7f6e\u6765\u8986\u76d6\u8fd9\u79cd\u884c\u4e3a\uff1b\u8fd9\u5f88\u53ef\u80fd\u5bfc\u81f4 <code class=\"filename\">postgres_fdw</code> \u5de5\u4f5c\u5f02\u5e38\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.44.17\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/14/postgres-fdw.html#POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">F.35.7. \u8de8\u7248\u672c\u517c\u5bb9\u6027</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.44.18\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/14/postgres-fdw.html#POSTGRES-FDW-EXAMPLES\">F.35.8. \u793a\u4f8b</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4e0b\u9762\u662f\u4f7f\u7528 <code class=\"literal\">postgres_fdw</code> \u521b\u5efa\u5916\u90e8\u8868\u7684\u4e00\u4e2a\u793a\u4f8b\u3002\u9996\u5148\u5b89\u88c5\u6269\u5c55\uff1a</p>\n<pre class=\"programlisting\">CREATE EXTENSION postgres_fdw;\n</pre>\n<p lang=\"zh\">\u7136\u540e\u4f7f\u7528<a class=\"xref\" href=\"/docs/14/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8fde\u63a5\u5230\u4e00\u53f0 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\uff0c\u5b83\u8fd0\u884c\u5728\u4e3b\u673a <code class=\"literal\">192.83.123.89</code> \u4e0a\u5e76\u76d1\u542c <code class=\"literal\">5432</code> \u7aef\u53e3\u3002\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"literal\">foreign_db</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER foreign_server\n        FOREIGN DATA WRAPPER postgres_fdw\n        OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');\n</pre>\n<p lang=\"zh\">\u8fd8\u9700\u8981\u7528<a class=\"xref\" href=\"/docs/14/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u5b9a\u4e49\u4e00\u4e2a\u7528\u6237\u6620\u5c04\uff0c\u4ee5\u6807\u8bc6\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u54ea\u4e2a\u89d2\u8272\uff1a</p>\n<pre class=\"programlisting\">CREATE USER MAPPING FOR local_user\n        SERVER foreign_server\n        OPTIONS (user 'foreign_user', password 'password');\n</pre>\n<p lang=\"zh\">\u73b0\u5728\u5c31\u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/14/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u521b\u5efa\u5916\u90e8\u8868\u4e86\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"structname\">some_schema.some_table</code> \u7684\u8868\u3002\u5b83\u5728\u672c\u5730\u7684\u540d\u79f0\u5c06\u662f <code class=\"structname\">foreign_table</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE FOREIGN TABLE foreign_table (\n        id integer NOT NULL,\n        data text\n)\n        SERVER foreign_server\n        OPTIONS (schema_name 'some_schema', table_name 'some_table');\n</pre>\n<p lang=\"zh\">\u5728 <code class=\"command\">CREATE FOREIGN TABLE</code> \u4e2d\u58f0\u660e\u7684\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u5176\u4ed6\u5c5e\u6027\uff0c\u5fc5\u987b\u4e0e\u5b9e\u9645\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u5217\u540d\u4e5f\u5fc5\u987b\u5339\u914d\uff0c\u9664\u975e\u4e3a\u5404\u4e2a\u5217\u9644\u52a0 <code class=\"literal\">column_name</code> \u9009\u9879\u6765\u6307\u660e\u5b83\u4eec\u5728\u8fdc\u7a0b\u8868\u4e2d\u7684\u540d\u79f0\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u76f8\u6bd4\u624b\u5de5\u6784\u9020\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4f7f\u7528 <a class=\"link\" href=\"/docs/14/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><code class=\"command\">IMPORT FOREIGN SCHEMA</code></a> \u66f4\u53ef\u53d6\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.44.19\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/14/postgres-fdw.html#POSTGRES-FDW-AUTHOR\">F.35.9. \u4f5c\u8005</a></span></h3>\n</div>\n</div>\n</div>\n<p>Shigeru Hanada <code class=\"email\">&lt;<a class=\"email\" href=\"mailto:shigeru.hanada@gmail.com\">shigeru.hanada@gmail.com</a>&gt;</code></p>\n</div>\n</div>", "manual_path": "/docs/14/postgres-fdw.html", "localization": {"status": "complete", "sources": [{"url": "/docs/14/postgres-fdw.html", "method": "same-major semantic node", "sha256": "9b7e0eeb6ef3f4c72ea235c7fc765d19358018227ce1f6c138703b669d8badab", "language": "zh", "matched_nodes": ["#POSTGRES-FDW/div[12]/div[1]/div[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[12]/div[1]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/p[3]", "#POSTGRES-FDW/div[12]/div[1]/p[4]", "#POSTGRES-FDW/div[12]/div[1]/p[5]", "#POSTGRES-FDW/div[12]/div[1]/p[7]", "#POSTGRES-FDW/div[12]/div[2]/div[0]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[2]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/div[0]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[3]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/p[3]", "#POSTGRES-FDW/div[12]/div[4]/div[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[12]/div[5]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/div[0]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/p[1]", "#POSTGRES-FDW/div[12]/div[7]/div[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[7]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/div[0]", "#POSTGRES-FDW/div[12]/div[8]/div[3]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[8]/div[3]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[8]/div[3]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/div[3]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[8]/div[3]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[8]/div[3]/dl[0]/dd[7]", "#POSTGRES-FDW/div[12]/div[8]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/p[2]", "#POSTGRES-FDW/div[12]/div[8]/p[4]", "#POSTGRES-FDW/div[12]/div[8]/p[5]", "#POSTGRES-FDW/div[12]/div[9]/div[0]", "#POSTGRES-FDW/div[12]/div[9]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[9]/p[1]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[14]/p[1]", "#POSTGRES-FDW/div[14]/p[2]", "#POSTGRES-FDW/div[14]/p[3]", "#POSTGRES-FDW/div[15]/p[1]", "#POSTGRES-FDW/div[15]/p[2]", "#POSTGRES-FDW/div[15]/p[3]", "#POSTGRES-FDW/div[16]/p[1]", "#POSTGRES-FDW/div[16]/p[2]", "#POSTGRES-FDW/div[16]/p[3]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[0]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[1]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[2]", "#POSTGRES-FDW/div[17]/p[1]", "#POSTGRES-FDW/div[17]/p[2]", "#POSTGRES-FDW/div[17]/p[4]", "#POSTGRES-FDW/div[17]/p[5]", "#POSTGRES-FDW/div[19]/p[1]", "#POSTGRES-FDW/div[19]/p[3]", "#POSTGRES-FDW/div[19]/p[5]", "#POSTGRES-FDW/div[19]/p[7]", "#POSTGRES-FDW/div[19]/p[9]", "#POSTGRES-FDW/div[1]/dl[0]/dt[0]", "#POSTGRES-FDW/div[1]/dl[0]/dt[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[4]", "#POSTGRES-FDW/div[1]/dl[0]/dt[5]", "#POSTGRES-FDW/div[1]/dl[0]/dt[6]", "#POSTGRES-FDW/div[1]/dl[0]/dt[7]", "#POSTGRES-FDW/div[1]/dl[0]/dt[8]", "#POSTGRES-FDW/div[6]/ol[0]/li[0]", "#POSTGRES-FDW/div[6]/ol[0]/li[1]", "#POSTGRES-FDW/div[6]/ol[0]/li[2]", "#POSTGRES-FDW/div[6]/ol[0]/li[3]", "#POSTGRES-FDW/p[10]", "#POSTGRES-FDW/p[11]", "#POSTGRES-FDW/p[3]", "#POSTGRES-FDW/p[4]", "#POSTGRES-FDW/p[5]", "#POSTGRES-FDW/p[7]", "#POSTGRES-FDW/p[8]"]}], "language": "zh", "original_text": {"/versions/14/description/0": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/versions/14/facts/0/label": "Interface family", "/versions/14/facts/0/value": "Foreign-data wrapper", "/versions/14/facts/1/label": "Handler or routine", "/versions/14/facts/2/label": "Recorded callbacks", "/versions/14/facts/3/label": "Data source", "/versions/14/facts/3/value": "Remote PostgreSQL servers", "/versions/14/tables/0/title": "Registered interface handlers", "/versions/14/tables/1/title": "Documented options", "/versions/14/related/0/label": "Foreign-data wrapper catalog", "/versions/14/related/1/label": "Existing extension catalogue identity", "/versions/14/related/2/label": "Foreign Scan plan node", "/versions/14/sections/0/title": "Interface and capability boundaries", "/versions/14/sections/1/title": "Asynchronous Execution Options", "/versions/14/sections/2/title": "Transaction Management", "/versions/14/sections/3/title": "Remote Query Optimization", "/versions/14/sections/4/title": "Cross-Version Compatibility", "/versions/14/sections/5/title": "Registered implementation in core source", "/versions/14/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/14/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/14/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/14/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/14/sections/1/paragraphs/0": "postgres_fdw supports asynchronous execution, which runs multiple parts of an Append node concurrently rather than serially to improve performance. This execution can be controlled using the following option:", "/versions/14/sections/2/paragraphs/0": "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints.", "/versions/14/sections/2/paragraphs/1": "The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local transaction uses SERIALIZABLE or REPEATABLE READ isolation level, but it might be surprising for a READ COMMITTED local transaction. A future PostgreSQL release might modify these rules.", "/versions/14/sections/2/paragraphs/2": "Note that it is currently not supported by postgres_fdw to prepare the remote transaction for two-phase commit.", "/versions/14/sections/3/paragraphs/0": "postgres_fdw attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by sending query WHERE clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, WHERE clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an extension that's listed in the foreign server's extensions option. Operators and functions in such clauses must be IMMUTABLE as well. For an UPDATE or DELETE query, postgres_fdw attempts to optimize the query execution by sending the whole query to the remote server if there are no query WHERE clauses that cannot be sent to the remote server, no local joins for the query, no row-level local BEFORE or AFTER triggers or stored generated columns on the target table, and no CHECK OPTION constraints from parent views. In UPDATE , expressions to assign to target columns must use only built-in data types, IMMUTABLE operators, or IMMUTABLE functions, to reduce the risk of misexecution of the query.", "/versions/14/sections/3/paragraphs/1": "When postgres_fdw encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved are subject to different user mappings. While sending the JOIN clauses, it takes the same precautions as mentioned above for the WHERE clauses.", "/versions/14/sections/3/paragraphs/2": "The query that is actually sent to the remote server for execution can be examined using EXPLAIN VERBOSE .", "/versions/14/sections/4/paragraphs/0": "postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1. A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent to it for execution, resulting in \u201c function does not exist \u201d or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table reference in a sub- SELECT with OFFSET 0 as an optimization fence, and placing the problematic function or operator outside the sub- SELECT .", "/versions/14/tables/0/rows/0/feature": "Scan rows", "/versions/14/tables/0/rows/5/feature": "Join path pushdown", "/versions/14/tables/0/rows/6/feature": "Upper paths, including aggregation", "/versions/14/tables/0/rows/7/feature": "Batch insert", "/versions/14/tables/0/rows/8/feature": "Asynchronous append execution", "/versions/14/tables/0/rows/9/feature": "Import schema", "/versions/14/tables/0/columns/0/label": "Interface operation", "/versions/14/tables/0/columns/1/label": "Source observation", "/versions/14/tables/0/columns/2/label": "Callback", "/versions/14/tables/0/columns/3/label": "Implementation", "/versions/14/tables/1/columns/0/label": "Option", "/versions/14/tables/1/columns/1/label": "Same-version definition", "/versions/14/tables/1/rows/0/definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used.", "/versions/14/tables/1/rows/1/definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used.", "/versions/14/tables/1/rows/2/definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used.", "/versions/14/tables/1/rows/3/definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false .", "/versions/14/tables/1/rows/4/definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 .", "/versions/14/tables/1/rows/5/definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 .", "/versions/14/tables/1/rows/6/definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.", "/versions/14/tables/1/rows/7/definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 .", "/versions/14/tables/1/rows/8/definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error.", "/versions/14/tables/1/rows/9/definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release.", "/versions/14/tables/1/rows/10/definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server.", "/versions/14/tables/1/rows/11/definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server.", "/versions/14/tables/1/rows/12/definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different.", "/versions/14/tables/1/rows/13/definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally.", "/versions/14/tables/1/rows/14/definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally.", "/versions/14/tables/1/rows/15/definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true .", "/versions/14/tables/1/rows/16/definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "46c42fc56d831809969bee9a2321f800bfc1f3d25857c8d63a063950d171bd07"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "schema_name", "definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used."}, {"name": "table_name", "definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used."}, {"name": "column_name", "definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used."}, {"name": "use_remote_estimate", "definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false ."}, {"name": "fdw_startup_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 ."}, {"name": "fdw_tuple_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 ."}, {"name": "extensions", "definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly."}, {"name": "fetch_size", "definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 ."}, {"name": "batch_size", "definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error."}, {"name": "async_capable", "definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release."}, {"name": "updatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server."}, {"name": "truncatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server."}, {"name": "import_collate", "definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different."}, {"name": "import_default", "definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally."}, {"name": "import_generated", "definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally."}, {"name": "import_not_null", "definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true ."}, {"name": "keep_connections", "definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction."}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "source_options": [], "protocol_versions": {}}, "comparison_hash": "e327115bd7f57a8f520ccd0d811b9efedf52d040b03efbe8a94c24189fc0de63", "manual_language": "zh", "runtime_verified": false}, "15": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "postgres_fdw_handler"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "36"}, {"label": "\u6570\u636e\u6e90", "value": "\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u626b\u63cf\u6570\u636e\u884c", "callback": "IterateForeignScan", "implementation": "postgresIterateForeignScan"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "INSERT", "callback": "ExecForeignInsert", "implementation": "postgresExecForeignInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "UPDATE", "callback": "ExecForeignUpdate", "implementation": "postgresExecForeignUpdate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "DELETE", "callback": "ExecForeignDelete", "implementation": "postgresExecForeignDelete"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "ExecForeignTruncate", "implementation": "postgresExecForeignTruncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u8fde\u63a5\u8def\u5f84\u4e0b\u63a8", "callback": "GetForeignJoinPaths", "implementation": "postgresGetForeignJoinPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u4e0a\u5c42\u8def\u5f84\uff0c\u5305\u62ec\u805a\u5408", "callback": "GetForeignUpperPaths", "implementation": "postgresGetForeignUpperPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6279\u91cf\u63d2\u5165", "callback": "ExecForeignBatchInsert", "implementation": "postgresExecForeignBatchInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f02\u6b65\u8ffd\u52a0\u6267\u884c", "callback": "ForeignAsyncRequest", "implementation": "postgresForeignAsyncRequest"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5bfc\u5165\u6a21\u5f0f", "callback": "ImportForeignSchema", "implementation": "postgresImportForeignSchema"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "schema_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002"}, {"name": "table_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "column_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "use_remote_estimate", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 postgres_fdw \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b EXPLAIN \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "fdw_startup_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "fdw_tuple_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a 0.01 \u3002"}, {"name": "extensions", "definition": "\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 PostgreSQL \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002 \u4f7f\u7528 extensions \u9009\u9879\u65f6\uff0c \u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002"}, {"name": "fetch_size", "definition": "\u8be5\u9009\u9879\u6307\u5b9a postgres_fdw \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "batch_size", "definition": "\u6b64\u9009\u9879\u6307\u5b9a postgres_fdw \u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u5e94\u63d2\u5165\u7684\u884c\u6570\uff0c\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u8868\u7ea7\u8bbe\u7f6e\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u8bbe\u7f6e\uff0c\u9ed8\u8ba4\u503c\u4e3a 1\u3002\u5b9e\u9645\u4e00\u6b21\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u548c batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u4e00\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570\u4e58\u4ee5 batch_size \u8d85\u51fa\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u62a5\u9519\u3002"}, {"name": "async_capable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002 \u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c postgres_fdw \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002 \u5373\u4f7f Append \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 postgres_fdw \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002"}, {"name": "parallel_commit", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002 \u5982\u679c\u542f\u7528\u4e86\u6b64\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u3002 \u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002"}, {"name": "updatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 INSERT \u3001 UPDATE \u548c DELETE \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c information_schema \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 postgres_fdw \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002"}, {"name": "truncatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 TRUNCATE \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002"}, {"name": "import_collate", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 COLLATE \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002 \u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a true \uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 COLLATE \"default\" \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002"}, {"name": "import_default", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 DEFAULT \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b nextval() \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_generated", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 GENERATED \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_not_null", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 NOT NULL \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002"}, {"name": "keep_connections", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a on \u3002\u5982\u679c\u8bbe\u7f6e\u4e3a off \uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}], "related": [{"url": "/wiki/catalog/pg_foreign_data_wrapper/?v=15", "label": "Foreign-data wrapper \u7cfb\u7edf\u76ee\u5f55"}, {"url": "/e/postgres_fdw/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/plan/foreign-scan/?v=15", "label": "Foreign Scan \u8ba1\u5212\u8282\u70b9"}], "release": {"ref": "PostgreSQL 15.19 source archive", "label": "15.19", "major": "15", "channel": "stable", "revision": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89", "source_url": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/15/postgres-fdw.html", "path": "postgres-fdw.html", "label": "PostgreSQL 15 English manual", "sha256": "37cf2557c2a6bcdd5d9b182c71b3ccc1a29b44793f833adce54a20d7e8f449bd", "language": "en", "original_url": "/docs/15/postgres-fdw.html"}, {"url": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "line": 554, "path": "contrib/postgres_fdw/postgres_fdw.c", "label": "contrib/postgres_fdw/postgres_fdw.c:554", "sha256": "53934582837739133ef39fe04cb50bf5038d90394743cc72d869b00d84dbbfa4", "archive_sha256": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u5f02\u6b65\u6267\u884c\u9009\u9879", "paragraphs": ["postgres_fdw \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c Append \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406\u9009\u9879", "paragraphs": ["\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0cpostgres_fdw \u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u7ba1\u7406\u4e8b\u52a1\uff0c\u5e76\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u7ba1\u7406\u5b50\u4e8b\u52a1\u3002\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\u4f9d\u6b21\u63d0\u4ea4\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u65f6\u4f9d\u6b21\u63d0\u4ea4\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u6539\u5584\u6027\u80fd\uff1a"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406", "paragraphs": ["\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c postgres_fdw \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002", "\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a SERIALIZABLE \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \uff1b\u5426\u5219\u4f7f\u7528 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 SERIALIZABLE \u6216 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e READ COMMITTED \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 PostgreSQL \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002", "\u8bf7\u6ce8\u610f\uff0c postgres_fdw \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002"]}, {"title": "\u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316", "paragraphs": ["postgres_fdw \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 WHERE \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 WHERE \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 extensions \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f IMMUTABLE \u3002\u5bf9\u4e8e UPDATE \u6216 DELETE \u67e5\u8be2\uff0c postgres_fdw \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 WHERE \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 BEFORE \u6216 AFTER \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 CHECK OPTION \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 UPDATE \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001 IMMUTABLE \u64cd\u4f5c\u7b26\u6216 IMMUTABLE \u51fd\u6570\u3002", "\u5f53 postgres_fdw \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 JOIN \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 WHERE \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002", "\u53ef\u4ee5\u4f7f\u7528 EXPLAIN VERBOSE \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002"]}, {"title": "\u8de8\u7248\u672c\u517c\u5bb9\u6027", "paragraphs": ["postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002"]}, {"code": "{\n\tFdwRoutine *routine = makeNode(FdwRoutine);\n\n\t/* Functions for scanning foreign tables */\n\troutine->GetForeignRelSize = postgresGetForeignRelSize;\n\troutine->GetForeignPaths = postgresGetForeignPaths;\n\troutine->GetForeignPlan = postgresGetForeignPlan;\n\troutine->BeginForeignScan = postgresBeginForeignScan;\n\troutine->IterateForeignScan = postgresIterateForeignScan;\n\troutine->ReScanForeignScan = postgresReScanForeignScan;\n\troutine->EndForeignScan = postgresEndForeignScan;\n\n\t/* Functions for updating foreign tables */\n\troutine->AddForeignUpdateTargets = postgresAddForeignUpdateTargets;\n\troutine->PlanForeignModify = postgresPlanForeignModify;\n\troutine->BeginForeignModify = postgresBeginForeignModify;\n\troutine->ExecForeignInsert = postgresExecForeignInsert;\n\troutine->ExecForeignBatchInsert = postgresExecForeignBatchInsert;\n\troutine->GetForeignModifyBatchSize = postgresGetForeignModifyBatchSize;\n\troutine->ExecForeignUpdate = postgresExecForeignUpdate;\n\troutine->ExecForeignDelete = postgresExecForeignDelete;\n\troutine->EndForeignModify = postgresEndForeignModify;\n\troutine->BeginForeignInsert = postgresBeginForeignInsert;\n\troutine->EndForeignInsert = postgresEndForeignInsert;\n\troutine->IsForeignRelUpdatable = postgresIsForeignRelUpdatable;\n\troutine->PlanDirectModify = postgresPlanDirectModify;\n\troutine->BeginDirectModify = postgresBeginDirectModify;\n\troutine->IterateDirectModify = postgresIterateDirectModify;\n\troutine->EndDirectModify = postgresEndDirectModify;\n\n\t/* Function for EvalPlanQual rechecks */\n\troutine->RecheckForeignScan = postgresRecheckForeignScan;\n\t/* Support functions for EXPLAIN */\n\troutine->ExplainForeignScan = postgresExplainForeignScan;\n\troutine->ExplainForeignModify = postgresExplainForeignModify;\n\troutine->ExplainDirectModify = postgresExplainDirectModify;\n\n\t/* Support function for TRUNCATE */\n\troutine->ExecForeignTruncate = postgresExecForeignTruncate;\n\n\t/* Support functions for ANALYZE */\n\troutine->AnalyzeForeignTable = postgresAnalyzeForeignTable;\n\n\t/* Support functions for IMPORT FOREIGN SCHEMA */\n\troutine->ImportForeignSchema = postgresImportForeignSchema;\n\n\t/* Support functions for join push-down */\n\troutine->GetForeignJoinPaths = postgresGetForeignJoinPaths;\n\n\t/* Support functions for upper relation push-down */\n\troutine->GetForeignUpperPaths = postgresGetForeignUpperPaths;\n\n\t/* Support functions for asynchronous execution */\n\troutine->IsForeignPathAsyncCapable = postgresIsForeignPathAsyncCapable;\n\troutine->ForeignAsyncRequest = postgresForeignAsyncRequest;\n\troutine->ForeignAsyncConfigureWait = postgresForeignAsyncConfigureWait;\n\troutine->ForeignAsyncNotify = postgresForeignAsyncNotify;\n\n\tPG_RETURN_POINTER(routine);\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "description": ["\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002"], "manual_html": "<div class=\"sect1\" id=\"POSTGRES-FDW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">F.38.\u00a0postgres_fdw</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u6a21\u5757\u63d0\u4f9b\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668 <code class=\"literal\">postgres_fdw</code>\uff0c\u53ef\u7528\u4e8e\u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u672c\u6a21\u5757\u63d0\u4f9b\u7684\u529f\u80fd\u4e0e\u8f83\u65e7\u7684<a class=\"xref\" href=\"/docs/15/dblink.html\" title=\"F.12.\u00a0dblink\">dblink</a>\u6a21\u5757\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u91cd\u53e0\u3002\u4f46 <code class=\"filename\">postgres_fdw</code> \u4e3a\u8bbf\u95ee\u8fdc\u7a0b\u8868\u63d0\u4f9b\u4e86\u66f4\u900f\u660e\u4e14\u7b26\u5408\u6807\u51c6\u7684\u8bed\u6cd5\uff0c\u5e76\u4e14\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u6027\u80fd\u66f4\u597d\u3002</p>\n<p lang=\"zh\">\u8981\u51c6\u5907\u901a\u8fc7 <code class=\"filename\">postgres_fdw</code> \u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee\uff1a</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5b89\u88c5 <code class=\"filename\">postgres_fdw</code> \u6269\u5c55\uff0c\u53ef\u4f7f\u7528<a class=\"xref\" href=\"/docs/15/sql-createextension.html\" title=\"CREATE EXTENSION\"><span class=\"refentrytitle\">CREATE EXTENSION</span></a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u4f7f\u7528<a class=\"xref\" href=\"/docs/15/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u5bf9\u8c61\uff0c\u7528\u6765\u8868\u793a\u6bcf\u4e2a\u8981\u8fde\u63a5\u7684\u8fdc\u7a0b\u6570\u636e\u5e93\u3002\u5c06\u9664 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u4e4b\u5916\u7684\u8fde\u63a5\u4fe1\u606f\u6307\u5b9a\u4e3a\u670d\u52a1\u5668\u5bf9\u8c61\u7684\u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u9700\u8981\u83b7\u51c6\u8bbf\u95ee\u5404\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u7528\u6237\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/15/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u521b\u5efa\u7528\u6237\u6620\u5c04\u3002\u5c06\u8981\u4f7f\u7528\u7684\u8fdc\u7a0b\u7528\u6237\u540d\u548c\u5bc6\u7801\u6307\u5b9a\u4e3a\u7528\u6237\u6620\u5c04\u7684 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u8981\u8bbf\u95ee\u7684\u8fdc\u7a0b\u8868\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/15/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u6216<a class=\"xref\" href=\"/docs/15/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5916\u90e8\u8868\u7684\u5217\u5fc5\u987b\u4e0e\u88ab\u5f15\u7528\u7684\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u5728\u5916\u90e8\u8868\u5bf9\u8c61\u7684\u9009\u9879\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8fdc\u7a0b\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0e\u8fdc\u7a0b\u8868\u4e0d\u540c\u7684\u8868\u540d\u548c/\u6216\u5217\u540d\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\">\u73b0\u5728\uff0c\u53ea\u9700\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">SELECT</code>\uff0c\u5373\u53ef\u8bbf\u95ee\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u4e2d\u5b58\u50a8\u7684\u6570\u636e\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code>\u3001<code class=\"command\">COPY</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4fee\u6539\u8fdc\u7a0b\u8868\u3002\uff08\u5f53\u7136\uff0c\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\u7684\u8fdc\u7a0b\u7528\u6237\u5fc5\u987b\u62e5\u6709\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u6743\u9650\u3002\uff09</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5728\u8bbf\u95ee\u6216\u4fee\u6539\u8fdc\u7a0b\u8868\u65f6\uff0c<code class=\"literal\">ONLY</code> \u9009\u9879\u5728 <code class=\"command\">SELECT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4e2d\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n<p lang=\"zh\">postgres_fdw \u76ee\u524d\u4e0d\u652f\u6301\u5e26 ON CONFLICT DO UPDATE \u5b50\u53e5\u7684 INSERT\u3002\u4e0d\u8fc7\uff0c\u652f\u6301 ON CONFLICT DO NOTHING\uff0c\u524d\u63d0\u662f\u4e0d\u6307\u5b9a\u552f\u4e00\u7d22\u5f15\u63a8\u65ad\u6761\u4ef6\u3002postgres_fdw \u8fd8\u652f\u6301\u5728\u5206\u533a\u8868\u4e0a\u6267\u884c UPDATE \u6240\u89e6\u53d1\u7684\u884c\u79fb\u52a8\uff0c\u4f46\u76ee\u524d\u4e0d\u652f\u6301\u4ee5\u4e0b\u60c5\u51b5\uff1a\u7528\u4e8e\u63a5\u6536\u79fb\u5165\u884c\u7684\u8fdc\u7aef\u5206\u533a\uff0c\u540c\u65f6\u4e5f\u662f\u540c\u4e00\u547d\u4ee4\u4e2d\u5176\u4ed6\u4f4d\u7f6e\u5c06\u8981\u66f4\u65b0\u7684 UPDATE \u76ee\u6807\u5206\u533a\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5c06\u5916\u90e8\u8868\u7684\u5217\u58f0\u660e\u4e3a\u4e0e\u88ab\u5f15\u7528\u8fdc\u7a0b\u8868\u7684\u5bf9\u5e94\u5217\u5177\u6709\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u5728\u9002\u7528\u65f6\u5177\u6709\u76f8\u540c\u7684\u6392\u5e8f\u89c4\u5219\u3002\u5c3d\u7ba1 <code class=\"filename\">postgres_fdw</code> \u76ee\u524d\u5728\u6309\u9700\u6267\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u9762\u76f8\u5f53\u5bbd\u5bb9\uff0c\u4f46\u5f53\u7c7b\u578b\u6216\u6392\u5e8f\u89c4\u5219\u4e0d\u5339\u914d\u65f6\uff0c\u4ecd\u53ef\u80fd\u51fa\u73b0\u4ee4\u4eba\u610f\u5916\u7684\u8bed\u4e49\u5f02\u5e38\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5bf9\u67e5\u8be2\u6761\u4ef6\u7684\u89e3\u91ca\u53ef\u80fd\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5916\u90e8\u8868\u7684\u58f0\u660e\u53ef\u4ee5\u6bd4\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u5c11\u4e00\u4e9b\u5217\uff0c\u6216\u8005\u4f7f\u7528\u4e0d\u540c\u7684\u5217\u987a\u5e8f\u3002\u4e0e\u8fdc\u7a0b\u8868\u5217\u7684\u5339\u914d\u662f\u6309\u540d\u79f0\u800c\u4e0d\u662f\u6309\u4f4d\u7f6e\u8fdb\u884c\u7684\u3002</p>\n<div class=\"sect2\" id=\"id-1.11.7.47.11\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/postgres-fdw.html#POSTGRES-FDW-OPTIONS\">F.38.1. postgres_fdw \u7684 FDW \u9009\u9879</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.47.11.2\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.1.\u00a0\u8fde\u63a5\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528 <span class=\"application\">libpq</span> \u5728\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u63a5\u53d7\u7684\u76f8\u540c\u9009\u9879\uff0c\u8be6\u89c1<a class=\"xref\" href=\"/docs/15/libpq.html#LIBPQ-PARAMKEYWORDS\" title=\"34.1.2.\u00a0\u53c2\u6570\u5173\u952e\u8bcd\">\u7b2c\u00a034.1.2\u00a0\u8282</a>\uff1b\u4f46\u4ee5\u4e0b\u9009\u9879\u4e0d\u5141\u8bb8\u4f7f\u7528\uff0c\u6216\u4f1a\u88ab\u7279\u6b8a\u5904\u7406\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">user</code>\u3001<code class=\"literal\">password</code> \u548c <code class=\"literal\">sslpassword</code>\uff08\u8bf7\u6539\u4e3a\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\uff0c\u6216\u4f7f\u7528\u670d\u52a1\u6587\u4ef6\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">client_encoding</code>\uff08\u4f1a\u6839\u636e\u672c\u5730\u670d\u52a1\u5668\u7f16\u7801\u81ea\u52a8\u8bbe\u7f6e\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">application_name</code> \u53ef\u4ee5\u51fa\u73b0\u5728\u8fde\u63a5\u9009\u9879\u548c<a class=\"xref\" href=\"/docs/15/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u4e2d\u7684<span class=\"emphasis\"><em>\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c<code class=\"varname\">postgres_fdw.application_name</code> \u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002\u4e0e <span class=\"application\">libpq</span> \u4e0d\u540c\uff0c<code class=\"filename\">postgres_fdw</code> \u5141\u8bb8 <code class=\"varname\">application_name</code> \u5305\u542b<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/15/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">fallback_application_name</code>\uff08\u59cb\u7ec8\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres_fdw</code>\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">sslkey</code> \u548c <code class=\"literal\">sslcert</code> \u53ef\u4ee5\u51fa\u73b0\u5728<span class=\"emphasis\"><em>\u8fde\u63a5\u9009\u9879\u3001\u7528\u6237\u6620\u5c04\u4e2d\u7684\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c\u7528\u6237\u6620\u5c04\u8bbe\u7f6e\u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002</p>\n</li>\n</ul>\n</div>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u521b\u5efa\u6216\u4fee\u6539\u5e26\u6709 <code class=\"literal\">sslcert</code> \u6216 <code class=\"literal\">sslkey</code> \u8bbe\u7f6e\u7684\u7528\u6237\u6620\u5c04\u3002</p>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u4e0d\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\uff0c\u56e0\u6b64\u5e94\u59cb\u7ec8\u4e3a\u5c5e\u4e8e\u975e\u8d85\u7ea7\u7528\u6237\u7684\u7528\u6237\u6620\u5c04\u6307\u5b9a <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u7528\u6237\u6620\u5c04\u9009\u9879 <code class=\"literal\">password_required 'false'</code> \u6309\u7528\u6237\u6620\u5c04\u5355\u72ec\u8986\u76d6\u6b64\u68c0\u67e5\uff0c\u4f8b\u5982\uff1a</p>\n<pre class=\"programlisting\">ALTER USER MAPPING FOR some_non_superuser SERVER loopback_nopw\nOPTIONS (ADD password_required 'false');\n</pre>\n<p lang=\"zh\">\u4e3a\u4e86\u9632\u6b62\u975e\u7279\u6743\u7528\u6237\u5229\u7528 postgres \u670d\u52a1\u5668\u6240\u8fd0\u884c\u7684 unix \u7528\u6237\u7684\u8ba4\u8bc1\u6743\u9650\u63d0\u5347\u5230\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u5728\u7528\u6237\u6620\u5c04\u4e0a\u8bbe\u7f6e\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u5fc5\u987b\u8c28\u614e\uff0c\u786e\u4fdd\u8fd9\u4e0d\u4f1a\u4f7f\u6620\u5c04\u7528\u6237\u80fd\u591f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\u5230\u6620\u5c04\u7684\u6570\u636e\u5e93\uff0c\u53c2\u89c1 CVE-2007-3278 \u548c CVE-2007-6601\u3002\u4e0d\u8981\u4e3a public \u89d2\u8272\u8bbe\u7f6e password_required=false\u3002\u8bf7\u6ce8\u610f\uff0c\u6620\u5c04\u7528\u6237\u53ef\u80fd\u4f7f\u7528\u8fd0\u884c postgres \u670d\u52a1\u5668\u7684\u7cfb\u7edf\u7528\u6237\u7684 Unix \u4e3b\u76ee\u5f55\u4e2d\u7684\u4efb\u4f55\u5ba2\u6237\u7aef\u8bc1\u4e66\u3001.pgpass\u3001.pg_service.conf \u7b49\uff0c\u4e5f\u53ef\u80fd\u5229\u7528 peer\u3001ident \u7b49\u8ba4\u8bc1\u65b9\u5f0f\u6388\u4e88\u7684\u4efb\u4f55\u4fe1\u4efb\u5173\u7cfb\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.47.11.3\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.2.\u00a0\u5bf9\u8c61\u540d\u79f0\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u9009\u9879\u53ef\u7528\u4e8e\u63a7\u5236\u53d1\u9001\u5230\u8fdc\u7a0b <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u7684 SQL \u8bed\u53e5\u4e2d\u6240\u4f7f\u7528\u7684\u540d\u79f0\u3002\u5f53\u521b\u5efa\u5916\u90e8\u8868\u65f6\u6240\u7528\u7684\u540d\u79f0\u4e0e\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u7684\u540d\u79f0\u4e0d\u540c\u65f6\uff0c\u5c31\u9700\u8981\u8fd9\u4e9b\u9009\u9879\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">schema_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">table_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">column_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.47.11.4\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.3.\u00a0\u4ee3\u4ef7\u4f30\u7b97\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u901a\u8fc7\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u67e5\u8be2\u6765\u83b7\u53d6\u8fdc\u7a0b\u6570\u636e\uff0c\u56e0\u6b64\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u626b\u63cf\u5916\u90e8\u8868\u7684\u4f30\u8ba1\u4ee3\u4ef7\u5e94\u5f53\u7b49\u4e8e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b8c\u6210\u8be5\u64cd\u4f5c\u7684\u4ee3\u4ef7\uff0c\u518d\u52a0\u4e0a\u4e00\u4e9b\u901a\u4fe1\u5f00\u9500\u3002\u83b7\u5f97\u8fd9\u79cd\u4f30\u7b97\u6700\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u662f\u5411\u8fdc\u7a0b\u670d\u52a1\u5668\u8be2\u95ee\uff0c\u518d\u628a\u5f00\u9500\u52a0\u4e0a\u53bb\uff1b\u4f46\u5bf9\u4e8e\u7b80\u5355\u67e5\u8be2\uff0c\u4e3a\u4e86\u53d6\u5f97\u4ee3\u4ef7\u4f30\u7b97\u800c\u989d\u5916\u53d1\u9001\u4e00\u6b21\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ef\u80fd\u5e76\u4e0d\u5212\u7b97\u3002\u56e0\u6b64 <code class=\"filename\">postgres_fdw</code> \u63d0\u4f9b\u4ee5\u4e0b\u9009\u9879\u6765\u63a7\u5236\u4ee3\u4ef7\u4f30\u7b97\u7684\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">use_remote_estimate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b <code class=\"command\">EXPLAIN</code> \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_startup_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_tuple_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">0.01</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u771f\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4ece\u8fdc\u7a0b\u670d\u52a1\u5668\u83b7\u53d6\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u5047\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u5728\u672c\u5730\u6267\u884c\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u518d\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u9664\u975e\u6709\u8fdc\u7a0b\u8868\u7edf\u8ba1\u4fe1\u606f\u7684\u672c\u5730\u526f\u672c\u53ef\u7528\uff0c\u5426\u5219\u8fd9\u79cd\u672c\u5730\u4f30\u7b97\u4e0d\u592a\u53ef\u80fd\u975e\u5e38\u51c6\u786e\u3002\u66f4\u65b0\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c\u662f\u5728\u5916\u90e8\u8868\u4e0a\u8fd0\u884c<a class=\"xref\" href=\"/docs/15/sql-analyze.html\" title=\"ANALYZE\"><span class=\"refentrytitle\">ANALYZE</span></a>\uff1b\u8fd9\u6837\u4f1a\u626b\u63cf\u8fdc\u7a0b\u8868\uff0c\u7136\u540e\u50cf\u5bf9\u5f85\u672c\u5730\u8868\u4e00\u6837\u8ba1\u7b97\u5e76\u5b58\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u4fdd\u7559\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u8fdc\u7a0b\u8868\u6bcf\u6b21\u67e5\u8be2\u7684\u89c4\u5212\u5f00\u9500\uff1b\u4f46\u5982\u679c\u8fdc\u7a0b\u8868\u7ecf\u5e38\u66f4\u65b0\uff0c\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u5f88\u5feb\u5c31\u4f1a\u8fc7\u65f6\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.47.11.5\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.4.\u00a0\u8fdc\u7a0b\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709\u4f7f\u7528\u5185\u7f6e\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u624d\u4f1a\u88ab\u8003\u8651\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u3002\u6d89\u53ca\u975e\u5185\u7f6e\u51fd\u6570\u7684\u5b50\u53e5\u4f1a\u5728\u53d6\u56de\u884c\u4e4b\u540e\u5728\u672c\u5730\u68c0\u67e5\u3002\u5982\u679c\u8fd9\u4e9b\u51fd\u6570\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e5f\u53ef\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fe1\u5176\u7ed3\u679c\u4e0e\u672c\u5730\u76f8\u540c\uff0c\u5219\u5c06\u8fd9\u7c7b <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u7aef\u6267\u884c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u6b64\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">extensions</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 <span class=\"productname\">PostgreSQL</span> \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"literal\">extensions</code> \u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fetch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">batch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u4e2d\u5e94\u63d2\u5165\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">1</code>\u3002</p>\n<p lang=\"zh\">postgres_fdw \u6bcf\u6b21\u5b9e\u9645\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u4e0e\u6307\u5b9a\u7684 batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u5355\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7aef\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u91cf\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570 * batch_size \u8d85\u8fc7\u6b64\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u9519\u8bef\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.47.11.6\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.5.\u00a0\u5f02\u6b65\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c <code class=\"structname\">Append</code> \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">async_capable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n<p lang=\"zh\">\u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c<code class=\"filename\">postgres_fdw</code> \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f <code class=\"structname\">Append</code> \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.47.11.7\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.6.\u00a0\u4e8b\u52a1\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0cpostgres_fdw \u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u7ba1\u7406\u4e8b\u52a1\uff0c\u5e76\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u7ba1\u7406\u5b50\u4e8b\u52a1\u3002\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\u4f9d\u6b21\u63d0\u4ea4\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u65f6\u4f9d\u6b21\u63d0\u4ea4\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u6539\u5584\u6027\u80fd\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">parallel_commit</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u542f\u7528\u4e86\u6b64\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u3002</p>\n<p lang=\"zh\">\u542f\u7528\u6b64\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.47.11.8\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.7.\u00a0\u53ef\u66f4\u65b0\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u66f4\u65b0\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">updatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u548c <code class=\"command\">DELETE</code> \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c<code class=\"literal\">information_schema</code> \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.47.11.9\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.8.\u00a0\u53ef\u622a\u65ad\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u622a\u65ad\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">truncatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">TRUNCATE</code> \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.47.11.10\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.9.\u00a0\u5bfc\u5165\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/15/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u5bfc\u5165\u5916\u90e8\u8868\u5b9a\u4e49\u3002\u8be5\u547d\u4ee4\u4f1a\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4ee5\u5339\u914d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868\u6216\u89c6\u56fe\u3002\u5982\u679c\u8981\u5bfc\u5165\u7684\u8fdc\u7a0b\u8868\u5217\u4f7f\u7528\u7528\u6237\u5b9a\u4e49\u6570\u636e\u7c7b\u578b\uff0c\u5219\u672c\u5730\u670d\u52a1\u5668\u5fc5\u987b\u5b58\u5728\u540c\u540d\u4e14\u517c\u5bb9\u7684\u7c7b\u578b\u3002</p>\n<p lang=\"zh\">\u53ef\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\uff08\u5728 <code class=\"command\">IMPORT FOREIGN SCHEMA</code> \u547d\u4ee4\u4e2d\u7ed9\u51fa\uff09\u81ea\u5b9a\u4e49\u5bfc\u5165\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">import_collate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">COLLATE</code> \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a <code class=\"literal\">true</code>\uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 <code class=\"literal\">COLLATE \"default\"</code> \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_default</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">DEFAULT</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b<code class=\"function\">nextval()</code> \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_generated</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">GENERATED</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_not_null</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">NOT NULL</code> \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u9664 <code class=\"literal\">NOT NULL</code> \u4e4b\u5916\u7684\u7ea6\u675f\u6c38\u8fdc\u4e0d\u4f1a\u4ece\u8fdc\u7a0b\u8868\u5bfc\u5165\u3002\u867d\u7136 <span class=\"productname\">PostgreSQL</span> \u786e\u5b9e\u652f\u6301\u5728\u5916\u90e8\u8868\u4e0a\u5b9a\u4e49\u68c0\u67e5\u7ea6\u675f\uff0c\u4f46\u7531\u4e8e\u7ea6\u675f\u8868\u8fbe\u5f0f\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u6c42\u503c\u4e0d\u540c\uff0c\u7cfb\u7edf\u4e0d\u4f1a\u81ea\u52a8\u5bfc\u5165\u5b83\u4eec\u3002\u6b64\u7c7b\u884c\u4e3a\u4e0d\u4e00\u81f4\u7684\u68c0\u67e5\u7ea6\u675f\uff0c\u53ef\u80fd\u5bfc\u81f4\u67e5\u8be2\u4f18\u5316\u4e2d\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5e0c\u671b\u5bfc\u5165\u68c0\u67e5\u7ea6\u675f\uff0c\u5fc5\u987b\u624b\u5de5\u5b8c\u6210\uff0c\u5e76\u5e94\u4ed4\u7ec6\u6838\u5b9e\u6bcf\u4e00\u4e2a\u7ea6\u675f\u7684\u8bed\u4e49\u3002\u6709\u5173\u5916\u90e8\u8868\u4e0a\u68c0\u67e5\u7ea6\u675f\u5904\u7406\u65b9\u5f0f\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/15/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u3002</p>\n<p lang=\"zh\">\u4f5c\u4e3a\u5176\u4ed6\u8868\u5206\u533a\u7684\u8868\u6216\u5916\u90e8\u8868\uff0c\u4ec5\u5728\u5b83\u4eec\u88ab\u660e\u786e\u5199\u5165 <code class=\"literal\">LIMIT TO</code> \u5b50\u53e5\u65f6\u624d\u4f1a\u5bfc\u5165\u3002\u5426\u5219\uff0c\u5b83\u4eec\u4f1a\u88ab\u81ea\u52a8\u6392\u9664\u5728<a class=\"xref\" href=\"/docs/15/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u4e4b\u5916\u3002\u7531\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u901a\u8fc7\u4f5c\u4e3a\u5206\u533a\u5c42\u6b21\u6839\u7684\u5206\u533a\u8868\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ea\u5bfc\u5165\u5206\u533a\u8868\u5373\u53ef\u8bbf\u95ee\u5168\u90e8\u6570\u636e\uff0c\u800c\u65e0\u9700\u521b\u5efa\u989d\u5916\u5bf9\u8c61\u3002</p>\n</div>\n<div class=\"sect3\" id=\"id-1.11.7.47.11.11\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.10.\u00a0\u8fde\u63a5\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u672c\u5730\u4f1a\u8bdd\u4e2d\u4fdd\u6301\u6253\u5f00\uff0c\u4ee5\u4fbf\u91cd\u590d\u4f7f\u7528\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">keep_connections</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">on</code>\u3002\u5982\u679c\u8bbe\u7f6e\u4e3a <code class=\"literal\">off</code>\uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.47.12\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/postgres-fdw.html#POSTGRES-FDW-FUNCTIONS\">F.38.2. \u51fd\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_get_connections(OUT server_name text, OUT valid boolean) returns setof record</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u8fd4\u56de<code class=\"filename\">postgres_fdw</code>\u4ece\u672c\u5730\u4f1a\u8bdd\u5411\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6240\u6709\u6253\u5f00\u8fde\u63a5\u7684\u5916\u90e8\u670d\u52a1\u5668\u540d\u79f0\u3002\u5b83\u8fd8\u8fd4\u56de\u6bcf\u4e2a\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002\u5982\u679c\u5916\u90e8\u670d\u52a1\u5668\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u88ab\u4f7f\u7528\uff0c\u4f46\u5176\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u88ab\u66f4\u6539\u6216\u5220\u9664\uff0c\u5219\u8fd4\u56de<code class=\"literal\">false</code>\uff08\u6ce8\u610f\uff0c\u5982\u679c\u670d\u52a1\u5668\u88ab\u5220\u9664\uff0c\u65e0\u6548\u8fde\u63a5\u7684\u670d\u52a1\u5668\u540d\u79f0\u5c06\u4e3a<code class=\"literal\">NULL</code>\uff09\uff0c\u7136\u540e\u8fd9\u6837\u7684\u65e0\u6548\u8fde\u63a5\u5c06\u5728\u8be5\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u5173\u95ed\u3002\u5426\u5219\u8fd4\u56de<code class=\"literal\">true</code>\u3002\u5982\u679c\u6ca1\u6709\u6253\u5f00\u7684\u8fde\u63a5\uff0c\u5219\u4e0d\u8fd4\u56de\u4efb\u4f55\u8bb0\u5f55\u3002\u8be5\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT * FROM postgres_fdw_get_connections() ORDER BY 1;\n server_name | valid\n-------------+-------\n loopback1   | t\n loopback2   | f\n</pre>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect(server_name text) returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u8bf7\u6ce8\u610f\uff0c\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\u65f6\uff0c\u5bf9\u540c\u4e00\u670d\u52a1\u5668\u53ef\u80fd\u5b58\u5728\u591a\u4e2a\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u5982\u679c\u627e\u4e0d\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u62a5\u544a\u9519\u8bef\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect('loopback1');\n postgres_fdw_disconnect\n-------------------------\n t\n</pre>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect_all() returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5168\u90e8\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect_all();\n postgres_fdw_disconnect_all\n-----------------------------\n t\n</pre>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.47.13\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/postgres-fdw.html#POSTGRES-FDW-CONNECTION-MANAGEMENT\">F.38.3. \u8fde\u63a5\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u5728\u9996\u6b21\u6267\u884c\u4f7f\u7528\u4e0e\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u5173\u8054\u7684\u5916\u90e8\u8868\u7684\u67e5\u8be2\u65f6\uff0c\u4f1a\u5efa\u7acb\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8be5\u8fde\u63a5\u4f1a\u5728\u540c\u4e00\u4f1a\u8bdd\u4e2d\u4fdd\u7559\u5e76\u4f9b\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u3002\u8fd9\u4e00\u884c\u4e3a\u53ef\u901a\u8fc7\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\u63a7\u5236\u3002\u5982\u679c\u4f7f\u7528\u591a\u4e2a\u7528\u6237\u6807\u8bc6\uff08\u7528\u6237\u6620\u5c04\uff09\u8bbf\u95ee\u8be5\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u4f1a\u4e3a\u6bcf\u4e2a\u7528\u6237\u6620\u5c04\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002</p>\n<p lang=\"zh\">\u5f53\u66f4\u6539\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u7684\u5b9a\u4e49\uff0c\u6216\u5c06\u5176\u5220\u9664\u65f6\uff0c\u76f8\u5173\u8fde\u63a5\u4f1a\u88ab\u5173\u95ed\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c\u5982\u679c\u4efb\u4f55\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u5728\u4f7f\u7528\uff0c\u5219\u4f1a\u4fdd\u7559\u5230\u4e8b\u52a1\u7ed3\u675f\u3002\u5173\u95ed\u7684\u8fde\u63a5\u4f1a\u5728\u540e\u7eed\u4f7f\u7528\u5916\u90e8\u8868\u7684\u67e5\u8be2\u9700\u8981\u5b83\u4eec\u65f6\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\">\u4e00\u65e6\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5b83\u4f1a\u4e00\u76f4\u4fdd\u7559\u5230\u672c\u5730\u4f1a\u8bdd\u6216\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u9000\u51fa\u3002\u8981\u663e\u5f0f\u65ad\u5f00\u8fde\u63a5\uff0c\u53ef\u4ee5\u7981\u7528\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\uff0c\u6216\u4f7f\u7528 <code class=\"function\">postgres_fdw_disconnect</code> \u548c <code class=\"function\">postgres_fdw_disconnect_all</code> \u51fd\u6570\u3002\u4f8b\u5982\uff0c\u8fd9\u4e9b\u51fd\u6570\u53ef\u7528\u4e8e\u5173\u95ed\u4e0d\u518d\u9700\u8981\u7684\u8fde\u63a5\uff0c\u4ece\u800c\u91ca\u653e\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u8fde\u63a5\u8d44\u6e90\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.47.14\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/postgres-fdw.html#POSTGRES-FDW-TRANSACTION-MANAGEMENT\">F.38.4. \u4e8b\u52a1\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c<code class=\"filename\">postgres_fdw</code> \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002</p>\n<p lang=\"zh\">\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a <code class=\"literal\">SERIALIZABLE</code> \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code>\uff1b\u5426\u5219\u4f7f\u7528 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code> \u6216 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e <code class=\"literal\">READ COMMITTED</code> \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 <span class=\"productname\">PostgreSQL</span> \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c<code class=\"filename\">postgres_fdw</code> \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.47.15\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">F.38.5. \u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 <code class=\"literal\">extensions</code> \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f <code class=\"literal\">IMMUTABLE</code>\u3002\u5bf9\u4e8e <code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u67e5\u8be2\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 <code class=\"literal\">BEFORE</code> \u6216 <code class=\"literal\">AFTER</code> \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 <code class=\"literal\">CHECK OPTION</code> \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 <code class=\"command\">UPDATE</code> \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001<code class=\"literal\">IMMUTABLE</code> \u64cd\u4f5c\u7b26\u6216 <code class=\"literal\">IMMUTABLE</code> \u51fd\u6570\u3002</p>\n<p lang=\"zh\">\u5f53 <code class=\"filename\">postgres_fdw</code> \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 <code class=\"literal\">JOIN</code> \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">EXPLAIN VERBOSE</code> \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.47.16\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">F.38.6. \u8fdc\u7a0b\u67e5\u8be2\u6267\u884c\u73af\u5883</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728 <code class=\"filename\">postgres_fdw</code> \u6253\u5f00\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u4e2d\uff0c<a class=\"xref\" href=\"/docs/15/runtime-config-client.html#GUC-SEARCH-PATH\">search_path</a>\u53c2\u6570\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u5305\u542b <code class=\"literal\">pg_catalog</code>\uff0c\u8fd9\u6837\u65e0\u9700\u6a21\u5f0f\u9650\u5b9a\u5c31\u53ea\u80fd\u770b\u5230\u5185\u7f6e\u5bf9\u8c61\u3002\u8fd9\u5bf9 <code class=\"filename\">postgres_fdw</code> \u81ea\u8eab\u751f\u6210\u7684\u67e5\u8be2\u4e0d\u662f\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u603b\u662f\u63d0\u4f9b\u8fd9\u79cd\u9650\u5b9a\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bf9\u90a3\u4e9b\u901a\u8fc7\u8fdc\u7a0b\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u6216\u89c4\u5219\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u51fd\u6570\u5e26\u6765\u98ce\u9669\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u89c6\u56fe\uff0c\u5219\u8be5\u89c6\u56fe\u4e2d\u4f7f\u7528\u7684\u4efb\u4f55\u51fd\u6570\u90fd\u4f1a\u5728\u53d7\u9650\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u6267\u884c\u3002\u5efa\u8bae\u5728\u8fd9\u7c7b\u51fd\u6570\u4e2d\u5bf9\u6240\u6709\u540d\u79f0\u90fd\u5199\u6210\u5e26\u6a21\u5f0f\u9650\u5b9a\u7684\u5f62\u5f0f\uff0c\u6216\u8005\u4e3a\u8fd9\u7c7b\u51fd\u6570\u9644\u52a0 <code class=\"literal\">SET search_path</code> \u9009\u9879\uff08\u89c1<a class=\"xref\" href=\"/docs/15/sql-createfunction.html\" title=\"CREATE FUNCTION\"><span class=\"refentrytitle\">CREATE FUNCTION</span></a>\uff09\uff0c\u4ee5\u5efa\u7acb\u5176\u9884\u671f\u7684\u641c\u7d22\u8def\u5f84\u73af\u5883\u3002</p>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u8fd8\u4f1a\u4e3a\u8fdc\u7a0b\u4f1a\u8bdd\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/15/runtime-config-client.html#GUC-TIMEZONE\">TimeZone</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">UTC</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/15/runtime-config-client.html#GUC-DATESTYLE\">DateStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">ISO</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/15/runtime-config-client.html#GUC-INTERVALSTYLE\">IntervalStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\u5bf9\u4e8e 9.0 \u53ca\u66f4\u65b0\u7248\u672c\u7684\u8fdc\u7aef\u670d\u52a1\u5668\uff0cextra_float_digits \u8bbe\u4e3a 3\uff1b\u66f4\u65e9\u7248\u672c\u5219\u8bbe\u4e3a 2\u3002</li>\n</ul>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u8bbe\u7f6e\u901a\u5e38\u4e0d\u50cf <code class=\"varname\">search_path</code> \u90a3\u6837\u5bb9\u6613\u51fa\u95ee\u9898\uff0c\u4f46\u5982\u679c\u6709\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684 <code class=\"literal\">SET</code> \u9009\u9879\u5904\u7406\u3002</p>\n<p lang=\"zh\"><span class=\"emphasis\"><em>\u4e0d</em></span>\u5efa\u8bae\u901a\u8fc7\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u7684\u4f1a\u8bdd\u7ea7\u8bbe\u7f6e\u6765\u8986\u76d6\u8fd9\u79cd\u884c\u4e3a\uff1b\u8fd9\u5f88\u53ef\u80fd\u5bfc\u81f4 <code class=\"filename\">postgres_fdw</code> \u5de5\u4f5c\u5f02\u5e38\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.47.17\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/postgres-fdw.html#POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">F.38.7. \u8de8\u7248\u672c\u517c\u5bb9\u6027</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.47.18\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/postgres-fdw.html#POSTGRES-FDW-CONFIGURATION-PARAMETERS\">F.38.8. \u914d\u7f6e\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt id=\"GUC-PGFDW-APPLICATION-NAME\"><span class=\"term\"><code class=\"varname\">postgres_fdw.application_name</code> (<code class=\"type\">string</code>) </span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a\u7528\u4e8e<a class=\"xref\" href=\"/docs/15/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u914d\u7f6e\u53c2\u6570\u7684\u503c\uff0c\u8be5\u503c\u4f1a\u5728 <code class=\"filename\">postgres_fdw</code> \u5efa\u7acb\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u65f6\u4f7f\u7528\u3002\u8fd9\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u5bf9\u8c61\u7684 <code class=\"varname\">application_name</code> \u9009\u9879\u3002\u8bf7\u6ce8\u610f\uff0c\u4fee\u6539\u6b64\u53c2\u6570\u4e0d\u4f1a\u5f71\u54cd\u4efb\u4f55\u73b0\u6709\u8fde\u63a5\uff0c\u9664\u975e\u8fd9\u4e9b\u8fde\u63a5\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\"><code class=\"varname\">postgres_fdw.application_name</code> \u53ef\u4ee5\u662f\u4efb\u610f\u957f\u5ea6\u7684\u4efb\u610f\u5b57\u7b26\u4e32\uff0c\u751a\u81f3\u53ef\u4ee5\u5305\u542b\u975e ASCII \u5b57\u7b26\u3002\u4e0d\u8fc7\uff0c\u5f53\u5b83\u88ab\u4f20\u9012\u5e76\u4f5c\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u4e2d\u7684 <code class=\"varname\">application_name</code> \u4f7f\u7528\u65f6\uff0c\u8bf7\u6ce8\u610f\u5b83\u4f1a\u88ab\u622a\u65ad\u5230\u5c11\u4e8e <code class=\"symbol\">NAMEDATALEN</code> \u4e2a\u5b57\u7b26\uff0c\u4e14\u9664\u53ef\u6253\u5370 ASCII \u5b57\u7b26\u4ee5\u5916\u7684\u6240\u6709\u5b57\u7b26\u90fd\u4f1a\u88ab\u66ff\u6362\u4e3a\u95ee\u53f7\uff08<code class=\"literal\">?</code>\uff09\u3002\u6709\u5173\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/15/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u3002</p>\n<p lang=\"zh\"><code class=\"literal\">%</code> \u5b57\u7b26\u8868\u793a<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u7684\u5f00\u59cb\uff0c\u5e76\u4f1a\u6309\u4e0b\u8ff0\u65b9\u5f0f\u66ff\u6362\u4e3a\u72b6\u6001\u4fe1\u606f\u3002\u672a\u8bc6\u522b\u7684\u8f6c\u4e49\u4f1a\u88ab\u5ffd\u7565\u3002\u5176\u4ed6\u5b57\u7b26\u4f1a\u539f\u6837\u590d\u5236\u5230\u5e94\u7528\u540d\u4e2d\u3002\u8bf7\u6ce8\u610f\uff0c\u4e0d\u5141\u8bb8\u5728 <code class=\"literal\">%</code> \u4e0e\u9009\u9879\u5b57\u6bcd\u4e4b\u95f4\u6307\u5b9a\u6b63\u8d1f\u53f7\u6216\u6570\u5b57\u5b57\u9762\u91cf\u6765\u8fdb\u884c\u5bf9\u9f50\u548c\u586b\u5145\u3002</p>\n<div class=\"informaltable\">\n<table class=\"informaltable\">\n<thead>\n<tr>\n<th lang=\"zh\">\u8f6c\u4e49\u5e8f\u5217</th>\n<th lang=\"zh\">\u6548\u679c</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"literal\">%a</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u5e94\u7528\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%c</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u4f1a\u8bdd ID\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/15/runtime-config-logging.html#GUC-LOG-LINE-PREFIX\">log_line_prefix</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%C</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u96c6\u7c07\u540d\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/15/runtime-config-logging.html#GUC-CLUSTER-NAME\">cluster_name</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%u</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u7528\u6237\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%d</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u5e93\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%p</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u540e\u7aef\u7684\u8fdb\u7a0b ID</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%%</code></td>\n<td lang=\"zh\">\u5b57\u9762\u5b57\u7b26 %</td>\n</tr>\n</tbody>\n</table>\n</div>\n<p lang=\"zh\">\u4f8b\u5982\uff0c\u5047\u8bbe\u7528\u6237 local_user \u4ece\u6570\u636e\u5e93 local_db \u4ee5 foreign_user \u8eab\u4efd\u8fde\u63a5\u5230 foreign_db\uff0c\u5219\u8bbe\u7f6e 'db=%d, user=%u' \u4f1a\u66ff\u6362\u4e3a 'db=local_db, user=local_user'\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.47.19\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/postgres-fdw.html#POSTGRES-FDW-EXAMPLES\">F.38.9. \u793a\u4f8b</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4e0b\u9762\u662f\u4f7f\u7528 <code class=\"literal\">postgres_fdw</code> \u521b\u5efa\u5916\u90e8\u8868\u7684\u4e00\u4e2a\u793a\u4f8b\u3002\u9996\u5148\u5b89\u88c5\u6269\u5c55\uff1a</p>\n<pre class=\"programlisting\">CREATE EXTENSION postgres_fdw;\n</pre>\n<p lang=\"zh\">\u7136\u540e\u4f7f\u7528<a class=\"xref\" href=\"/docs/15/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8fde\u63a5\u5230\u4e00\u53f0 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\uff0c\u5b83\u8fd0\u884c\u5728\u4e3b\u673a <code class=\"literal\">192.83.123.89</code> \u4e0a\u5e76\u76d1\u542c <code class=\"literal\">5432</code> \u7aef\u53e3\u3002\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"literal\">foreign_db</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER foreign_server\n        FOREIGN DATA WRAPPER postgres_fdw\n        OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');\n</pre>\n<p lang=\"zh\">\u8fd8\u9700\u8981\u7528<a class=\"xref\" href=\"/docs/15/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u5b9a\u4e49\u4e00\u4e2a\u7528\u6237\u6620\u5c04\uff0c\u4ee5\u6807\u8bc6\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u54ea\u4e2a\u89d2\u8272\uff1a</p>\n<pre class=\"programlisting\">CREATE USER MAPPING FOR local_user\n        SERVER foreign_server\n        OPTIONS (user 'foreign_user', password 'password');\n</pre>\n<p lang=\"zh\">\u73b0\u5728\u5c31\u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/15/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u521b\u5efa\u5916\u90e8\u8868\u4e86\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"structname\">some_schema.some_table</code> \u7684\u8868\u3002\u5b83\u5728\u672c\u5730\u7684\u540d\u79f0\u5c06\u662f <code class=\"structname\">foreign_table</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE FOREIGN TABLE foreign_table (\n        id integer NOT NULL,\n        data text\n)\n        SERVER foreign_server\n        OPTIONS (schema_name 'some_schema', table_name 'some_table');\n</pre>\n<p lang=\"zh\">\u5728 <code class=\"command\">CREATE FOREIGN TABLE</code> \u4e2d\u58f0\u660e\u7684\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u5176\u4ed6\u5c5e\u6027\uff0c\u5fc5\u987b\u4e0e\u5b9e\u9645\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u5217\u540d\u4e5f\u5fc5\u987b\u5339\u914d\uff0c\u9664\u975e\u4e3a\u5404\u4e2a\u5217\u9644\u52a0 <code class=\"literal\">column_name</code> \u9009\u9879\u6765\u6307\u660e\u5b83\u4eec\u5728\u8fdc\u7a0b\u8868\u4e2d\u7684\u540d\u79f0\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u76f8\u6bd4\u624b\u5de5\u6784\u9020\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4f7f\u7528 <a class=\"link\" href=\"/docs/15/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><code class=\"command\">IMPORT FOREIGN SCHEMA</code></a> \u66f4\u53ef\u53d6\u3002</p>\n</div>\n<div class=\"sect2\" id=\"id-1.11.7.47.20\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/15/postgres-fdw.html#POSTGRES-FDW-AUTHOR\">F.38.10. \u4f5c\u8005</a></span></h3>\n</div>\n</div>\n</div>\n<p>Shigeru Hanada <code class=\"email\">&lt;<a class=\"email\" href=\"mailto:shigeru.hanada@gmail.com\">shigeru.hanada@gmail.com</a>&gt;</code></p>\n</div>\n</div>", "manual_path": "/docs/15/postgres-fdw.html", "localization": {"status": "complete", "sources": [{"url": "/docs/15/postgres-fdw.html", "method": "same-major semantic node", "sha256": "e632949821892c513371fb7bafedd7f403e8771d0b0b44881725ab3ecf4ea763", "language": "zh", "matched_nodes": ["#POSTGRES-FDW/div[12]/div[10]/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[10]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/div[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[4]", "#POSTGRES-FDW/div[12]/div[1]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/p[3]", "#POSTGRES-FDW/div[12]/div[1]/p[4]", "#POSTGRES-FDW/div[12]/div[1]/p[5]", "#POSTGRES-FDW/div[12]/div[1]/p[7]", "#POSTGRES-FDW/div[12]/div[2]/div[0]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[2]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/div[0]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[3]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/p[3]", "#POSTGRES-FDW/div[12]/div[4]/div[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[12]/div[5]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/div[0]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[12]/div[7]/div[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[7]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/div[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[7]", "#POSTGRES-FDW/div[12]/div[9]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/p[2]", "#POSTGRES-FDW/div[12]/div[9]/p[4]", "#POSTGRES-FDW/div[12]/div[9]/p[5]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[14]/p[1]", "#POSTGRES-FDW/div[14]/p[2]", "#POSTGRES-FDW/div[14]/p[3]", "#POSTGRES-FDW/div[15]/p[1]", "#POSTGRES-FDW/div[15]/p[2]", "#POSTGRES-FDW/div[15]/p[3]", "#POSTGRES-FDW/div[16]/p[1]", "#POSTGRES-FDW/div[16]/p[2]", "#POSTGRES-FDW/div[16]/p[3]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[0]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[1]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[2]", "#POSTGRES-FDW/div[17]/p[1]", "#POSTGRES-FDW/div[17]/p[2]", "#POSTGRES-FDW/div[17]/p[4]", "#POSTGRES-FDW/div[17]/p[5]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[0]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[1]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[2]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[3]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[4]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[5]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[6]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[0]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[0]", "#POSTGRES-FDW/div[1]/dl[0]/dt[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[4]", "#POSTGRES-FDW/div[1]/dl[0]/dt[5]", "#POSTGRES-FDW/div[1]/dl[0]/dt[6]", "#POSTGRES-FDW/div[1]/dl[0]/dt[7]", "#POSTGRES-FDW/div[1]/dl[0]/dt[8]", "#POSTGRES-FDW/div[1]/dl[0]/dt[9]", "#POSTGRES-FDW/div[20]/p[1]", "#POSTGRES-FDW/div[20]/p[3]", "#POSTGRES-FDW/div[20]/p[5]", "#POSTGRES-FDW/div[20]/p[7]", "#POSTGRES-FDW/div[20]/p[9]", "#POSTGRES-FDW/div[6]/ol[0]/li[0]", "#POSTGRES-FDW/div[6]/ol[0]/li[1]", "#POSTGRES-FDW/div[6]/ol[0]/li[2]", "#POSTGRES-FDW/div[6]/ol[0]/li[3]", "#POSTGRES-FDW/p[10]", "#POSTGRES-FDW/p[11]", "#POSTGRES-FDW/p[3]", "#POSTGRES-FDW/p[4]", "#POSTGRES-FDW/p[5]", "#POSTGRES-FDW/p[7]", "#POSTGRES-FDW/p[8]"]}], "language": "zh", "original_text": {"/versions/15/description/0": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/versions/15/facts/0/label": "Interface family", "/versions/15/facts/0/value": "Foreign-data wrapper", "/versions/15/facts/1/label": "Handler or routine", "/versions/15/facts/2/label": "Recorded callbacks", "/versions/15/facts/3/label": "Data source", "/versions/15/facts/3/value": "Remote PostgreSQL servers", "/versions/15/tables/0/title": "Registered interface handlers", "/versions/15/tables/1/title": "Documented options", "/versions/15/related/0/label": "Foreign-data wrapper catalog", "/versions/15/related/1/label": "Existing extension catalogue identity", "/versions/15/related/2/label": "Foreign Scan plan node", "/versions/15/sections/0/title": "Interface and capability boundaries", "/versions/15/sections/1/title": "Asynchronous Execution Options", "/versions/15/sections/2/title": "Transaction Management Options", "/versions/15/sections/3/title": "Transaction Management", "/versions/15/sections/4/title": "Remote Query Optimization", "/versions/15/sections/5/title": "Cross-Version Compatibility", "/versions/15/sections/6/title": "Registered implementation in core source", "/versions/15/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/15/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/15/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/15/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/15/sections/1/paragraphs/0": "postgres_fdw supports asynchronous execution, which runs multiple parts of an Append node concurrently rather than serially to improve performance. This execution can be controlled using the following option:", "/versions/15/sections/2/paragraphs/0": "As described in the Transaction Management section, in postgres_fdw transactions are managed by creating corresponding remote transactions, and subtransactions are managed by creating corresponding remote subtransactions. When multiple remote transactions are involved in the current local transaction, by default postgres_fdw commits those remote transactions serially when the local transaction is committed. When multiple remote subtransactions are involved in the current local subtransaction, by default postgres_fdw commits those remote subtransactions serially when the local subtransaction is committed. Performance can be improved with the following option:", "/versions/15/sections/3/paragraphs/0": "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints.", "/versions/15/sections/3/paragraphs/1": "The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local transaction uses SERIALIZABLE or REPEATABLE READ isolation level, but it might be surprising for a READ COMMITTED local transaction. A future PostgreSQL release might modify these rules.", "/versions/15/sections/3/paragraphs/2": "Note that it is currently not supported by postgres_fdw to prepare the remote transaction for two-phase commit.", "/versions/15/sections/4/paragraphs/0": "postgres_fdw attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by sending query WHERE clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, WHERE clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an extension that's listed in the foreign server's extensions option. Operators and functions in such clauses must be IMMUTABLE as well. For an UPDATE or DELETE query, postgres_fdw attempts to optimize the query execution by sending the whole query to the remote server if there are no query WHERE clauses that cannot be sent to the remote server, no local joins for the query, no row-level local BEFORE or AFTER triggers or stored generated columns on the target table, and no CHECK OPTION constraints from parent views. In UPDATE , expressions to assign to target columns must use only built-in data types, IMMUTABLE operators, or IMMUTABLE functions, to reduce the risk of misexecution of the query.", "/versions/15/sections/4/paragraphs/1": "When postgres_fdw encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved are subject to different user mappings. While sending the JOIN clauses, it takes the same precautions as mentioned above for the WHERE clauses.", "/versions/15/sections/4/paragraphs/2": "The query that is actually sent to the remote server for execution can be examined using EXPLAIN VERBOSE .", "/versions/15/sections/5/paragraphs/0": "postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1. A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent to it for execution, resulting in \u201c function does not exist \u201d or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table reference in a sub- SELECT with OFFSET 0 as an optimization fence, and placing the problematic function or operator outside the sub- SELECT .", "/versions/15/tables/0/rows/0/feature": "Scan rows", "/versions/15/tables/0/rows/5/feature": "Join path pushdown", "/versions/15/tables/0/rows/6/feature": "Upper paths, including aggregation", "/versions/15/tables/0/rows/7/feature": "Batch insert", "/versions/15/tables/0/rows/8/feature": "Asynchronous append execution", "/versions/15/tables/0/rows/9/feature": "Import schema", "/versions/15/tables/0/columns/0/label": "Interface operation", "/versions/15/tables/0/columns/1/label": "Source observation", "/versions/15/tables/0/columns/2/label": "Callback", "/versions/15/tables/0/columns/3/label": "Implementation", "/versions/15/tables/1/columns/0/label": "Option", "/versions/15/tables/1/columns/1/label": "Same-version definition", "/versions/15/tables/1/rows/0/definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used.", "/versions/15/tables/1/rows/1/definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used.", "/versions/15/tables/1/rows/2/definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used.", "/versions/15/tables/1/rows/3/definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false .", "/versions/15/tables/1/rows/4/definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 .", "/versions/15/tables/1/rows/5/definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 .", "/versions/15/tables/1/rows/6/definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.", "/versions/15/tables/1/rows/7/definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 .", "/versions/15/tables/1/rows/8/definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error.", "/versions/15/tables/1/rows/9/definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release.", "/versions/15/tables/1/rows/10/definition": "This option controls whether postgres_fdw commits in parallel remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false . If multiple foreign servers with this option enabled are involved in a local transaction, multiple remote transactions on those foreign servers are committed in parallel across those foreign servers when the local transaction is committed. When this option is enabled, a foreign server with many remote transactions may see a negative performance impact when the local transaction is committed.", "/versions/15/tables/1/rows/11/definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server.", "/versions/15/tables/1/rows/12/definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server.", "/versions/15/tables/1/rows/13/definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different.", "/versions/15/tables/1/rows/14/definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally.", "/versions/15/tables/1/rows/15/definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally.", "/versions/15/tables/1/rows/16/definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true .", "/versions/15/tables/1/rows/17/definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "f2da80ff2f0bb772e345d73df2b29119a4dea3364e3945166ff6fe69e1f07739"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "schema_name", "definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used."}, {"name": "table_name", "definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used."}, {"name": "column_name", "definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used."}, {"name": "use_remote_estimate", "definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false ."}, {"name": "fdw_startup_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 ."}, {"name": "fdw_tuple_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 ."}, {"name": "extensions", "definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly."}, {"name": "fetch_size", "definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 ."}, {"name": "batch_size", "definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error."}, {"name": "async_capable", "definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release."}, {"name": "parallel_commit", "definition": "This option controls whether postgres_fdw commits in parallel remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false . If multiple foreign servers with this option enabled are involved in a local transaction, multiple remote transactions on those foreign servers are committed in parallel across those foreign servers when the local transaction is committed. When this option is enabled, a foreign server with many remote transactions may see a negative performance impact when the local transaction is committed."}, {"name": "updatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server."}, {"name": "truncatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server."}, {"name": "import_collate", "definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different."}, {"name": "import_default", "definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally."}, {"name": "import_generated", "definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally."}, {"name": "import_not_null", "definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true ."}, {"name": "keep_connections", "definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction."}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "source_options": [], "protocol_versions": {}}, "comparison_hash": "411085e71fe8ddc2c8a938b4fa405a9bb8dacdf0d623407308ae18e89cef010c", "manual_language": "zh", "runtime_verified": false}, "16": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "postgres_fdw_handler"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "36"}, {"label": "\u6570\u636e\u6e90", "value": "\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u626b\u63cf\u6570\u636e\u884c", "callback": "IterateForeignScan", "implementation": "postgresIterateForeignScan"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "INSERT", "callback": "ExecForeignInsert", "implementation": "postgresExecForeignInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "UPDATE", "callback": "ExecForeignUpdate", "implementation": "postgresExecForeignUpdate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "DELETE", "callback": "ExecForeignDelete", "implementation": "postgresExecForeignDelete"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "ExecForeignTruncate", "implementation": "postgresExecForeignTruncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u8fde\u63a5\u8def\u5f84\u4e0b\u63a8", "callback": "GetForeignJoinPaths", "implementation": "postgresGetForeignJoinPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u4e0a\u5c42\u8def\u5f84\uff0c\u5305\u62ec\u805a\u5408", "callback": "GetForeignUpperPaths", "implementation": "postgresGetForeignUpperPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6279\u91cf\u63d2\u5165", "callback": "ExecForeignBatchInsert", "implementation": "postgresExecForeignBatchInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f02\u6b65\u8ffd\u52a0\u6267\u884c", "callback": "ForeignAsyncRequest", "implementation": "postgresForeignAsyncRequest"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5bfc\u5165\u6a21\u5f0f", "callback": "ImportForeignSchema", "implementation": "postgresImportForeignSchema"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "schema_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002"}, {"name": "table_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "column_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "use_remote_estimate", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 postgres_fdw \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b EXPLAIN \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "fdw_startup_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "fdw_tuple_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a 0.01 \u3002"}, {"name": "analyze_sampling", "definition": "\u6b64\u9009\u9879\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u51b3\u5b9a\u5916\u90e8\u8868 ANALYZE \u662f\u5728\u8fdc\u7a0b\u91c7\u6837\uff0c\u8fd8\u662f\u8bfb\u53d6\u5e76\u4f20\u8f93\u5168\u90e8\u6570\u636e\u540e\u5728\u672c\u5730\u91c7\u6837\u3002\u652f\u6301 off\u3001random\u3001system\u3001bernoulli \u548c auto\u3002off \u7981\u7528\u8fdc\u7a0b\u91c7\u6837\uff0c\u5168\u90e8\u6570\u636e\u4f1a\u4f20\u5230\u672c\u5730\u540e\u91c7\u6837\u3002random \u4f7f\u7528 random() \u51fd\u6570\u5728\u8fdc\u7a0b\u9009\u62e9\u8fd4\u56de\u884c\uff1bsystem \u548c bernoulli \u4f7f\u7528\u540c\u540d\u5185\u7f6e TABLESAMPLE \u65b9\u6cd5\u3002random \u9002\u7528\u4e8e\u6240\u6709\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\uff0cTABLESAMPLE \u4ec5\u4ece 9.5 \u8d77\u652f\u6301\u3002\u9ed8\u8ba4\u503c auto \u81ea\u52a8\u9009\u62e9\u63a8\u8350\u65b9\u6cd5\uff0c\u76ee\u524d\u6839\u636e\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\u9009\u62e9 bernoulli \u6216 random\u3002"}, {"name": "extensions", "definition": "\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 PostgreSQL \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002 \u4f7f\u7528 extensions \u9009\u9879\u65f6\uff0c \u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002"}, {"name": "fetch_size", "definition": "\u8be5\u9009\u9879\u6307\u5b9a postgres_fdw \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "batch_size", "definition": "\u6b64\u9009\u9879\u6307\u5b9a postgres_fdw \u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u5e94\u63d2\u5165\u7684\u884c\u6570\uff0c\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u8868\u7ea7\u8bbe\u7f6e\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u8bbe\u7f6e\uff0c\u9ed8\u8ba4\u503c\u4e3a 1\u3002\u5b9e\u9645\u4e00\u6b21\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u548c batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u4e00\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570\u4e58\u4ee5 batch_size \u8d85\u51fa\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u62a5\u9519\u3002\u6b64\u9009\u9879\u4e5f\u9002\u7528\u4e8e\u5411\u5916\u90e8\u8868\u6267\u884c COPY\uff0c\u5b9e\u9645\u4e00\u6b21\u590d\u5236\u7684\u884c\u6570\u6309\u7c7b\u4f3c\u65b9\u5f0f\u786e\u5b9a\uff0c\u4f46\u53d7 COPY \u5b9e\u73b0\u9650\u5236\uff0c\u6700\u591a\u4e3a 1000 \u884c\u3002"}, {"name": "async_capable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002 \u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c postgres_fdw \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002 \u5373\u4f7f Append \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 postgres_fdw \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002"}, {"name": "parallel_commit", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "parallel_abort", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u4e2d\u6b62\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u4e2d\u6b62\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "updatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 INSERT \u3001 UPDATE \u548c DELETE \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c information_schema \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 postgres_fdw \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002"}, {"name": "truncatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 TRUNCATE \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002"}, {"name": "import_collate", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 COLLATE \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002 \u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a true \uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 COLLATE \"default\" \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002"}, {"name": "import_default", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 DEFAULT \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b nextval() \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_generated", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 GENERATED \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_not_null", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 NOT NULL \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002"}, {"name": "keep_connections", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a on \u3002\u5982\u679c\u8bbe\u7f6e\u4e3a off \uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}], "related": [{"url": "/wiki/catalog/pg_foreign_data_wrapper/?v=16", "label": "Foreign-data wrapper \u7cfb\u7edf\u76ee\u5f55"}, {"url": "/e/postgres_fdw/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/plan/foreign-scan/?v=16", "label": "Foreign Scan \u8ba1\u5212\u8282\u70b9"}], "release": {"ref": "PostgreSQL 16.15 source archive", "label": "16.15", "major": "16", "channel": "stable", "revision": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed", "source_url": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/16/postgres-fdw.html", "path": "postgres-fdw.html", "label": "PostgreSQL 16 English manual", "sha256": "22819913728e40d3730a8aba8a5243fb61b698dc907426a3572c0b641aceb6a0", "language": "en", "original_url": "/docs/16/postgres-fdw.html"}, {"url": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "line": 554, "path": "contrib/postgres_fdw/postgres_fdw.c", "label": "contrib/postgres_fdw/postgres_fdw.c:554", "sha256": "844d4743c4ab73e586921518e1ace1f2ef5f5c66c7f49769b1ee865dd964af7c", "archive_sha256": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u5f02\u6b65\u6267\u884c\u9009\u9879", "paragraphs": ["postgres_fdw \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c Append \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406\u9009\u9879", "paragraphs": ["\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0c\u5728 postgres_fdw \u4e2d\uff0c\u4e8b\u52a1\u662f\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u6765\u7ba1\u7406\u7684\uff0c\u5b50\u4e8b\u52a1\u5219\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u6765\u7ba1\u7406\u3002\u5f53\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c postgres_fdw \u4f1a\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c postgres_fdw \u4e5f\u4f1a\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u53ef\u4ee5\u6539\u5584\u6027\u80fd\uff1a", "\u5982\u679c\u542f\u7528\u4e86\u8fd9\u4e9b\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002", "\u542f\u7528\u8fd9\u4e9b\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406", "paragraphs": ["\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c postgres_fdw \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002", "\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a SERIALIZABLE \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \uff1b\u5426\u5219\u4f7f\u7528 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 SERIALIZABLE \u6216 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e READ COMMITTED \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 PostgreSQL \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002", "\u8bf7\u6ce8\u610f\uff0c postgres_fdw \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002"]}, {"title": "\u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316", "paragraphs": ["postgres_fdw \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 WHERE \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 WHERE \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 extensions \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f IMMUTABLE \u3002\u5bf9\u4e8e UPDATE \u6216 DELETE \u67e5\u8be2\uff0c postgres_fdw \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 WHERE \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 BEFORE \u6216 AFTER \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 CHECK OPTION \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 UPDATE \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001 IMMUTABLE \u64cd\u4f5c\u7b26\u6216 IMMUTABLE \u51fd\u6570\u3002", "\u5f53 postgres_fdw \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 JOIN \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 WHERE \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002", "\u53ef\u4ee5\u4f7f\u7528 EXPLAIN VERBOSE \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002"]}, {"title": "\u8de8\u7248\u672c\u517c\u5bb9\u6027", "paragraphs": ["postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002"]}, {"code": "{\n\tFdwRoutine *routine = makeNode(FdwRoutine);\n\n\t/* Functions for scanning foreign tables */\n\troutine->GetForeignRelSize = postgresGetForeignRelSize;\n\troutine->GetForeignPaths = postgresGetForeignPaths;\n\troutine->GetForeignPlan = postgresGetForeignPlan;\n\troutine->BeginForeignScan = postgresBeginForeignScan;\n\troutine->IterateForeignScan = postgresIterateForeignScan;\n\troutine->ReScanForeignScan = postgresReScanForeignScan;\n\troutine->EndForeignScan = postgresEndForeignScan;\n\n\t/* Functions for updating foreign tables */\n\troutine->AddForeignUpdateTargets = postgresAddForeignUpdateTargets;\n\troutine->PlanForeignModify = postgresPlanForeignModify;\n\troutine->BeginForeignModify = postgresBeginForeignModify;\n\troutine->ExecForeignInsert = postgresExecForeignInsert;\n\troutine->ExecForeignBatchInsert = postgresExecForeignBatchInsert;\n\troutine->GetForeignModifyBatchSize = postgresGetForeignModifyBatchSize;\n\troutine->ExecForeignUpdate = postgresExecForeignUpdate;\n\troutine->ExecForeignDelete = postgresExecForeignDelete;\n\troutine->EndForeignModify = postgresEndForeignModify;\n\troutine->BeginForeignInsert = postgresBeginForeignInsert;\n\troutine->EndForeignInsert = postgresEndForeignInsert;\n\troutine->IsForeignRelUpdatable = postgresIsForeignRelUpdatable;\n\troutine->PlanDirectModify = postgresPlanDirectModify;\n\troutine->BeginDirectModify = postgresBeginDirectModify;\n\troutine->IterateDirectModify = postgresIterateDirectModify;\n\troutine->EndDirectModify = postgresEndDirectModify;\n\n\t/* Function for EvalPlanQual rechecks */\n\troutine->RecheckForeignScan = postgresRecheckForeignScan;\n\t/* Support functions for EXPLAIN */\n\troutine->ExplainForeignScan = postgresExplainForeignScan;\n\troutine->ExplainForeignModify = postgresExplainForeignModify;\n\troutine->ExplainDirectModify = postgresExplainDirectModify;\n\n\t/* Support function for TRUNCATE */\n\troutine->ExecForeignTruncate = postgresExecForeignTruncate;\n\n\t/* Support functions for ANALYZE */\n\troutine->AnalyzeForeignTable = postgresAnalyzeForeignTable;\n\n\t/* Support functions for IMPORT FOREIGN SCHEMA */\n\troutine->ImportForeignSchema = postgresImportForeignSchema;\n\n\t/* Support functions for join push-down */\n\troutine->GetForeignJoinPaths = postgresGetForeignJoinPaths;\n\n\t/* Support functions for upper relation push-down */\n\troutine->GetForeignUpperPaths = postgresGetForeignUpperPaths;\n\n\t/* Support functions for asynchronous execution */\n\troutine->IsForeignPathAsyncCapable = postgresIsForeignPathAsyncCapable;\n\troutine->ForeignAsyncRequest = postgresForeignAsyncRequest;\n\troutine->ForeignAsyncConfigureWait = postgresForeignAsyncConfigureWait;\n\troutine->ForeignAsyncNotify = postgresForeignAsyncNotify;\n\n\tPG_RETURN_POINTER(routine);\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "description": ["\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002"], "manual_html": "<div class=\"sect1\" id=\"POSTGRES-FDW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">F.38.\u00a0postgres_fdw \u2014 \u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u6a21\u5757\u63d0\u4f9b\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668 <code class=\"literal\">postgres_fdw</code>\uff0c\u53ef\u7528\u4e8e\u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u672c\u6a21\u5757\u63d0\u4f9b\u7684\u529f\u80fd\u4e0e\u8f83\u65e7\u7684<a class=\"xref\" href=\"/docs/16/dblink.html\" title=\"F.12.\u00a0dblink \u2014 \u8fde\u63a5\u5230\u5176\u4ed6 PostgreSQL \u6570\u636e\u5e93\">dblink</a>\u6a21\u5757\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u91cd\u53e0\u3002\u4f46 <code class=\"filename\">postgres_fdw</code> \u4e3a\u8bbf\u95ee\u8fdc\u7a0b\u8868\u63d0\u4f9b\u4e86\u66f4\u900f\u660e\u4e14\u7b26\u5408\u6807\u51c6\u7684\u8bed\u6cd5\uff0c\u5e76\u4e14\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u6027\u80fd\u66f4\u597d\u3002</p>\n<p lang=\"zh\">\u8981\u51c6\u5907\u901a\u8fc7 <code class=\"filename\">postgres_fdw</code> \u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee\uff1a</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5b89\u88c5 <code class=\"filename\">postgres_fdw</code> \u6269\u5c55\uff0c\u53ef\u4f7f\u7528<a class=\"xref\" href=\"/docs/16/sql-createextension.html\" title=\"CREATE EXTENSION\"><span class=\"refentrytitle\">CREATE EXTENSION</span></a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u4f7f\u7528<a class=\"xref\" href=\"/docs/16/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u5bf9\u8c61\uff0c\u7528\u6765\u8868\u793a\u6bcf\u4e2a\u8981\u8fde\u63a5\u7684\u8fdc\u7a0b\u6570\u636e\u5e93\u3002\u5c06\u9664 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u4e4b\u5916\u7684\u8fde\u63a5\u4fe1\u606f\u6307\u5b9a\u4e3a\u670d\u52a1\u5668\u5bf9\u8c61\u7684\u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u9700\u8981\u83b7\u51c6\u8bbf\u95ee\u5404\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u7528\u6237\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/16/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u521b\u5efa\u7528\u6237\u6620\u5c04\u3002\u5c06\u8981\u4f7f\u7528\u7684\u8fdc\u7a0b\u7528\u6237\u540d\u548c\u5bc6\u7801\u6307\u5b9a\u4e3a\u7528\u6237\u6620\u5c04\u7684 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u8981\u8bbf\u95ee\u7684\u8fdc\u7a0b\u8868\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/16/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u6216<a class=\"xref\" href=\"/docs/16/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5916\u90e8\u8868\u7684\u5217\u5fc5\u987b\u4e0e\u88ab\u5f15\u7528\u7684\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u5728\u5916\u90e8\u8868\u5bf9\u8c61\u7684\u9009\u9879\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8fdc\u7a0b\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0e\u8fdc\u7a0b\u8868\u4e0d\u540c\u7684\u8868\u540d\u548c/\u6216\u5217\u540d\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\">\u73b0\u5728\uff0c\u53ea\u9700\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">SELECT</code>\uff0c\u5373\u53ef\u8bbf\u95ee\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u4e2d\u5b58\u50a8\u7684\u6570\u636e\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code>\u3001<code class=\"command\">COPY</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4fee\u6539\u8fdc\u7a0b\u8868\u3002\uff08\u5f53\u7136\uff0c\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\u7684\u8fdc\u7a0b\u7528\u6237\u5fc5\u987b\u62e5\u6709\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u6743\u9650\u3002\uff09</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5728\u8bbf\u95ee\u6216\u4fee\u6539\u8fdc\u7a0b\u8868\u65f6\uff0c<code class=\"literal\">ONLY</code> \u9009\u9879\u5728 <code class=\"command\">SELECT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4e2d\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n<p lang=\"zh\">postgres_fdw \u76ee\u524d\u4e0d\u652f\u6301\u5e26 ON CONFLICT DO UPDATE \u5b50\u53e5\u7684 INSERT\u3002\u4e0d\u8fc7\uff0c\u652f\u6301 ON CONFLICT DO NOTHING\uff0c\u524d\u63d0\u662f\u4e0d\u6307\u5b9a\u552f\u4e00\u7d22\u5f15\u63a8\u65ad\u6761\u4ef6\u3002postgres_fdw \u8fd8\u652f\u6301\u5728\u5206\u533a\u8868\u4e0a\u6267\u884c UPDATE \u6240\u89e6\u53d1\u7684\u884c\u79fb\u52a8\uff0c\u4f46\u76ee\u524d\u4e0d\u652f\u6301\u4ee5\u4e0b\u60c5\u51b5\uff1a\u7528\u4e8e\u63a5\u6536\u79fb\u5165\u884c\u7684\u8fdc\u7aef\u5206\u533a\uff0c\u540c\u65f6\u4e5f\u662f\u540c\u4e00\u547d\u4ee4\u4e2d\u5176\u4ed6\u4f4d\u7f6e\u5c06\u8981\u66f4\u65b0\u7684 UPDATE \u76ee\u6807\u5206\u533a\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5c06\u5916\u90e8\u8868\u7684\u5217\u58f0\u660e\u4e3a\u4e0e\u88ab\u5f15\u7528\u8fdc\u7a0b\u8868\u7684\u5bf9\u5e94\u5217\u5177\u6709\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u5728\u9002\u7528\u65f6\u5177\u6709\u76f8\u540c\u7684\u6392\u5e8f\u89c4\u5219\u3002\u5c3d\u7ba1 <code class=\"filename\">postgres_fdw</code> \u76ee\u524d\u5728\u6309\u9700\u6267\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u9762\u76f8\u5f53\u5bbd\u5bb9\uff0c\u4f46\u5f53\u7c7b\u578b\u6216\u6392\u5e8f\u89c4\u5219\u4e0d\u5339\u914d\u65f6\uff0c\u4ecd\u53ef\u80fd\u51fa\u73b0\u4ee4\u4eba\u610f\u5916\u7684\u8bed\u4e49\u5f02\u5e38\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5bf9\u67e5\u8be2\u6761\u4ef6\u7684\u89e3\u91ca\u53ef\u80fd\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5916\u90e8\u8868\u7684\u58f0\u660e\u53ef\u4ee5\u6bd4\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u5c11\u4e00\u4e9b\u5217\uff0c\u6216\u8005\u4f7f\u7528\u4e0d\u540c\u7684\u5217\u987a\u5e8f\u3002\u4e0e\u8fdc\u7a0b\u8868\u5217\u7684\u5339\u914d\u662f\u6309\u540d\u79f0\u800c\u4e0d\u662f\u6309\u4f4d\u7f6e\u8fdb\u884c\u7684\u3002</p>\n<div class=\"sect2\" id=\"POSTGRES-FDW-OPTIONS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/postgres-fdw.html#POSTGRES-FDW-OPTIONS\">F.38.1. postgres_fdw \u7684 FDW \u9009\u9879</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-CONNECTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.1.\u00a0\u8fde\u63a5\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528 <span class=\"application\">libpq</span> \u5728\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u63a5\u53d7\u7684\u76f8\u540c\u9009\u9879\uff0c\u8be6\u89c1<a class=\"xref\" href=\"/docs/16/libpq-connect.html#LIBPQ-PARAMKEYWORDS\" title=\"34.1.2.\u00a0\u53c2\u6570\u5173\u952e\u8bcd\">\u7b2c\u00a034.1.2\u00a0\u8282</a>\uff1b\u4f46\u4ee5\u4e0b\u9009\u9879\u4e0d\u5141\u8bb8\u4f7f\u7528\uff0c\u6216\u4f1a\u88ab\u7279\u6b8a\u5904\u7406\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">user</code>\u3001<code class=\"literal\">password</code> \u548c <code class=\"literal\">sslpassword</code>\uff08\u8bf7\u6539\u4e3a\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\uff0c\u6216\u4f7f\u7528\u670d\u52a1\u6587\u4ef6\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">client_encoding</code>\uff08\u4f1a\u6839\u636e\u672c\u5730\u670d\u52a1\u5668\u7f16\u7801\u81ea\u52a8\u8bbe\u7f6e\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">application_name</code> \u53ef\u4ee5\u51fa\u73b0\u5728\u8fde\u63a5\u9009\u9879\u548c<a class=\"xref\" href=\"/docs/16/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u4e2d\u7684<span class=\"emphasis\"><em>\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c<code class=\"varname\">postgres_fdw.application_name</code> \u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002\u4e0e <span class=\"application\">libpq</span> \u4e0d\u540c\uff0c<code class=\"filename\">postgres_fdw</code> \u5141\u8bb8 <code class=\"varname\">application_name</code> \u5305\u542b<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/16/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">fallback_application_name</code>\uff08\u59cb\u7ec8\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres_fdw</code>\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">sslkey</code> \u548c <code class=\"literal\">sslcert</code> \u53ef\u4ee5\u51fa\u73b0\u5728<span class=\"emphasis\"><em>\u8fde\u63a5\u9009\u9879\u3001\u7528\u6237\u6620\u5c04\u4e2d\u7684\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c\u7528\u6237\u6620\u5c04\u8bbe\u7f6e\u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002</p>\n</li>\n</ul>\n</div>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u521b\u5efa\u6216\u4fee\u6539\u5e26\u6709 <code class=\"literal\">sslcert</code> \u6216 <code class=\"literal\">sslkey</code> \u8bbe\u7f6e\u7684\u7528\u6237\u6620\u5c04\u3002</p>\n<p lang=\"zh\">\u975e\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5bc6\u7801\u8ba4\u8bc1\u6216\u4f7f\u7528 GSSAPI \u59d4\u6d3e\u51ed\u636e\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\uff0c\u56e0\u6b64\u5728\u9700\u8981\u5bc6\u7801\u8ba4\u8bc1\u7684\u573a\u666f\u4e2d\uff0c\u5e94\u4e3a\u5c5e\u4e8e\u975e\u8d85\u7ea7\u7528\u6237\u7684\u7528\u6237\u6620\u5c04\u6307\u5b9a <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u7528\u6237\u6620\u5c04\u9009\u9879 <code class=\"literal\">password_required 'false'</code> \u6309\u7528\u6237\u6620\u5c04\u5355\u72ec\u8986\u76d6\u6b64\u68c0\u67e5\uff0c\u4f8b\u5982\uff1a</p>\n<pre class=\"programlisting\">ALTER USER MAPPING FOR some_non_superuser SERVER loopback_nopw\nOPTIONS (ADD password_required 'false');\n</pre>\n<p lang=\"zh\">\u4e3a\u4e86\u9632\u6b62\u975e\u7279\u6743\u7528\u6237\u5229\u7528 postgres \u670d\u52a1\u5668\u6240\u8fd0\u884c\u7684 unix \u7528\u6237\u7684\u8ba4\u8bc1\u6743\u9650\u63d0\u5347\u5230\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u5728\u7528\u6237\u6620\u5c04\u4e0a\u8bbe\u7f6e\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u5fc5\u987b\u8c28\u614e\uff0c\u786e\u4fdd\u8fd9\u4e0d\u4f1a\u4f7f\u6620\u5c04\u7528\u6237\u80fd\u591f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\u5230\u6620\u5c04\u7684\u6570\u636e\u5e93\uff0c\u53c2\u89c1 CVE-2007-3278 \u548c CVE-2007-6601\u3002\u4e0d\u8981\u4e3a public \u89d2\u8272\u8bbe\u7f6e password_required=false\u3002\u8bf7\u6ce8\u610f\uff0c\u6620\u5c04\u7528\u6237\u53ef\u80fd\u4f7f\u7528\u8fd0\u884c postgres \u670d\u52a1\u5668\u7684\u7cfb\u7edf\u7528\u6237\u7684 Unix \u4e3b\u76ee\u5f55\u4e2d\u7684\u4efb\u4f55\u5ba2\u6237\u7aef\u8bc1\u4e66\u3001.pgpass\u3001.pg_service.conf \u7b49\uff0c\u4e5f\u53ef\u80fd\u5229\u7528 peer\u3001ident \u7b49\u8ba4\u8bc1\u65b9\u5f0f\u6388\u4e88\u7684\u4efb\u4f55\u4fe1\u4efb\u5173\u7cfb\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-OBJECT-NAME\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.2.\u00a0\u5bf9\u8c61\u540d\u79f0\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u9009\u9879\u53ef\u7528\u4e8e\u63a7\u5236\u53d1\u9001\u5230\u8fdc\u7a0b <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u7684 SQL \u8bed\u53e5\u4e2d\u6240\u4f7f\u7528\u7684\u540d\u79f0\u3002\u5f53\u521b\u5efa\u5916\u90e8\u8868\u65f6\u6240\u7528\u7684\u540d\u79f0\u4e0e\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u7684\u540d\u79f0\u4e0d\u540c\u65f6\uff0c\u5c31\u9700\u8981\u8fd9\u4e9b\u9009\u9879\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">schema_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">table_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">column_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-COST-ESTIMATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.3.\u00a0\u4ee3\u4ef7\u4f30\u7b97\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u901a\u8fc7\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u67e5\u8be2\u6765\u83b7\u53d6\u8fdc\u7a0b\u6570\u636e\uff0c\u56e0\u6b64\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u626b\u63cf\u5916\u90e8\u8868\u7684\u4f30\u8ba1\u4ee3\u4ef7\u5e94\u5f53\u7b49\u4e8e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b8c\u6210\u8be5\u64cd\u4f5c\u7684\u4ee3\u4ef7\uff0c\u518d\u52a0\u4e0a\u4e00\u4e9b\u901a\u4fe1\u5f00\u9500\u3002\u83b7\u5f97\u8fd9\u79cd\u4f30\u7b97\u6700\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u662f\u5411\u8fdc\u7a0b\u670d\u52a1\u5668\u8be2\u95ee\uff0c\u518d\u628a\u5f00\u9500\u52a0\u4e0a\u53bb\uff1b\u4f46\u5bf9\u4e8e\u7b80\u5355\u67e5\u8be2\uff0c\u4e3a\u4e86\u53d6\u5f97\u4ee3\u4ef7\u4f30\u7b97\u800c\u989d\u5916\u53d1\u9001\u4e00\u6b21\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ef\u80fd\u5e76\u4e0d\u5212\u7b97\u3002\u56e0\u6b64 <code class=\"filename\">postgres_fdw</code> \u63d0\u4f9b\u4ee5\u4e0b\u9009\u9879\u6765\u63a7\u5236\u4ee3\u4ef7\u4f30\u7b97\u7684\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">use_remote_estimate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b <code class=\"command\">EXPLAIN</code> \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_startup_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_tuple_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">0.01</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u771f\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4ece\u8fdc\u7a0b\u670d\u52a1\u5668\u83b7\u53d6\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u5047\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u5728\u672c\u5730\u6267\u884c\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u518d\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u9664\u975e\u6709\u8fdc\u7a0b\u8868\u7edf\u8ba1\u4fe1\u606f\u7684\u672c\u5730\u526f\u672c\u53ef\u7528\uff0c\u5426\u5219\u8fd9\u79cd\u672c\u5730\u4f30\u7b97\u4e0d\u592a\u53ef\u80fd\u975e\u5e38\u51c6\u786e\u3002\u66f4\u65b0\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c\u662f\u5728\u5916\u90e8\u8868\u4e0a\u8fd0\u884c<a class=\"xref\" href=\"/docs/16/sql-analyze.html\" title=\"ANALYZE\"><span class=\"refentrytitle\">ANALYZE</span></a>\uff1b\u8fd9\u6837\u4f1a\u626b\u63cf\u8fdc\u7a0b\u8868\uff0c\u7136\u540e\u50cf\u5bf9\u5f85\u672c\u5730\u8868\u4e00\u6837\u8ba1\u7b97\u5e76\u5b58\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u4fdd\u7559\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u8fdc\u7a0b\u8868\u6bcf\u6b21\u67e5\u8be2\u7684\u89c4\u5212\u5f00\u9500\uff1b\u4f46\u5982\u679c\u8fdc\u7a0b\u8868\u7ecf\u5e38\u66f4\u65b0\uff0c\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u5f88\u5feb\u5c31\u4f1a\u8fc7\u65f6\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd <code class=\"command\">ANALYZE</code> \u64cd\u4f5c\u7684\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">analyze_sampling</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u51b3\u5b9a\u5916\u90e8\u8868 ANALYZE \u662f\u5728\u8fdc\u7a0b\u91c7\u6837\uff0c\u8fd8\u662f\u8bfb\u53d6\u5e76\u4f20\u8f93\u5168\u90e8\u6570\u636e\u540e\u5728\u672c\u5730\u91c7\u6837\u3002\u652f\u6301 off\u3001random\u3001system\u3001bernoulli \u548c auto\u3002off \u7981\u7528\u8fdc\u7a0b\u91c7\u6837\uff0c\u5168\u90e8\u6570\u636e\u4f1a\u4f20\u5230\u672c\u5730\u540e\u91c7\u6837\u3002random \u4f7f\u7528 random() \u51fd\u6570\u5728\u8fdc\u7a0b\u9009\u62e9\u8fd4\u56de\u884c\uff1bsystem \u548c bernoulli \u4f7f\u7528\u540c\u540d\u5185\u7f6e TABLESAMPLE \u65b9\u6cd5\u3002random \u9002\u7528\u4e8e\u6240\u6709\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\uff0cTABLESAMPLE \u4ec5\u4ece 9.5 \u8d77\u652f\u6301\u3002\u9ed8\u8ba4\u503c auto \u81ea\u52a8\u9009\u62e9\u63a8\u8350\u65b9\u6cd5\uff0c\u76ee\u524d\u6839\u636e\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\u9009\u62e9 bernoulli \u6216 random\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-REMOTE-EXECUTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.4.\u00a0\u8fdc\u7a0b\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709\u4f7f\u7528\u5185\u7f6e\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u624d\u4f1a\u88ab\u8003\u8651\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u3002\u6d89\u53ca\u975e\u5185\u7f6e\u51fd\u6570\u7684\u5b50\u53e5\u4f1a\u5728\u53d6\u56de\u884c\u4e4b\u540e\u5728\u672c\u5730\u68c0\u67e5\u3002\u5982\u679c\u8fd9\u4e9b\u51fd\u6570\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e5f\u53ef\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fe1\u5176\u7ed3\u679c\u4e0e\u672c\u5730\u76f8\u540c\uff0c\u5219\u5c06\u8fd9\u7c7b <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u7aef\u6267\u884c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u6b64\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">extensions</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 <span class=\"productname\">PostgreSQL</span> \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"literal\">extensions</code> \u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fetch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">batch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u4e2d\u5e94\u63d2\u5165\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">1</code>\u3002</p>\n<p lang=\"zh\">postgres_fdw \u6bcf\u6b21\u5b9e\u9645\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u4e0e\u6307\u5b9a\u7684 batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u5355\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7aef\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u91cf\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570 * batch_size \u8d85\u8fc7\u6b64\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u9519\u8bef\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u4e5f\u9002\u7528\u4e8e\u5411\u5916\u90e8\u8868\u590d\u5236\u6570\u636e\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u5b9e\u9645\u4e00\u6b21\u590d\u5236\u7684\u884c\u6570\u4f1a\u4ee5\u4e0e\u63d2\u5165\u573a\u666f\u7c7b\u4f3c\u7684\u65b9\u5f0f\u786e\u5b9a\uff0c\u4f46\u7531\u4e8e <code class=\"command\">COPY</code> \u547d\u4ee4\u7684\u5b9e\u73b0\u9650\u5236\uff0c\u6700\u591a\u53ea\u80fd\u4e3a 1000 \u884c\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-ASYNCHRONOUS-EXECUTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.5.\u00a0\u5f02\u6b65\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c <code class=\"structname\">Append</code> \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">async_capable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n<p lang=\"zh\">\u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c<code class=\"filename\">postgres_fdw</code> \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f <code class=\"structname\">Append</code> \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-TRANSACTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.6.\u00a0\u4e8b\u52a1\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0c\u5728 <code class=\"filename\">postgres_fdw</code> \u4e2d\uff0c\u4e8b\u52a1\u662f\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u6765\u7ba1\u7406\u7684\uff0c\u5b50\u4e8b\u52a1\u5219\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u6765\u7ba1\u7406\u3002\u5f53\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e5f\u4f1a\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u53ef\u4ee5\u6539\u5584\u6027\u80fd\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">parallel_commit</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">parallel_abort</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u4e2d\u6b62\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u4e2d\u6b62\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5982\u679c\u542f\u7528\u4e86\u8fd9\u4e9b\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002</p>\n<p lang=\"zh\">\u542f\u7528\u8fd9\u4e9b\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-UPDATABILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.7.\u00a0\u53ef\u66f4\u65b0\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u66f4\u65b0\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">updatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u548c <code class=\"command\">DELETE</code> \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c<code class=\"literal\">information_schema</code> \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-TRUNCATABILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.8.\u00a0\u53ef\u622a\u65ad\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u622a\u65ad\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">truncatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">TRUNCATE</code> \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-IMPORTING\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.9.\u00a0\u5bfc\u5165\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/16/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u5bfc\u5165\u5916\u90e8\u8868\u5b9a\u4e49\u3002\u8be5\u547d\u4ee4\u4f1a\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4ee5\u5339\u914d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868\u6216\u89c6\u56fe\u3002\u5982\u679c\u8981\u5bfc\u5165\u7684\u8fdc\u7a0b\u8868\u5217\u4f7f\u7528\u7528\u6237\u5b9a\u4e49\u6570\u636e\u7c7b\u578b\uff0c\u5219\u672c\u5730\u670d\u52a1\u5668\u5fc5\u987b\u5b58\u5728\u540c\u540d\u4e14\u517c\u5bb9\u7684\u7c7b\u578b\u3002</p>\n<p lang=\"zh\">\u53ef\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\uff08\u5728 <code class=\"command\">IMPORT FOREIGN SCHEMA</code> \u547d\u4ee4\u4e2d\u7ed9\u51fa\uff09\u81ea\u5b9a\u4e49\u5bfc\u5165\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">import_collate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">COLLATE</code> \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a <code class=\"literal\">true</code>\uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 <code class=\"literal\">COLLATE \"default\"</code> \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_default</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">DEFAULT</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b<code class=\"function\">nextval()</code> \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_generated</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">GENERATED</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_not_null</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">NOT NULL</code> \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u9664 <code class=\"literal\">NOT NULL</code> \u4e4b\u5916\u7684\u7ea6\u675f\u6c38\u8fdc\u4e0d\u4f1a\u4ece\u8fdc\u7a0b\u8868\u5bfc\u5165\u3002\u867d\u7136 <span class=\"productname\">PostgreSQL</span> \u786e\u5b9e\u652f\u6301\u5728\u5916\u90e8\u8868\u4e0a\u5b9a\u4e49\u68c0\u67e5\u7ea6\u675f\uff0c\u4f46\u7531\u4e8e\u7ea6\u675f\u8868\u8fbe\u5f0f\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u6c42\u503c\u4e0d\u540c\uff0c\u7cfb\u7edf\u4e0d\u4f1a\u81ea\u52a8\u5bfc\u5165\u5b83\u4eec\u3002\u6b64\u7c7b\u884c\u4e3a\u4e0d\u4e00\u81f4\u7684\u68c0\u67e5\u7ea6\u675f\uff0c\u53ef\u80fd\u5bfc\u81f4\u67e5\u8be2\u4f18\u5316\u4e2d\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5e0c\u671b\u5bfc\u5165\u68c0\u67e5\u7ea6\u675f\uff0c\u5fc5\u987b\u624b\u5de5\u5b8c\u6210\uff0c\u5e76\u5e94\u4ed4\u7ec6\u6838\u5b9e\u6bcf\u4e00\u4e2a\u7ea6\u675f\u7684\u8bed\u4e49\u3002\u6709\u5173\u5916\u90e8\u8868\u4e0a\u68c0\u67e5\u7ea6\u675f\u5904\u7406\u65b9\u5f0f\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/16/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u3002</p>\n<p lang=\"zh\">\u4f5c\u4e3a\u5176\u4ed6\u8868\u5206\u533a\u7684\u8868\u6216\u5916\u90e8\u8868\uff0c\u4ec5\u5728\u5b83\u4eec\u88ab\u660e\u786e\u5199\u5165 <code class=\"literal\">LIMIT TO</code> \u5b50\u53e5\u65f6\u624d\u4f1a\u5bfc\u5165\u3002\u5426\u5219\uff0c\u5b83\u4eec\u4f1a\u88ab\u81ea\u52a8\u6392\u9664\u5728<a class=\"xref\" href=\"/docs/16/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u4e4b\u5916\u3002\u7531\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u901a\u8fc7\u4f5c\u4e3a\u5206\u533a\u5c42\u6b21\u6839\u7684\u5206\u533a\u8868\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ea\u5bfc\u5165\u5206\u533a\u8868\u5373\u53ef\u8bbf\u95ee\u5168\u90e8\u6570\u636e\uff0c\u800c\u65e0\u9700\u521b\u5efa\u989d\u5916\u5bf9\u8c61\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-CONNECTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.10.\u00a0\u8fde\u63a5\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u672c\u5730\u4f1a\u8bdd\u4e2d\u4fdd\u6301\u6253\u5f00\uff0c\u4ee5\u4fbf\u91cd\u590d\u4f7f\u7528\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">keep_connections</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">on</code>\u3002\u5982\u679c\u8bbe\u7f6e\u4e3a <code class=\"literal\">off</code>\uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-FUNCTIONS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/postgres-fdw.html#POSTGRES-FDW-FUNCTIONS\">F.38.2. \u51fd\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_get_connections(OUT server_name text, OUT valid boolean) returns setof record</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u8fd4\u56de<code class=\"filename\">postgres_fdw</code>\u4ece\u672c\u5730\u4f1a\u8bdd\u5411\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6240\u6709\u6253\u5f00\u8fde\u63a5\u7684\u5916\u90e8\u670d\u52a1\u5668\u540d\u79f0\u3002\u5b83\u8fd8\u8fd4\u56de\u6bcf\u4e2a\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002\u5982\u679c\u5916\u90e8\u670d\u52a1\u5668\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u88ab\u4f7f\u7528\uff0c\u4f46\u5176\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u88ab\u66f4\u6539\u6216\u5220\u9664\uff0c\u5219\u8fd4\u56de<code class=\"literal\">false</code>\uff08\u6ce8\u610f\uff0c\u5982\u679c\u670d\u52a1\u5668\u88ab\u5220\u9664\uff0c\u65e0\u6548\u8fde\u63a5\u7684\u670d\u52a1\u5668\u540d\u79f0\u5c06\u4e3a<code class=\"literal\">NULL</code>\uff09\uff0c\u7136\u540e\u8fd9\u6837\u7684\u65e0\u6548\u8fde\u63a5\u5c06\u5728\u8be5\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u5173\u95ed\u3002\u5426\u5219\u8fd4\u56de<code class=\"literal\">true</code>\u3002\u5982\u679c\u6ca1\u6709\u6253\u5f00\u7684\u8fde\u63a5\uff0c\u5219\u4e0d\u8fd4\u56de\u4efb\u4f55\u8bb0\u5f55\u3002\u8be5\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT * FROM postgres_fdw_get_connections() ORDER BY 1;\n server_name | valid\n-------------+-------\n loopback1   | t\n loopback2   | f\n</pre>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect(server_name text) returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u8bf7\u6ce8\u610f\uff0c\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\u65f6\uff0c\u5bf9\u540c\u4e00\u670d\u52a1\u5668\u53ef\u80fd\u5b58\u5728\u591a\u4e2a\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u5982\u679c\u627e\u4e0d\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u62a5\u544a\u9519\u8bef\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect('loopback1');\n postgres_fdw_disconnect\n-------------------------\n t\n</pre>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect_all() returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5168\u90e8\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect_all();\n postgres_fdw_disconnect_all\n-----------------------------\n t\n</pre>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CONNECTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/postgres-fdw.html#POSTGRES-FDW-CONNECTION-MANAGEMENT\">F.38.3. \u8fde\u63a5\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u5728\u9996\u6b21\u6267\u884c\u4f7f\u7528\u4e0e\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u5173\u8054\u7684\u5916\u90e8\u8868\u7684\u67e5\u8be2\u65f6\uff0c\u4f1a\u5efa\u7acb\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8be5\u8fde\u63a5\u4f1a\u5728\u540c\u4e00\u4f1a\u8bdd\u4e2d\u4fdd\u7559\u5e76\u4f9b\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u3002\u8fd9\u4e00\u884c\u4e3a\u53ef\u901a\u8fc7\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\u63a7\u5236\u3002\u5982\u679c\u4f7f\u7528\u591a\u4e2a\u7528\u6237\u6807\u8bc6\uff08\u7528\u6237\u6620\u5c04\uff09\u8bbf\u95ee\u8be5\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u4f1a\u4e3a\u6bcf\u4e2a\u7528\u6237\u6620\u5c04\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002</p>\n<p lang=\"zh\">\u5f53\u66f4\u6539\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u7684\u5b9a\u4e49\uff0c\u6216\u5c06\u5176\u5220\u9664\u65f6\uff0c\u76f8\u5173\u8fde\u63a5\u4f1a\u88ab\u5173\u95ed\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c\u5982\u679c\u4efb\u4f55\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u5728\u4f7f\u7528\uff0c\u5219\u4f1a\u4fdd\u7559\u5230\u4e8b\u52a1\u7ed3\u675f\u3002\u5173\u95ed\u7684\u8fde\u63a5\u4f1a\u5728\u540e\u7eed\u4f7f\u7528\u5916\u90e8\u8868\u7684\u67e5\u8be2\u9700\u8981\u5b83\u4eec\u65f6\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\">\u4e00\u65e6\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5b83\u4f1a\u4e00\u76f4\u4fdd\u7559\u5230\u672c\u5730\u4f1a\u8bdd\u6216\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u9000\u51fa\u3002\u8981\u663e\u5f0f\u65ad\u5f00\u8fde\u63a5\uff0c\u53ef\u4ee5\u7981\u7528\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\uff0c\u6216\u4f7f\u7528 <code class=\"function\">postgres_fdw_disconnect</code> \u548c <code class=\"function\">postgres_fdw_disconnect_all</code> \u51fd\u6570\u3002\u4f8b\u5982\uff0c\u8fd9\u4e9b\u51fd\u6570\u53ef\u7528\u4e8e\u5173\u95ed\u4e0d\u518d\u9700\u8981\u7684\u8fde\u63a5\uff0c\u4ece\u800c\u91ca\u653e\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u8fde\u63a5\u8d44\u6e90\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-TRANSACTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/postgres-fdw.html#POSTGRES-FDW-TRANSACTION-MANAGEMENT\">F.38.4. \u4e8b\u52a1\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c<code class=\"filename\">postgres_fdw</code> \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002</p>\n<p lang=\"zh\">\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a <code class=\"literal\">SERIALIZABLE</code> \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code>\uff1b\u5426\u5219\u4f7f\u7528 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code> \u6216 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e <code class=\"literal\">READ COMMITTED</code> \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 <span class=\"productname\">PostgreSQL</span> \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c<code class=\"filename\">postgres_fdw</code> \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">F.38.5. \u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 <code class=\"literal\">extensions</code> \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f <code class=\"literal\">IMMUTABLE</code>\u3002\u5bf9\u4e8e <code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u67e5\u8be2\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 <code class=\"literal\">BEFORE</code> \u6216 <code class=\"literal\">AFTER</code> \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 <code class=\"literal\">CHECK OPTION</code> \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 <code class=\"command\">UPDATE</code> \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001<code class=\"literal\">IMMUTABLE</code> \u64cd\u4f5c\u7b26\u6216 <code class=\"literal\">IMMUTABLE</code> \u51fd\u6570\u3002</p>\n<p lang=\"zh\">\u5f53 <code class=\"filename\">postgres_fdw</code> \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 <code class=\"literal\">JOIN</code> \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">EXPLAIN VERBOSE</code> \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">F.38.6. \u8fdc\u7a0b\u67e5\u8be2\u6267\u884c\u73af\u5883</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728 <code class=\"filename\">postgres_fdw</code> \u6253\u5f00\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u4e2d\uff0c<a class=\"xref\" href=\"/docs/16/runtime-config-client.html#GUC-SEARCH-PATH\">search_path</a>\u53c2\u6570\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u5305\u542b <code class=\"literal\">pg_catalog</code>\uff0c\u8fd9\u6837\u65e0\u9700\u6a21\u5f0f\u9650\u5b9a\u5c31\u53ea\u80fd\u770b\u5230\u5185\u7f6e\u5bf9\u8c61\u3002\u8fd9\u5bf9 <code class=\"filename\">postgres_fdw</code> \u81ea\u8eab\u751f\u6210\u7684\u67e5\u8be2\u4e0d\u662f\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u603b\u662f\u63d0\u4f9b\u8fd9\u79cd\u9650\u5b9a\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bf9\u90a3\u4e9b\u901a\u8fc7\u8fdc\u7a0b\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u6216\u89c4\u5219\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u51fd\u6570\u5e26\u6765\u98ce\u9669\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u89c6\u56fe\uff0c\u5219\u8be5\u89c6\u56fe\u4e2d\u4f7f\u7528\u7684\u4efb\u4f55\u51fd\u6570\u90fd\u4f1a\u5728\u53d7\u9650\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u6267\u884c\u3002\u5efa\u8bae\u5728\u8fd9\u7c7b\u51fd\u6570\u4e2d\u5bf9\u6240\u6709\u540d\u79f0\u90fd\u5199\u6210\u5e26\u6a21\u5f0f\u9650\u5b9a\u7684\u5f62\u5f0f\uff0c\u6216\u8005\u4e3a\u8fd9\u7c7b\u51fd\u6570\u9644\u52a0 <code class=\"literal\">SET search_path</code> \u9009\u9879\uff08\u89c1<a class=\"xref\" href=\"/docs/16/sql-createfunction.html\" title=\"CREATE FUNCTION\"><span class=\"refentrytitle\">CREATE FUNCTION</span></a>\uff09\uff0c\u4ee5\u5efa\u7acb\u5176\u9884\u671f\u7684\u641c\u7d22\u8def\u5f84\u73af\u5883\u3002</p>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u8fd8\u4f1a\u4e3a\u8fdc\u7a0b\u4f1a\u8bdd\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/16/runtime-config-client.html#GUC-TIMEZONE\">TimeZone</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">UTC</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/16/runtime-config-client.html#GUC-DATESTYLE\">DateStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">ISO</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/16/runtime-config-client.html#GUC-INTERVALSTYLE\">IntervalStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\u5bf9\u4e8e 9.0 \u53ca\u66f4\u65b0\u7248\u672c\u7684\u8fdc\u7aef\u670d\u52a1\u5668\uff0cextra_float_digits \u8bbe\u4e3a 3\uff1b\u66f4\u65e9\u7248\u672c\u5219\u8bbe\u4e3a 2\u3002</li>\n</ul>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u8bbe\u7f6e\u901a\u5e38\u4e0d\u50cf <code class=\"varname\">search_path</code> \u90a3\u6837\u5bb9\u6613\u51fa\u95ee\u9898\uff0c\u4f46\u5982\u679c\u6709\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684 <code class=\"literal\">SET</code> \u9009\u9879\u5904\u7406\u3002</p>\n<p lang=\"zh\"><span class=\"emphasis\"><em>\u4e0d</em></span>\u5efa\u8bae\u901a\u8fc7\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u7684\u4f1a\u8bdd\u7ea7\u8bbe\u7f6e\u6765\u8986\u76d6\u8fd9\u79cd\u884c\u4e3a\uff1b\u8fd9\u5f88\u53ef\u80fd\u5bfc\u81f4 <code class=\"filename\">postgres_fdw</code> \u5de5\u4f5c\u5f02\u5e38\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/postgres-fdw.html#POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">F.38.7. \u8de8\u7248\u672c\u517c\u5bb9\u6027</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CONFIGURATION-PARAMETERS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/postgres-fdw.html#POSTGRES-FDW-CONFIGURATION-PARAMETERS\">F.38.8. \u914d\u7f6e\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt id=\"GUC-PGFDW-APPLICATION-NAME\"><span class=\"term\"><code class=\"varname\">postgres_fdw.application_name</code> (<code class=\"type\">string</code>) </span> </dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a\u7528\u4e8e<a class=\"xref\" href=\"/docs/16/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u914d\u7f6e\u53c2\u6570\u7684\u503c\uff0c\u8be5\u503c\u4f1a\u5728 <code class=\"filename\">postgres_fdw</code> \u5efa\u7acb\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u65f6\u4f7f\u7528\u3002\u8fd9\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u5bf9\u8c61\u7684 <code class=\"varname\">application_name</code> \u9009\u9879\u3002\u8bf7\u6ce8\u610f\uff0c\u4fee\u6539\u6b64\u53c2\u6570\u4e0d\u4f1a\u5f71\u54cd\u4efb\u4f55\u73b0\u6709\u8fde\u63a5\uff0c\u9664\u975e\u8fd9\u4e9b\u8fde\u63a5\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\"><code class=\"varname\">postgres_fdw.application_name</code> \u53ef\u4ee5\u662f\u4efb\u610f\u957f\u5ea6\u7684\u4efb\u610f\u5b57\u7b26\u4e32\uff0c\u751a\u81f3\u53ef\u4ee5\u5305\u542b\u975e ASCII \u5b57\u7b26\u3002\u4e0d\u8fc7\uff0c\u5f53\u5b83\u88ab\u4f20\u9012\u5e76\u4f5c\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u4e2d\u7684 <code class=\"varname\">application_name</code> \u4f7f\u7528\u65f6\uff0c\u8bf7\u6ce8\u610f\u5b83\u4f1a\u88ab\u622a\u65ad\u5230\u5c11\u4e8e <code class=\"symbol\">NAMEDATALEN</code> \u4e2a\u5b57\u7b26\u3002\u9664\u53ef\u6253\u5370 ASCII \u5b57\u7b26\u4ee5\u5916\u7684\u6240\u6709\u5b57\u7b26\u90fd\u4f1a\u88ab\u66ff\u6362\u4e3a<a class=\"link\" href=\"/docs/16/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE\" title=\"4.1.2.2.\u00a0C\u98ce\u683c\u8f6c\u4e49\u7684\u5b57\u7b26\u4e32\u5e38\u91cf\">C \u98ce\u683c\u7684\u5341\u516d\u8fdb\u5236\u8f6c\u4e49</a>\u3002\u6709\u5173\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/16/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u3002</p>\n<p lang=\"zh\"><code class=\"literal\">%</code> \u5b57\u7b26\u8868\u793a<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u7684\u5f00\u59cb\uff0c\u5e76\u4f1a\u6309\u4e0b\u8ff0\u65b9\u5f0f\u66ff\u6362\u4e3a\u72b6\u6001\u4fe1\u606f\u3002\u672a\u8bc6\u522b\u7684\u8f6c\u4e49\u4f1a\u88ab\u5ffd\u7565\u3002\u5176\u4ed6\u5b57\u7b26\u4f1a\u539f\u6837\u590d\u5236\u5230\u5e94\u7528\u540d\u4e2d\u3002\u8bf7\u6ce8\u610f\uff0c\u4e0d\u5141\u8bb8\u5728 <code class=\"literal\">%</code> \u4e0e\u9009\u9879\u5b57\u6bcd\u4e4b\u95f4\u6307\u5b9a\u6b63\u8d1f\u53f7\u6216\u6570\u5b57\u5b57\u9762\u91cf\u6765\u8fdb\u884c\u5bf9\u9f50\u548c\u586b\u5145\u3002</p>\n<div class=\"informaltable\">\n<table class=\"informaltable\">\n<thead>\n<tr>\n<th lang=\"zh\">\u8f6c\u4e49\u5e8f\u5217</th>\n<th lang=\"zh\">\u6548\u679c</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"literal\">%a</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u5e94\u7528\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%c</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u4f1a\u8bdd ID\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/16/runtime-config-logging.html#GUC-LOG-LINE-PREFIX\">log_line_prefix</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%C</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u96c6\u7c07\u540d\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/16/runtime-config-logging.html#GUC-CLUSTER-NAME\">cluster_name</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%u</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u7528\u6237\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%d</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u5e93\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%p</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u540e\u7aef\u7684\u8fdb\u7a0b ID</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%%</code></td>\n<td lang=\"zh\">\u5b57\u9762\u5b57\u7b26 %</td>\n</tr>\n</tbody>\n</table>\n</div>\n<p lang=\"zh\">\u4f8b\u5982\uff0c\u5047\u8bbe\u7528\u6237 local_user \u4ece\u6570\u636e\u5e93 local_db \u4ee5 foreign_user \u8eab\u4efd\u8fde\u63a5\u5230 foreign_db\uff0c\u5219\u8bbe\u7f6e 'db=%d, user=%u' \u4f1a\u66ff\u6362\u4e3a 'db=local_db, user=local_user'\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-EXAMPLES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/postgres-fdw.html#POSTGRES-FDW-EXAMPLES\">F.38.9. \u793a\u4f8b</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4e0b\u9762\u662f\u4f7f\u7528 <code class=\"literal\">postgres_fdw</code> \u521b\u5efa\u5916\u90e8\u8868\u7684\u4e00\u4e2a\u793a\u4f8b\u3002\u9996\u5148\u5b89\u88c5\u6269\u5c55\uff1a</p>\n<pre class=\"programlisting\">CREATE EXTENSION postgres_fdw;\n</pre>\n<p lang=\"zh\">\u7136\u540e\u4f7f\u7528<a class=\"xref\" href=\"/docs/16/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8fde\u63a5\u5230\u4e00\u53f0 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\uff0c\u5b83\u8fd0\u884c\u5728\u4e3b\u673a <code class=\"literal\">192.83.123.89</code> \u4e0a\u5e76\u76d1\u542c <code class=\"literal\">5432</code> \u7aef\u53e3\u3002\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"literal\">foreign_db</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER foreign_server\n        FOREIGN DATA WRAPPER postgres_fdw\n        OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');\n</pre>\n<p lang=\"zh\">\u8fd8\u9700\u8981\u7528<a class=\"xref\" href=\"/docs/16/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u5b9a\u4e49\u4e00\u4e2a\u7528\u6237\u6620\u5c04\uff0c\u4ee5\u6807\u8bc6\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u54ea\u4e2a\u89d2\u8272\uff1a</p>\n<pre class=\"programlisting\">CREATE USER MAPPING FOR local_user\n        SERVER foreign_server\n        OPTIONS (user 'foreign_user', password 'password');\n</pre>\n<p lang=\"zh\">\u73b0\u5728\u5c31\u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/16/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u521b\u5efa\u5916\u90e8\u8868\u4e86\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"structname\">some_schema.some_table</code> \u7684\u8868\u3002\u5b83\u5728\u672c\u5730\u7684\u540d\u79f0\u5c06\u662f <code class=\"structname\">foreign_table</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE FOREIGN TABLE foreign_table (\n        id integer NOT NULL,\n        data text\n)\n        SERVER foreign_server\n        OPTIONS (schema_name 'some_schema', table_name 'some_table');\n</pre>\n<p lang=\"zh\">\u5728 <code class=\"command\">CREATE FOREIGN TABLE</code> \u4e2d\u58f0\u660e\u7684\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u5176\u4ed6\u5c5e\u6027\uff0c\u5fc5\u987b\u4e0e\u5b9e\u9645\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u5217\u540d\u4e5f\u5fc5\u987b\u5339\u914d\uff0c\u9664\u975e\u4e3a\u5404\u4e2a\u5217\u9644\u52a0 <code class=\"literal\">column_name</code> \u9009\u9879\u6765\u6307\u660e\u5b83\u4eec\u5728\u8fdc\u7a0b\u8868\u4e2d\u7684\u540d\u79f0\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u76f8\u6bd4\u624b\u5de5\u6784\u9020\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4f7f\u7528 <a class=\"link\" href=\"/docs/16/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><code class=\"command\">IMPORT FOREIGN SCHEMA</code></a> \u66f4\u53ef\u53d6\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-AUTHOR\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/16/postgres-fdw.html#POSTGRES-FDW-AUTHOR\">F.38.10. \u4f5c\u8005</a></span></h3>\n</div>\n</div>\n</div>\n<p>Shigeru Hanada <code class=\"email\">&lt;<a class=\"email\" href=\"mailto:shigeru.hanada@gmail.com\">shigeru.hanada@gmail.com</a>&gt;</code></p>\n</div>\n</div>", "manual_path": "/docs/16/postgres-fdw.html", "localization": {"status": "complete", "sources": [{"url": "/docs/16/postgres-fdw.html", "method": "same-major semantic node", "sha256": "7e592422ed8a7a36af215b6e6da187a3404ab87713e3a0fdd2f37ad0d4738403", "language": "zh", "matched_nodes": ["#POSTGRES-FDW/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[10]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/div[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[4]", "#POSTGRES-FDW/div[12]/div[1]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/p[3]", "#POSTGRES-FDW/div[12]/div[1]/p[4]", "#POSTGRES-FDW/div[12]/div[1]/p[5]", "#POSTGRES-FDW/div[12]/div[1]/p[7]", "#POSTGRES-FDW/div[12]/div[2]/div[0]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[2]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/div[0]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[3]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/p[3]", "#POSTGRES-FDW/div[12]/div[3]/p[4]", "#POSTGRES-FDW/div[12]/div[4]/div[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[2]", "#POSTGRES-FDW/div[12]/div[4]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[12]/div[5]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/div[0]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[6]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/p[3]", "#POSTGRES-FDW/div[12]/div[6]/p[4]", "#POSTGRES-FDW/div[12]/div[7]/div[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[7]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/div[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[7]", "#POSTGRES-FDW/div[12]/div[9]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/p[2]", "#POSTGRES-FDW/div[12]/div[9]/p[4]", "#POSTGRES-FDW/div[12]/div[9]/p[5]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[14]/p[1]", "#POSTGRES-FDW/div[14]/p[2]", "#POSTGRES-FDW/div[14]/p[3]", "#POSTGRES-FDW/div[15]/p[1]", "#POSTGRES-FDW/div[15]/p[2]", "#POSTGRES-FDW/div[15]/p[3]", "#POSTGRES-FDW/div[16]/p[1]", "#POSTGRES-FDW/div[16]/p[2]", "#POSTGRES-FDW/div[16]/p[3]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[0]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[1]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[2]", "#POSTGRES-FDW/div[17]/p[1]", "#POSTGRES-FDW/div[17]/p[2]", "#POSTGRES-FDW/div[17]/p[4]", "#POSTGRES-FDW/div[17]/p[5]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[0]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[1]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[2]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[3]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[4]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[5]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[6]/td[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[0]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[19]/div[1]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[0]", "#POSTGRES-FDW/div[1]/dl[0]/dt[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[4]", "#POSTGRES-FDW/div[1]/dl[0]/dt[5]", "#POSTGRES-FDW/div[1]/dl[0]/dt[6]", "#POSTGRES-FDW/div[1]/dl[0]/dt[7]", "#POSTGRES-FDW/div[1]/dl[0]/dt[8]", "#POSTGRES-FDW/div[1]/dl[0]/dt[9]", "#POSTGRES-FDW/div[20]/p[1]", "#POSTGRES-FDW/div[20]/p[3]", "#POSTGRES-FDW/div[20]/p[5]", "#POSTGRES-FDW/div[20]/p[7]", "#POSTGRES-FDW/div[20]/p[9]", "#POSTGRES-FDW/div[6]/ol[0]/li[0]", "#POSTGRES-FDW/div[6]/ol[0]/li[1]", "#POSTGRES-FDW/div[6]/ol[0]/li[2]", "#POSTGRES-FDW/div[6]/ol[0]/li[3]", "#POSTGRES-FDW/p[10]", "#POSTGRES-FDW/p[11]", "#POSTGRES-FDW/p[3]", "#POSTGRES-FDW/p[4]", "#POSTGRES-FDW/p[5]", "#POSTGRES-FDW/p[7]", "#POSTGRES-FDW/p[8]"]}], "language": "zh", "original_text": {"/versions/16/description/0": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/versions/16/facts/0/label": "Interface family", "/versions/16/facts/0/value": "Foreign-data wrapper", "/versions/16/facts/1/label": "Handler or routine", "/versions/16/facts/2/label": "Recorded callbacks", "/versions/16/facts/3/label": "Data source", "/versions/16/facts/3/value": "Remote PostgreSQL servers", "/versions/16/tables/0/title": "Registered interface handlers", "/versions/16/tables/1/title": "Documented options", "/versions/16/related/0/label": "Foreign-data wrapper catalog", "/versions/16/related/1/label": "Existing extension catalogue identity", "/versions/16/related/2/label": "Foreign Scan plan node", "/versions/16/sections/0/title": "Interface and capability boundaries", "/versions/16/sections/1/title": "Asynchronous Execution Options", "/versions/16/sections/2/title": "Transaction Management Options", "/versions/16/sections/3/title": "Transaction Management", "/versions/16/sections/4/title": "Remote Query Optimization", "/versions/16/sections/5/title": "Cross-Version Compatibility", "/versions/16/sections/6/title": "Registered implementation in core source", "/versions/16/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/16/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/16/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/16/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/16/sections/1/paragraphs/0": "postgres_fdw supports asynchronous execution, which runs multiple parts of an Append node concurrently rather than serially to improve performance. This execution can be controlled using the following option:", "/versions/16/sections/2/paragraphs/0": "As described in the Transaction Management section, in postgres_fdw transactions are managed by creating corresponding remote transactions, and subtransactions are managed by creating corresponding remote subtransactions. When multiple remote transactions are involved in the current local transaction, by default postgres_fdw commits or aborts those remote transactions serially when the local transaction is committed or aborted. When multiple remote subtransactions are involved in the current local subtransaction, by default postgres_fdw commits or aborts those remote subtransactions serially when the local subtransaction is committed or aborted. Performance can be improved with the following options:", "/versions/16/sections/2/paragraphs/1": "If multiple foreign servers with these options enabled are involved in a local transaction, multiple remote transactions on those foreign servers are committed or aborted in parallel across those foreign servers when the local transaction is committed or aborted.", "/versions/16/sections/2/paragraphs/2": "When these options are enabled, a foreign server with many remote transactions may see a negative performance impact when the local transaction is committed or aborted.", "/versions/16/sections/3/paragraphs/0": "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints.", "/versions/16/sections/3/paragraphs/1": "The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local transaction uses SERIALIZABLE or REPEATABLE READ isolation level, but it might be surprising for a READ COMMITTED local transaction. A future PostgreSQL release might modify these rules.", "/versions/16/sections/3/paragraphs/2": "Note that it is currently not supported by postgres_fdw to prepare the remote transaction for two-phase commit.", "/versions/16/sections/4/paragraphs/0": "postgres_fdw attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by sending query WHERE clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, WHERE clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an extension that's listed in the foreign server's extensions option. Operators and functions in such clauses must be IMMUTABLE as well. For an UPDATE or DELETE query, postgres_fdw attempts to optimize the query execution by sending the whole query to the remote server if there are no query WHERE clauses that cannot be sent to the remote server, no local joins for the query, no row-level local BEFORE or AFTER triggers or stored generated columns on the target table, and no CHECK OPTION constraints from parent views. In UPDATE , expressions to assign to target columns must use only built-in data types, IMMUTABLE operators, or IMMUTABLE functions, to reduce the risk of misexecution of the query.", "/versions/16/sections/4/paragraphs/1": "When postgres_fdw encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved are subject to different user mappings. While sending the JOIN clauses, it takes the same precautions as mentioned above for the WHERE clauses.", "/versions/16/sections/4/paragraphs/2": "The query that is actually sent to the remote server for execution can be examined using EXPLAIN VERBOSE .", "/versions/16/sections/5/paragraphs/0": "postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1. A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent to it for execution, resulting in \u201c function does not exist \u201d or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table reference in a sub- SELECT with OFFSET 0 as an optimization fence, and placing the problematic function or operator outside the sub- SELECT .", "/versions/16/tables/0/rows/0/feature": "Scan rows", "/versions/16/tables/0/rows/5/feature": "Join path pushdown", "/versions/16/tables/0/rows/6/feature": "Upper paths, including aggregation", "/versions/16/tables/0/rows/7/feature": "Batch insert", "/versions/16/tables/0/rows/8/feature": "Asynchronous append execution", "/versions/16/tables/0/rows/9/feature": "Import schema", "/versions/16/tables/0/columns/0/label": "Interface operation", "/versions/16/tables/0/columns/1/label": "Source observation", "/versions/16/tables/0/columns/2/label": "Callback", "/versions/16/tables/0/columns/3/label": "Implementation", "/versions/16/tables/1/columns/0/label": "Option", "/versions/16/tables/1/columns/1/label": "Same-version definition", "/versions/16/tables/1/rows/0/definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used.", "/versions/16/tables/1/rows/1/definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used.", "/versions/16/tables/1/rows/2/definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used.", "/versions/16/tables/1/rows/3/definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false .", "/versions/16/tables/1/rows/4/definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 .", "/versions/16/tables/1/rows/5/definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 .", "/versions/16/tables/1/rows/6/definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table samples the data on the remote side, or reads and transfers all data and performs the sampling locally. The supported values are off , random , system , bernoulli and auto . off disables remote sampling, so all data are transferred and sampled locally. random performs remote sampling using the random() function to choose returned rows, while system and bernoulli rely on the built-in TABLESAMPLE methods of those names. random works on all remote server versions, while TABLESAMPLE is supported only since 9.5. auto (the default) picks the recommended sampling method automatically; currently it means either bernoulli or random depending on the remote server version.", "/versions/16/tables/1/rows/7/definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.", "/versions/16/tables/1/rows/8/definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 .", "/versions/16/tables/1/rows/9/definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error. This option also applies when copying into foreign tables. In that case the actual number of rows postgres_fdw copies at once is determined in a similar way to the insert case, but it is limited to at most 1000 due to implementation restrictions of the COPY command.", "/versions/16/tables/1/rows/10/definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release.", "/versions/16/tables/1/rows/11/definition": "This option controls whether postgres_fdw commits, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false .", "/versions/16/tables/1/rows/12/definition": "This option controls whether postgres_fdw aborts, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is aborted. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false .", "/versions/16/tables/1/rows/13/definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server.", "/versions/16/tables/1/rows/14/definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server.", "/versions/16/tables/1/rows/15/definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different.", "/versions/16/tables/1/rows/16/definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally.", "/versions/16/tables/1/rows/17/definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally.", "/versions/16/tables/1/rows/18/definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true .", "/versions/16/tables/1/rows/19/definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "80a97430a78e8aaeb8677632a1c7e9086429895cf18040aa861be74cfbcf01f9"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "schema_name", "definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used."}, {"name": "table_name", "definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used."}, {"name": "column_name", "definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used."}, {"name": "use_remote_estimate", "definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false ."}, {"name": "fdw_startup_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 ."}, {"name": "fdw_tuple_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.01 ."}, {"name": "analyze_sampling", "definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table samples the data on the remote side, or reads and transfers all data and performs the sampling locally. The supported values are off , random , system , bernoulli and auto . off disables remote sampling, so all data are transferred and sampled locally. random performs remote sampling using the random() function to choose returned rows, while system and bernoulli rely on the built-in TABLESAMPLE methods of those names. random works on all remote server versions, while TABLESAMPLE is supported only since 9.5. auto (the default) picks the recommended sampling method automatically; currently it means either bernoulli or random depending on the remote server version."}, {"name": "extensions", "definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly."}, {"name": "fetch_size", "definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 ."}, {"name": "batch_size", "definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error. This option also applies when copying into foreign tables. In that case the actual number of rows postgres_fdw copies at once is determined in a similar way to the insert case, but it is limited to at most 1000 due to implementation restrictions of the COPY command."}, {"name": "async_capable", "definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release."}, {"name": "parallel_commit", "definition": "This option controls whether postgres_fdw commits, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false ."}, {"name": "parallel_abort", "definition": "This option controls whether postgres_fdw aborts, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is aborted. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false ."}, {"name": "updatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server."}, {"name": "truncatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server."}, {"name": "import_collate", "definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different."}, {"name": "import_default", "definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally."}, {"name": "import_generated", "definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally."}, {"name": "import_not_null", "definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true ."}, {"name": "keep_connections", "definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction."}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "source_options": [], "protocol_versions": {}}, "comparison_hash": "77fccbacd6d7dc405d025bfce572f0544dc46f545865cdd135b2216a188e48de", "manual_language": "zh", "runtime_verified": false}, "17": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "postgres_fdw_handler"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "36"}, {"label": "\u6570\u636e\u6e90", "value": "\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u626b\u63cf\u6570\u636e\u884c", "callback": "IterateForeignScan", "implementation": "postgresIterateForeignScan"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "INSERT", "callback": "ExecForeignInsert", "implementation": "postgresExecForeignInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "UPDATE", "callback": "ExecForeignUpdate", "implementation": "postgresExecForeignUpdate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "DELETE", "callback": "ExecForeignDelete", "implementation": "postgresExecForeignDelete"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "ExecForeignTruncate", "implementation": "postgresExecForeignTruncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u8fde\u63a5\u8def\u5f84\u4e0b\u63a8", "callback": "GetForeignJoinPaths", "implementation": "postgresGetForeignJoinPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u4e0a\u5c42\u8def\u5f84\uff0c\u5305\u62ec\u805a\u5408", "callback": "GetForeignUpperPaths", "implementation": "postgresGetForeignUpperPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6279\u91cf\u63d2\u5165", "callback": "ExecForeignBatchInsert", "implementation": "postgresExecForeignBatchInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f02\u6b65\u8ffd\u52a0\u6267\u884c", "callback": "ForeignAsyncRequest", "implementation": "postgresForeignAsyncRequest"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5bfc\u5165\u6a21\u5f0f", "callback": "ImportForeignSchema", "implementation": "postgresImportForeignSchema"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "schema_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002"}, {"name": "table_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "column_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "use_remote_estimate", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 postgres_fdw \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b EXPLAIN \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "fdw_startup_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "fdw_tuple_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a 0.2 \u3002"}, {"name": "analyze_sampling", "definition": "\u6b64\u9009\u9879\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u51b3\u5b9a\u5916\u90e8\u8868 ANALYZE \u662f\u5728\u8fdc\u7a0b\u91c7\u6837\uff0c\u8fd8\u662f\u8bfb\u53d6\u5e76\u4f20\u8f93\u5168\u90e8\u6570\u636e\u540e\u5728\u672c\u5730\u91c7\u6837\u3002\u652f\u6301 off\u3001random\u3001system\u3001bernoulli \u548c auto\u3002off \u7981\u7528\u8fdc\u7a0b\u91c7\u6837\uff0c\u5168\u90e8\u6570\u636e\u4f1a\u4f20\u5230\u672c\u5730\u540e\u91c7\u6837\u3002random \u4f7f\u7528 random() \u51fd\u6570\u5728\u8fdc\u7a0b\u9009\u62e9\u8fd4\u56de\u884c\uff1bsystem \u548c bernoulli \u4f7f\u7528\u540c\u540d\u5185\u7f6e TABLESAMPLE \u65b9\u6cd5\u3002random \u9002\u7528\u4e8e\u6240\u6709\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\uff0cTABLESAMPLE \u4ec5\u4ece 9.5 \u8d77\u652f\u6301\u3002\u9ed8\u8ba4\u503c auto \u81ea\u52a8\u9009\u62e9\u63a8\u8350\u65b9\u6cd5\uff0c\u76ee\u524d\u6839\u636e\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\u9009\u62e9 bernoulli \u6216 random\u3002"}, {"name": "extensions", "definition": "\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 PostgreSQL \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002 \u4f7f\u7528 extensions \u9009\u9879\u65f6\uff0c \u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002"}, {"name": "fetch_size", "definition": "\u8be5\u9009\u9879\u6307\u5b9a postgres_fdw \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "batch_size", "definition": "\u6b64\u9009\u9879\u6307\u5b9a postgres_fdw \u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u5e94\u63d2\u5165\u7684\u884c\u6570\uff0c\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u8868\u7ea7\u8bbe\u7f6e\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u8bbe\u7f6e\uff0c\u9ed8\u8ba4\u503c\u4e3a 1\u3002\u5b9e\u9645\u4e00\u6b21\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u548c batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u4e00\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570\u4e58\u4ee5 batch_size \u8d85\u51fa\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u62a5\u9519\u3002\u6b64\u9009\u9879\u4e5f\u9002\u7528\u4e8e\u5411\u5916\u90e8\u8868\u6267\u884c COPY\uff0c\u5b9e\u9645\u4e00\u6b21\u590d\u5236\u7684\u884c\u6570\u6309\u7c7b\u4f3c\u65b9\u5f0f\u786e\u5b9a\uff0c\u4f46\u53d7 COPY \u5b9e\u73b0\u9650\u5236\uff0c\u6700\u591a\u4e3a 1000 \u884c\u3002"}, {"name": "async_capable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002 \u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c postgres_fdw \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002 \u5373\u4f7f Append \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 postgres_fdw \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002"}, {"name": "parallel_commit", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "parallel_abort", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u4e2d\u6b62\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u4e2d\u6b62\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "updatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 INSERT \u3001 UPDATE \u548c DELETE \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c information_schema \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 postgres_fdw \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002"}, {"name": "truncatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 TRUNCATE \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002"}, {"name": "import_collate", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 COLLATE \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002 \u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a true \uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 COLLATE \"default\" \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002"}, {"name": "import_default", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 DEFAULT \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b nextval() \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_generated", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 GENERATED \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_not_null", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 NOT NULL \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002"}, {"name": "keep_connections", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a on \u3002\u5982\u679c\u8bbe\u7f6e\u4e3a off \uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}], "related": [{"url": "/wiki/catalog/pg_foreign_data_wrapper/?v=17", "label": "Foreign-data wrapper \u7cfb\u7edf\u76ee\u5f55"}, {"url": "/e/postgres_fdw/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/plan/foreign-scan/?v=17", "label": "Foreign Scan \u8ba1\u5212\u8282\u70b9"}], "release": {"ref": "PostgreSQL 17.11 source archive", "label": "17.11", "major": "17", "channel": "stable", "revision": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979", "source_url": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/17/postgres-fdw.html", "path": "postgres-fdw.html", "label": "PostgreSQL 17 English manual", "sha256": "af9a729e6545284286c7d7f43eed9764147340f90d498de625ad057e98b0ed29", "language": "en", "original_url": "/docs/17/postgres-fdw.html"}, {"url": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "line": 554, "path": "contrib/postgres_fdw/postgres_fdw.c", "label": "contrib/postgres_fdw/postgres_fdw.c:554", "sha256": "7adb379ebb4217c716a19ff4541e79ac284799c8488f59d70ec3f885cb3ea487", "archive_sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u5f02\u6b65\u6267\u884c\u9009\u9879", "paragraphs": ["postgres_fdw \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c Append \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406\u9009\u9879", "paragraphs": ["\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0c\u5728 postgres_fdw \u4e2d\uff0c\u4e8b\u52a1\u662f\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u6765\u7ba1\u7406\u7684\uff0c\u5b50\u4e8b\u52a1\u5219\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u6765\u7ba1\u7406\u3002\u5f53\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c postgres_fdw \u4f1a\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c postgres_fdw \u4e5f\u4f1a\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u53ef\u4ee5\u6539\u5584\u6027\u80fd\uff1a", "\u5982\u679c\u542f\u7528\u4e86\u8fd9\u4e9b\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002", "\u542f\u7528\u8fd9\u4e9b\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406", "paragraphs": ["\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c postgres_fdw \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002", "\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a SERIALIZABLE \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \uff1b\u5426\u5219\u4f7f\u7528 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 SERIALIZABLE \u6216 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e READ COMMITTED \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 PostgreSQL \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002", "\u8bf7\u6ce8\u610f\uff0c postgres_fdw \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002"]}, {"title": "\u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316", "paragraphs": ["postgres_fdw \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 WHERE \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 WHERE \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 extensions \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f IMMUTABLE \u3002\u5bf9\u4e8e UPDATE \u6216 DELETE \u67e5\u8be2\uff0c postgres_fdw \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 WHERE \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 BEFORE \u6216 AFTER \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 CHECK OPTION \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 UPDATE \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001 IMMUTABLE \u64cd\u4f5c\u7b26\u6216 IMMUTABLE \u51fd\u6570\u3002", "\u5f53 postgres_fdw \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 JOIN \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 WHERE \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002", "\u53ef\u4ee5\u4f7f\u7528 EXPLAIN VERBOSE \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002"]}, {"title": "\u8de8\u7248\u672c\u517c\u5bb9\u6027", "paragraphs": ["postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002"]}, {"code": "{\n\tFdwRoutine *routine = makeNode(FdwRoutine);\n\n\t/* Functions for scanning foreign tables */\n\troutine->GetForeignRelSize = postgresGetForeignRelSize;\n\troutine->GetForeignPaths = postgresGetForeignPaths;\n\troutine->GetForeignPlan = postgresGetForeignPlan;\n\troutine->BeginForeignScan = postgresBeginForeignScan;\n\troutine->IterateForeignScan = postgresIterateForeignScan;\n\troutine->ReScanForeignScan = postgresReScanForeignScan;\n\troutine->EndForeignScan = postgresEndForeignScan;\n\n\t/* Functions for updating foreign tables */\n\troutine->AddForeignUpdateTargets = postgresAddForeignUpdateTargets;\n\troutine->PlanForeignModify = postgresPlanForeignModify;\n\troutine->BeginForeignModify = postgresBeginForeignModify;\n\troutine->ExecForeignInsert = postgresExecForeignInsert;\n\troutine->ExecForeignBatchInsert = postgresExecForeignBatchInsert;\n\troutine->GetForeignModifyBatchSize = postgresGetForeignModifyBatchSize;\n\troutine->ExecForeignUpdate = postgresExecForeignUpdate;\n\troutine->ExecForeignDelete = postgresExecForeignDelete;\n\troutine->EndForeignModify = postgresEndForeignModify;\n\troutine->BeginForeignInsert = postgresBeginForeignInsert;\n\troutine->EndForeignInsert = postgresEndForeignInsert;\n\troutine->IsForeignRelUpdatable = postgresIsForeignRelUpdatable;\n\troutine->PlanDirectModify = postgresPlanDirectModify;\n\troutine->BeginDirectModify = postgresBeginDirectModify;\n\troutine->IterateDirectModify = postgresIterateDirectModify;\n\troutine->EndDirectModify = postgresEndDirectModify;\n\n\t/* Function for EvalPlanQual rechecks */\n\troutine->RecheckForeignScan = postgresRecheckForeignScan;\n\t/* Support functions for EXPLAIN */\n\troutine->ExplainForeignScan = postgresExplainForeignScan;\n\troutine->ExplainForeignModify = postgresExplainForeignModify;\n\troutine->ExplainDirectModify = postgresExplainDirectModify;\n\n\t/* Support function for TRUNCATE */\n\troutine->ExecForeignTruncate = postgresExecForeignTruncate;\n\n\t/* Support functions for ANALYZE */\n\troutine->AnalyzeForeignTable = postgresAnalyzeForeignTable;\n\n\t/* Support functions for IMPORT FOREIGN SCHEMA */\n\troutine->ImportForeignSchema = postgresImportForeignSchema;\n\n\t/* Support functions for join push-down */\n\troutine->GetForeignJoinPaths = postgresGetForeignJoinPaths;\n\n\t/* Support functions for upper relation push-down */\n\troutine->GetForeignUpperPaths = postgresGetForeignUpperPaths;\n\n\t/* Support functions for asynchronous execution */\n\troutine->IsForeignPathAsyncCapable = postgresIsForeignPathAsyncCapable;\n\troutine->ForeignAsyncRequest = postgresForeignAsyncRequest;\n\troutine->ForeignAsyncConfigureWait = postgresForeignAsyncConfigureWait;\n\troutine->ForeignAsyncNotify = postgresForeignAsyncNotify;\n\n\tPG_RETURN_POINTER(routine);\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "description": ["\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002"], "manual_html": "<div class=\"sect1\" id=\"POSTGRES-FDW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">F.36.\u00a0postgres_fdw \u2014 \u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u6a21\u5757\u63d0\u4f9b\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668 <code class=\"literal\">postgres_fdw</code>\uff0c\u53ef\u7528\u4e8e\u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u672c\u6a21\u5757\u63d0\u4f9b\u7684\u529f\u80fd\u4e0e\u8f83\u65e7\u7684<a class=\"xref\" href=\"/docs/17/dblink.html\" title=\"F.11.\u00a0dblink \u2014 \u8fde\u63a5\u5230\u5176\u4ed6 PostgreSQL \u6570\u636e\u5e93\">dblink</a>\u6a21\u5757\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u91cd\u53e0\u3002\u4f46 <code class=\"filename\">postgres_fdw</code> \u4e3a\u8bbf\u95ee\u8fdc\u7a0b\u8868\u63d0\u4f9b\u4e86\u66f4\u900f\u660e\u4e14\u7b26\u5408\u6807\u51c6\u7684\u8bed\u6cd5\uff0c\u5e76\u4e14\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u6027\u80fd\u66f4\u597d\u3002</p>\n<p lang=\"zh\">\u8981\u51c6\u5907\u901a\u8fc7 <code class=\"filename\">postgres_fdw</code> \u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee\uff1a</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5b89\u88c5 <code class=\"filename\">postgres_fdw</code> \u6269\u5c55\uff0c\u53ef\u4f7f\u7528<a class=\"xref\" href=\"/docs/17/sql-createextension.html\" title=\"CREATE EXTENSION\"><span class=\"refentrytitle\">CREATE EXTENSION</span></a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u4f7f\u7528<a class=\"xref\" href=\"/docs/17/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u5bf9\u8c61\uff0c\u7528\u6765\u8868\u793a\u6bcf\u4e2a\u8981\u8fde\u63a5\u7684\u8fdc\u7a0b\u6570\u636e\u5e93\u3002\u5c06\u9664 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u4e4b\u5916\u7684\u8fde\u63a5\u4fe1\u606f\u6307\u5b9a\u4e3a\u670d\u52a1\u5668\u5bf9\u8c61\u7684\u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u9700\u8981\u83b7\u51c6\u8bbf\u95ee\u5404\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u7528\u6237\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/17/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u521b\u5efa\u7528\u6237\u6620\u5c04\u3002\u5c06\u8981\u4f7f\u7528\u7684\u8fdc\u7a0b\u7528\u6237\u540d\u548c\u5bc6\u7801\u6307\u5b9a\u4e3a\u7528\u6237\u6620\u5c04\u7684 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u8981\u8bbf\u95ee\u7684\u8fdc\u7a0b\u8868\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/17/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u6216<a class=\"xref\" href=\"/docs/17/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5916\u90e8\u8868\u7684\u5217\u5fc5\u987b\u4e0e\u88ab\u5f15\u7528\u7684\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u5728\u5916\u90e8\u8868\u5bf9\u8c61\u7684\u9009\u9879\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8fdc\u7a0b\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0e\u8fdc\u7a0b\u8868\u4e0d\u540c\u7684\u8868\u540d\u548c/\u6216\u5217\u540d\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\">\u73b0\u5728\uff0c\u53ea\u9700\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">SELECT</code>\uff0c\u5373\u53ef\u8bbf\u95ee\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u4e2d\u5b58\u50a8\u7684\u6570\u636e\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code>\u3001<code class=\"command\">COPY</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4fee\u6539\u8fdc\u7a0b\u8868\u3002\uff08\u5f53\u7136\uff0c\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\u7684\u8fdc\u7a0b\u7528\u6237\u5fc5\u987b\u62e5\u6709\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u6743\u9650\u3002\uff09</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5728\u8bbf\u95ee\u6216\u4fee\u6539\u8fdc\u7a0b\u8868\u65f6\uff0c<code class=\"literal\">ONLY</code> \u9009\u9879\u5728 <code class=\"command\">SELECT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4e2d\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n<p lang=\"zh\">postgres_fdw \u76ee\u524d\u4e0d\u652f\u6301\u5e26 ON CONFLICT DO UPDATE \u5b50\u53e5\u7684 INSERT\u3002\u4e0d\u8fc7\uff0c\u652f\u6301 ON CONFLICT DO NOTHING\uff0c\u524d\u63d0\u662f\u4e0d\u6307\u5b9a\u552f\u4e00\u7d22\u5f15\u63a8\u65ad\u6761\u4ef6\u3002postgres_fdw \u8fd8\u652f\u6301\u5728\u5206\u533a\u8868\u4e0a\u6267\u884c UPDATE \u6240\u89e6\u53d1\u7684\u884c\u79fb\u52a8\uff0c\u4f46\u76ee\u524d\u4e0d\u652f\u6301\u4ee5\u4e0b\u60c5\u51b5\uff1a\u7528\u4e8e\u63a5\u6536\u79fb\u5165\u884c\u7684\u8fdc\u7aef\u5206\u533a\uff0c\u540c\u65f6\u4e5f\u662f\u540c\u4e00\u547d\u4ee4\u4e2d\u5176\u4ed6\u4f4d\u7f6e\u5c06\u8981\u66f4\u65b0\u7684 UPDATE \u76ee\u6807\u5206\u533a\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5c06\u5916\u90e8\u8868\u7684\u5217\u58f0\u660e\u4e3a\u4e0e\u88ab\u5f15\u7528\u8fdc\u7a0b\u8868\u7684\u5bf9\u5e94\u5217\u5177\u6709\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u5728\u9002\u7528\u65f6\u5177\u6709\u76f8\u540c\u7684\u6392\u5e8f\u89c4\u5219\u3002\u5c3d\u7ba1 <code class=\"filename\">postgres_fdw</code> \u76ee\u524d\u5728\u6309\u9700\u6267\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u9762\u76f8\u5f53\u5bbd\u5bb9\uff0c\u4f46\u5f53\u7c7b\u578b\u6216\u6392\u5e8f\u89c4\u5219\u4e0d\u5339\u914d\u65f6\uff0c\u4ecd\u53ef\u80fd\u51fa\u73b0\u4ee4\u4eba\u610f\u5916\u7684\u8bed\u4e49\u5f02\u5e38\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5bf9\u67e5\u8be2\u6761\u4ef6\u7684\u89e3\u91ca\u53ef\u80fd\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5916\u90e8\u8868\u7684\u58f0\u660e\u53ef\u4ee5\u6bd4\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u5c11\u4e00\u4e9b\u5217\uff0c\u6216\u8005\u4f7f\u7528\u4e0d\u540c\u7684\u5217\u987a\u5e8f\u3002\u4e0e\u8fdc\u7a0b\u8868\u5217\u7684\u5339\u914d\u662f\u6309\u540d\u79f0\u800c\u4e0d\u662f\u6309\u4f4d\u7f6e\u8fdb\u884c\u7684\u3002</p>\n<div class=\"sect2\" id=\"POSTGRES-FDW-OPTIONS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/postgres-fdw.html#POSTGRES-FDW-OPTIONS\">F.36.1. postgres_fdw \u7684 FDW \u9009\u9879</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-CONNECTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.36.1.1.\u00a0\u8fde\u63a5\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528 <span class=\"application\">libpq</span> \u5728\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u63a5\u53d7\u7684\u76f8\u540c\u9009\u9879\uff0c\u8be6\u89c1<a class=\"xref\" href=\"/docs/17/libpq-connect.html#LIBPQ-PARAMKEYWORDS\" title=\"32.1.2.\u00a0\u53c2\u6570\u5173\u952e\u8bcd\">\u7b2c\u00a032.1.2\u00a0\u8282</a>\uff1b\u4f46\u4ee5\u4e0b\u9009\u9879\u4e0d\u5141\u8bb8\u4f7f\u7528\uff0c\u6216\u4f1a\u88ab\u7279\u6b8a\u5904\u7406\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">user</code>\u3001<code class=\"literal\">password</code> \u548c <code class=\"literal\">sslpassword</code>\uff08\u8bf7\u6539\u4e3a\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\uff0c\u6216\u4f7f\u7528\u670d\u52a1\u6587\u4ef6\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">client_encoding</code>\uff08\u4f1a\u6839\u636e\u672c\u5730\u670d\u52a1\u5668\u7f16\u7801\u81ea\u52a8\u8bbe\u7f6e\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">application_name</code> \u53ef\u4ee5\u51fa\u73b0\u5728\u8fde\u63a5\u9009\u9879\u548c<a class=\"xref\" href=\"/docs/17/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u4e2d\u7684<span class=\"emphasis\"><em>\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c<code class=\"varname\">postgres_fdw.application_name</code> \u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002\u4e0e <span class=\"application\">libpq</span> \u4e0d\u540c\uff0c<code class=\"filename\">postgres_fdw</code> \u5141\u8bb8 <code class=\"varname\">application_name</code> \u5305\u542b<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/17/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">fallback_application_name</code>\uff08\u59cb\u7ec8\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres_fdw</code>\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">sslkey</code> \u548c <code class=\"literal\">sslcert</code> \u53ef\u4ee5\u51fa\u73b0\u5728<span class=\"emphasis\"><em>\u8fde\u63a5\u9009\u9879\u3001\u7528\u6237\u6620\u5c04\u4e2d\u7684\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c\u7528\u6237\u6620\u5c04\u8bbe\u7f6e\u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002</p>\n</li>\n</ul>\n</div>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u521b\u5efa\u6216\u4fee\u6539\u5e26\u6709 <code class=\"literal\">sslcert</code> \u6216 <code class=\"literal\">sslkey</code> \u8bbe\u7f6e\u7684\u7528\u6237\u6620\u5c04\u3002</p>\n<p lang=\"zh\">\u975e\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5bc6\u7801\u8ba4\u8bc1\u6216\u4f7f\u7528 GSSAPI \u59d4\u6d3e\u51ed\u636e\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\uff0c\u56e0\u6b64\u5728\u9700\u8981\u5bc6\u7801\u8ba4\u8bc1\u7684\u573a\u666f\u4e2d\uff0c\u5e94\u4e3a\u5c5e\u4e8e\u975e\u8d85\u7ea7\u7528\u6237\u7684\u7528\u6237\u6620\u5c04\u6307\u5b9a <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u7528\u6237\u6620\u5c04\u9009\u9879 <code class=\"literal\">password_required 'false'</code> \u6309\u7528\u6237\u6620\u5c04\u5355\u72ec\u8986\u76d6\u6b64\u68c0\u67e5\uff0c\u4f8b\u5982\uff1a</p>\n<pre class=\"programlisting\">ALTER USER MAPPING FOR some_non_superuser SERVER loopback_nopw\nOPTIONS (ADD password_required 'false');\n</pre>\n<p lang=\"zh\">\u4e3a\u4e86\u9632\u6b62\u975e\u7279\u6743\u7528\u6237\u5229\u7528 postgres \u670d\u52a1\u5668\u6240\u8fd0\u884c\u7684 unix \u7528\u6237\u7684\u8ba4\u8bc1\u6743\u9650\u63d0\u5347\u5230\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u5728\u7528\u6237\u6620\u5c04\u4e0a\u8bbe\u7f6e\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u5fc5\u987b\u8c28\u614e\uff0c\u786e\u4fdd\u8fd9\u4e0d\u4f1a\u4f7f\u6620\u5c04\u7528\u6237\u80fd\u591f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\u5230\u6620\u5c04\u7684\u6570\u636e\u5e93\uff0c\u53c2\u89c1 CVE-2007-3278 \u548c CVE-2007-6601\u3002\u4e0d\u8981\u4e3a public \u89d2\u8272\u8bbe\u7f6e password_required=false\u3002\u8bf7\u6ce8\u610f\uff0c\u6620\u5c04\u7528\u6237\u53ef\u80fd\u4f7f\u7528\u8fd0\u884c postgres \u670d\u52a1\u5668\u7684\u7cfb\u7edf\u7528\u6237\u7684 Unix \u4e3b\u76ee\u5f55\u4e2d\u7684\u4efb\u4f55\u5ba2\u6237\u7aef\u8bc1\u4e66\u3001.pgpass\u3001.pg_service.conf \u7b49\uff0c\u4e5f\u53ef\u80fd\u5229\u7528 peer\u3001ident \u7b49\u8ba4\u8bc1\u65b9\u5f0f\u6388\u4e88\u7684\u4efb\u4f55\u4fe1\u4efb\u5173\u7cfb\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-OBJECT-NAME\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.36.1.2.\u00a0\u5bf9\u8c61\u540d\u79f0\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u9009\u9879\u53ef\u7528\u4e8e\u63a7\u5236\u53d1\u9001\u5230\u8fdc\u7a0b <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u7684 SQL \u8bed\u53e5\u4e2d\u6240\u4f7f\u7528\u7684\u540d\u79f0\u3002\u5f53\u521b\u5efa\u5916\u90e8\u8868\u65f6\u6240\u7528\u7684\u540d\u79f0\u4e0e\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u7684\u540d\u79f0\u4e0d\u540c\u65f6\uff0c\u5c31\u9700\u8981\u8fd9\u4e9b\u9009\u9879\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">schema_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">table_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">column_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-COST-ESTIMATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.36.1.3.\u00a0\u4ee3\u4ef7\u4f30\u7b97\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u901a\u8fc7\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u67e5\u8be2\u6765\u83b7\u53d6\u8fdc\u7a0b\u6570\u636e\uff0c\u56e0\u6b64\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u626b\u63cf\u5916\u90e8\u8868\u7684\u4f30\u8ba1\u4ee3\u4ef7\u5e94\u5f53\u7b49\u4e8e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b8c\u6210\u8be5\u64cd\u4f5c\u7684\u4ee3\u4ef7\uff0c\u518d\u52a0\u4e0a\u4e00\u4e9b\u901a\u4fe1\u5f00\u9500\u3002\u83b7\u5f97\u8fd9\u79cd\u4f30\u7b97\u6700\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u662f\u5411\u8fdc\u7a0b\u670d\u52a1\u5668\u8be2\u95ee\uff0c\u518d\u628a\u5f00\u9500\u52a0\u4e0a\u53bb\uff1b\u4f46\u5bf9\u4e8e\u7b80\u5355\u67e5\u8be2\uff0c\u4e3a\u4e86\u53d6\u5f97\u4ee3\u4ef7\u4f30\u7b97\u800c\u989d\u5916\u53d1\u9001\u4e00\u6b21\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ef\u80fd\u5e76\u4e0d\u5212\u7b97\u3002\u56e0\u6b64 <code class=\"filename\">postgres_fdw</code> \u63d0\u4f9b\u4ee5\u4e0b\u9009\u9879\u6765\u63a7\u5236\u4ee3\u4ef7\u4f30\u7b97\u7684\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">use_remote_estimate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b <code class=\"command\">EXPLAIN</code> \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_startup_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_tuple_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">0.2</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u771f\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4ece\u8fdc\u7a0b\u670d\u52a1\u5668\u83b7\u53d6\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u5047\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u5728\u672c\u5730\u6267\u884c\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u518d\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u9664\u975e\u6709\u8fdc\u7a0b\u8868\u7edf\u8ba1\u4fe1\u606f\u7684\u672c\u5730\u526f\u672c\u53ef\u7528\uff0c\u5426\u5219\u8fd9\u79cd\u672c\u5730\u4f30\u7b97\u4e0d\u592a\u53ef\u80fd\u975e\u5e38\u51c6\u786e\u3002\u66f4\u65b0\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c\u662f\u5728\u5916\u90e8\u8868\u4e0a\u8fd0\u884c<a class=\"xref\" href=\"/docs/17/sql-analyze.html\" title=\"ANALYZE\"><span class=\"refentrytitle\">ANALYZE</span></a>\uff1b\u8fd9\u6837\u4f1a\u626b\u63cf\u8fdc\u7a0b\u8868\uff0c\u7136\u540e\u50cf\u5bf9\u5f85\u672c\u5730\u8868\u4e00\u6837\u8ba1\u7b97\u5e76\u5b58\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u4fdd\u7559\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u8fdc\u7a0b\u8868\u6bcf\u6b21\u67e5\u8be2\u7684\u89c4\u5212\u5f00\u9500\uff1b\u4f46\u5982\u679c\u8fdc\u7a0b\u8868\u7ecf\u5e38\u66f4\u65b0\uff0c\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u5f88\u5feb\u5c31\u4f1a\u8fc7\u65f6\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd <code class=\"command\">ANALYZE</code> \u64cd\u4f5c\u7684\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">analyze_sampling</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u51b3\u5b9a\u5916\u90e8\u8868 ANALYZE \u662f\u5728\u8fdc\u7a0b\u91c7\u6837\uff0c\u8fd8\u662f\u8bfb\u53d6\u5e76\u4f20\u8f93\u5168\u90e8\u6570\u636e\u540e\u5728\u672c\u5730\u91c7\u6837\u3002\u652f\u6301 off\u3001random\u3001system\u3001bernoulli \u548c auto\u3002off \u7981\u7528\u8fdc\u7a0b\u91c7\u6837\uff0c\u5168\u90e8\u6570\u636e\u4f1a\u4f20\u5230\u672c\u5730\u540e\u91c7\u6837\u3002random \u4f7f\u7528 random() \u51fd\u6570\u5728\u8fdc\u7a0b\u9009\u62e9\u8fd4\u56de\u884c\uff1bsystem \u548c bernoulli \u4f7f\u7528\u540c\u540d\u5185\u7f6e TABLESAMPLE \u65b9\u6cd5\u3002random \u9002\u7528\u4e8e\u6240\u6709\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\uff0cTABLESAMPLE \u4ec5\u4ece 9.5 \u8d77\u652f\u6301\u3002\u9ed8\u8ba4\u503c auto \u81ea\u52a8\u9009\u62e9\u63a8\u8350\u65b9\u6cd5\uff0c\u76ee\u524d\u6839\u636e\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\u9009\u62e9 bernoulli \u6216 random\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-REMOTE-EXECUTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.36.1.4.\u00a0\u8fdc\u7a0b\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709\u4f7f\u7528\u5185\u7f6e\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u624d\u4f1a\u88ab\u8003\u8651\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u3002\u6d89\u53ca\u975e\u5185\u7f6e\u51fd\u6570\u7684\u5b50\u53e5\u4f1a\u5728\u53d6\u56de\u884c\u4e4b\u540e\u5728\u672c\u5730\u68c0\u67e5\u3002\u5982\u679c\u8fd9\u4e9b\u51fd\u6570\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e5f\u53ef\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fe1\u5176\u7ed3\u679c\u4e0e\u672c\u5730\u76f8\u540c\uff0c\u5219\u5c06\u8fd9\u7c7b <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u7aef\u6267\u884c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u6b64\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">extensions</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 <span class=\"productname\">PostgreSQL</span> \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"literal\">extensions</code> \u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fetch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">batch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u4e2d\u5e94\u63d2\u5165\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">1</code>\u3002</p>\n<p lang=\"zh\">postgres_fdw \u6bcf\u6b21\u5b9e\u9645\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u4e0e\u6307\u5b9a\u7684 batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u5355\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7aef\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u91cf\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570 * batch_size \u8d85\u8fc7\u6b64\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u9519\u8bef\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u4e5f\u9002\u7528\u4e8e\u5411\u5916\u90e8\u8868\u590d\u5236\u6570\u636e\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u5b9e\u9645\u4e00\u6b21\u590d\u5236\u7684\u884c\u6570\u4f1a\u4ee5\u4e0e\u63d2\u5165\u573a\u666f\u7c7b\u4f3c\u7684\u65b9\u5f0f\u786e\u5b9a\uff0c\u4f46\u7531\u4e8e <code class=\"command\">COPY</code> \u547d\u4ee4\u7684\u5b9e\u73b0\u9650\u5236\uff0c\u6700\u591a\u53ea\u80fd\u4e3a 1000 \u884c\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-ASYNCHRONOUS-EXECUTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.36.1.5.\u00a0\u5f02\u6b65\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c <code class=\"structname\">Append</code> \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">async_capable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n<p lang=\"zh\">\u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c<code class=\"filename\">postgres_fdw</code> \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f <code class=\"structname\">Append</code> \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-TRANSACTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.36.1.6.\u00a0\u4e8b\u52a1\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0c\u5728 <code class=\"filename\">postgres_fdw</code> \u4e2d\uff0c\u4e8b\u52a1\u662f\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u6765\u7ba1\u7406\u7684\uff0c\u5b50\u4e8b\u52a1\u5219\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u6765\u7ba1\u7406\u3002\u5f53\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e5f\u4f1a\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u53ef\u4ee5\u6539\u5584\u6027\u80fd\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">parallel_commit</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">parallel_abort</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u4e2d\u6b62\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u4e2d\u6b62\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5982\u679c\u542f\u7528\u4e86\u8fd9\u4e9b\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002</p>\n<p lang=\"zh\">\u542f\u7528\u8fd9\u4e9b\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-UPDATABILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.36.1.7.\u00a0\u53ef\u66f4\u65b0\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u66f4\u65b0\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">updatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u548c <code class=\"command\">DELETE</code> \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c<code class=\"literal\">information_schema</code> \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-TRUNCATABILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.36.1.8.\u00a0\u53ef\u622a\u65ad\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u622a\u65ad\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">truncatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">TRUNCATE</code> \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-IMPORTING\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.36.1.9.\u00a0\u5bfc\u5165\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/17/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u5bfc\u5165\u5916\u90e8\u8868\u5b9a\u4e49\u3002\u8be5\u547d\u4ee4\u4f1a\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4ee5\u5339\u914d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868\u6216\u89c6\u56fe\u3002\u5982\u679c\u8981\u5bfc\u5165\u7684\u8fdc\u7a0b\u8868\u5217\u4f7f\u7528\u7528\u6237\u5b9a\u4e49\u6570\u636e\u7c7b\u578b\uff0c\u5219\u672c\u5730\u670d\u52a1\u5668\u5fc5\u987b\u5b58\u5728\u540c\u540d\u4e14\u517c\u5bb9\u7684\u7c7b\u578b\u3002</p>\n<p lang=\"zh\">\u53ef\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\uff08\u5728 <code class=\"command\">IMPORT FOREIGN SCHEMA</code> \u547d\u4ee4\u4e2d\u7ed9\u51fa\uff09\u81ea\u5b9a\u4e49\u5bfc\u5165\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">import_collate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">COLLATE</code> \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a <code class=\"literal\">true</code>\uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 <code class=\"literal\">COLLATE \"default\"</code> \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_default</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">DEFAULT</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b<code class=\"function\">nextval()</code> \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_generated</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">GENERATED</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_not_null</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">NOT NULL</code> \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u9664 <code class=\"literal\">NOT NULL</code> \u4e4b\u5916\u7684\u7ea6\u675f\u6c38\u8fdc\u4e0d\u4f1a\u4ece\u8fdc\u7a0b\u8868\u5bfc\u5165\u3002\u867d\u7136 <span class=\"productname\">PostgreSQL</span> \u786e\u5b9e\u652f\u6301\u5728\u5916\u90e8\u8868\u4e0a\u5b9a\u4e49\u68c0\u67e5\u7ea6\u675f\uff0c\u4f46\u7531\u4e8e\u7ea6\u675f\u8868\u8fbe\u5f0f\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u6c42\u503c\u4e0d\u540c\uff0c\u7cfb\u7edf\u4e0d\u4f1a\u81ea\u52a8\u5bfc\u5165\u5b83\u4eec\u3002\u6b64\u7c7b\u884c\u4e3a\u4e0d\u4e00\u81f4\u7684\u68c0\u67e5\u7ea6\u675f\uff0c\u53ef\u80fd\u5bfc\u81f4\u67e5\u8be2\u4f18\u5316\u4e2d\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5e0c\u671b\u5bfc\u5165\u68c0\u67e5\u7ea6\u675f\uff0c\u5fc5\u987b\u624b\u5de5\u5b8c\u6210\uff0c\u5e76\u5e94\u4ed4\u7ec6\u6838\u5b9e\u6bcf\u4e00\u4e2a\u7ea6\u675f\u7684\u8bed\u4e49\u3002\u6709\u5173\u5916\u90e8\u8868\u4e0a\u68c0\u67e5\u7ea6\u675f\u5904\u7406\u65b9\u5f0f\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/17/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u3002</p>\n<p lang=\"zh\">\u4f5c\u4e3a\u5176\u4ed6\u8868\u5206\u533a\u7684\u8868\u6216\u5916\u90e8\u8868\uff0c\u4ec5\u5728\u5b83\u4eec\u88ab\u660e\u786e\u5199\u5165 <code class=\"literal\">LIMIT TO</code> \u5b50\u53e5\u65f6\u624d\u4f1a\u5bfc\u5165\u3002\u5426\u5219\uff0c\u5b83\u4eec\u4f1a\u88ab\u81ea\u52a8\u6392\u9664\u5728<a class=\"xref\" href=\"/docs/17/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u4e4b\u5916\u3002\u7531\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u901a\u8fc7\u4f5c\u4e3a\u5206\u533a\u5c42\u6b21\u6839\u7684\u5206\u533a\u8868\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ea\u5bfc\u5165\u5206\u533a\u8868\u5373\u53ef\u8bbf\u95ee\u5168\u90e8\u6570\u636e\uff0c\u800c\u65e0\u9700\u521b\u5efa\u989d\u5916\u5bf9\u8c61\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-CONNECTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.36.1.10.\u00a0\u8fde\u63a5\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u672c\u5730\u4f1a\u8bdd\u4e2d\u4fdd\u6301\u6253\u5f00\uff0c\u4ee5\u4fbf\u91cd\u590d\u4f7f\u7528\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">keep_connections</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">on</code>\u3002\u5982\u679c\u8bbe\u7f6e\u4e3a <code class=\"literal\">off</code>\uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-FUNCTIONS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/postgres-fdw.html#POSTGRES-FDW-FUNCTIONS\">F.36.2. \u51fd\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_get_connections(OUT server_name text, OUT valid boolean) returns setof record</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u8fd4\u56de<code class=\"filename\">postgres_fdw</code>\u4ece\u672c\u5730\u4f1a\u8bdd\u5411\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6240\u6709\u6253\u5f00\u8fde\u63a5\u7684\u5916\u90e8\u670d\u52a1\u5668\u540d\u79f0\u3002\u5b83\u8fd8\u8fd4\u56de\u6bcf\u4e2a\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002\u5982\u679c\u5916\u90e8\u670d\u52a1\u5668\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u88ab\u4f7f\u7528\uff0c\u4f46\u5176\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u88ab\u66f4\u6539\u6216\u5220\u9664\uff0c\u5219\u8fd4\u56de<code class=\"literal\">false</code>\uff08\u6ce8\u610f\uff0c\u5982\u679c\u670d\u52a1\u5668\u88ab\u5220\u9664\uff0c\u65e0\u6548\u8fde\u63a5\u7684\u670d\u52a1\u5668\u540d\u79f0\u5c06\u4e3a<code class=\"literal\">NULL</code>\uff09\uff0c\u7136\u540e\u8fd9\u6837\u7684\u65e0\u6548\u8fde\u63a5\u5c06\u5728\u8be5\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u5173\u95ed\u3002\u5426\u5219\u8fd4\u56de<code class=\"literal\">true</code>\u3002\u5982\u679c\u6ca1\u6709\u6253\u5f00\u7684\u8fde\u63a5\uff0c\u5219\u4e0d\u8fd4\u56de\u4efb\u4f55\u8bb0\u5f55\u3002\u8be5\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT * FROM postgres_fdw_get_connections() ORDER BY 1;\n server_name | valid\n-------------+-------\n loopback1   | t\n loopback2   | f\n</pre>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect(server_name text) returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u8bf7\u6ce8\u610f\uff0c\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\u65f6\uff0c\u5bf9\u540c\u4e00\u670d\u52a1\u5668\u53ef\u80fd\u5b58\u5728\u591a\u4e2a\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u5982\u679c\u627e\u4e0d\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u62a5\u544a\u9519\u8bef\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect('loopback1');\n postgres_fdw_disconnect\n-------------------------\n t\n</pre>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect_all() returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5168\u90e8\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect_all();\n postgres_fdw_disconnect_all\n-----------------------------\n t\n</pre>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CONNECTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/postgres-fdw.html#POSTGRES-FDW-CONNECTION-MANAGEMENT\">F.36.3. \u8fde\u63a5\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u5728\u9996\u6b21\u6267\u884c\u4f7f\u7528\u4e0e\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u5173\u8054\u7684\u5916\u90e8\u8868\u7684\u67e5\u8be2\u65f6\uff0c\u4f1a\u5efa\u7acb\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8be5\u8fde\u63a5\u4f1a\u5728\u540c\u4e00\u4f1a\u8bdd\u4e2d\u4fdd\u7559\u5e76\u4f9b\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u3002\u8fd9\u4e00\u884c\u4e3a\u53ef\u901a\u8fc7\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\u63a7\u5236\u3002\u5982\u679c\u4f7f\u7528\u591a\u4e2a\u7528\u6237\u6807\u8bc6\uff08\u7528\u6237\u6620\u5c04\uff09\u8bbf\u95ee\u8be5\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u4f1a\u4e3a\u6bcf\u4e2a\u7528\u6237\u6620\u5c04\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002</p>\n<p lang=\"zh\">\u5f53\u66f4\u6539\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u7684\u5b9a\u4e49\uff0c\u6216\u5c06\u5176\u5220\u9664\u65f6\uff0c\u76f8\u5173\u8fde\u63a5\u4f1a\u88ab\u5173\u95ed\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c\u5982\u679c\u4efb\u4f55\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u5728\u4f7f\u7528\uff0c\u5219\u4f1a\u4fdd\u7559\u5230\u4e8b\u52a1\u7ed3\u675f\u3002\u5173\u95ed\u7684\u8fde\u63a5\u4f1a\u5728\u540e\u7eed\u4f7f\u7528\u5916\u90e8\u8868\u7684\u67e5\u8be2\u9700\u8981\u5b83\u4eec\u65f6\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\">\u4e00\u65e6\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5b83\u4f1a\u4e00\u76f4\u4fdd\u7559\u5230\u672c\u5730\u4f1a\u8bdd\u6216\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u9000\u51fa\u3002\u8981\u663e\u5f0f\u65ad\u5f00\u8fde\u63a5\uff0c\u53ef\u4ee5\u7981\u7528\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\uff0c\u6216\u4f7f\u7528 <code class=\"function\">postgres_fdw_disconnect</code> \u548c <code class=\"function\">postgres_fdw_disconnect_all</code> \u51fd\u6570\u3002\u4f8b\u5982\uff0c\u8fd9\u4e9b\u51fd\u6570\u53ef\u7528\u4e8e\u5173\u95ed\u4e0d\u518d\u9700\u8981\u7684\u8fde\u63a5\uff0c\u4ece\u800c\u91ca\u653e\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u8fde\u63a5\u8d44\u6e90\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-TRANSACTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/postgres-fdw.html#POSTGRES-FDW-TRANSACTION-MANAGEMENT\">F.36.4. \u4e8b\u52a1\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c<code class=\"filename\">postgres_fdw</code> \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002</p>\n<p lang=\"zh\">\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a <code class=\"literal\">SERIALIZABLE</code> \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code>\uff1b\u5426\u5219\u4f7f\u7528 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code> \u6216 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e <code class=\"literal\">READ COMMITTED</code> \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 <span class=\"productname\">PostgreSQL</span> \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c<code class=\"filename\">postgres_fdw</code> \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">F.36.5. \u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 <code class=\"literal\">extensions</code> \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f <code class=\"literal\">IMMUTABLE</code>\u3002\u5bf9\u4e8e <code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u67e5\u8be2\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 <code class=\"literal\">BEFORE</code> \u6216 <code class=\"literal\">AFTER</code> \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 <code class=\"literal\">CHECK OPTION</code> \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 <code class=\"command\">UPDATE</code> \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001<code class=\"literal\">IMMUTABLE</code> \u64cd\u4f5c\u7b26\u6216 <code class=\"literal\">IMMUTABLE</code> \u51fd\u6570\u3002</p>\n<p lang=\"zh\">\u5f53 <code class=\"filename\">postgres_fdw</code> \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 <code class=\"literal\">JOIN</code> \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">EXPLAIN VERBOSE</code> \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">F.36.6. \u8fdc\u7a0b\u67e5\u8be2\u6267\u884c\u73af\u5883</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728 <code class=\"filename\">postgres_fdw</code> \u6253\u5f00\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u4e2d\uff0c<a class=\"xref\" href=\"/docs/17/runtime-config-client.html#GUC-SEARCH-PATH\">search_path</a>\u53c2\u6570\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u5305\u542b <code class=\"literal\">pg_catalog</code>\uff0c\u8fd9\u6837\u65e0\u9700\u6a21\u5f0f\u9650\u5b9a\u5c31\u53ea\u80fd\u770b\u5230\u5185\u7f6e\u5bf9\u8c61\u3002\u8fd9\u5bf9 <code class=\"filename\">postgres_fdw</code> \u81ea\u8eab\u751f\u6210\u7684\u67e5\u8be2\u4e0d\u662f\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u603b\u662f\u63d0\u4f9b\u8fd9\u79cd\u9650\u5b9a\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bf9\u90a3\u4e9b\u901a\u8fc7\u8fdc\u7a0b\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u6216\u89c4\u5219\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u51fd\u6570\u5e26\u6765\u98ce\u9669\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u89c6\u56fe\uff0c\u5219\u8be5\u89c6\u56fe\u4e2d\u4f7f\u7528\u7684\u4efb\u4f55\u51fd\u6570\u90fd\u4f1a\u5728\u53d7\u9650\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u6267\u884c\u3002\u5efa\u8bae\u5728\u8fd9\u7c7b\u51fd\u6570\u4e2d\u5bf9\u6240\u6709\u540d\u79f0\u90fd\u5199\u6210\u5e26\u6a21\u5f0f\u9650\u5b9a\u7684\u5f62\u5f0f\uff0c\u6216\u8005\u4e3a\u8fd9\u7c7b\u51fd\u6570\u9644\u52a0 <code class=\"literal\">SET search_path</code> \u9009\u9879\uff08\u89c1<a class=\"xref\" href=\"/docs/17/sql-createfunction.html\" title=\"CREATE FUNCTION\"><span class=\"refentrytitle\">CREATE FUNCTION</span></a>\uff09\uff0c\u4ee5\u5efa\u7acb\u5176\u9884\u671f\u7684\u641c\u7d22\u8def\u5f84\u73af\u5883\u3002</p>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u8fd8\u4f1a\u4e3a\u8fdc\u7a0b\u4f1a\u8bdd\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/17/runtime-config-client.html#GUC-TIMEZONE\">TimeZone</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">UTC</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/17/runtime-config-client.html#GUC-DATESTYLE\">DateStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">ISO</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/17/runtime-config-client.html#GUC-INTERVALSTYLE\">IntervalStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\u5bf9\u4e8e 9.0 \u53ca\u66f4\u65b0\u7248\u672c\u7684\u8fdc\u7aef\u670d\u52a1\u5668\uff0cextra_float_digits \u8bbe\u4e3a 3\uff1b\u66f4\u65e9\u7248\u672c\u5219\u8bbe\u4e3a 2\u3002</li>\n</ul>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u8bbe\u7f6e\u901a\u5e38\u4e0d\u50cf <code class=\"varname\">search_path</code> \u90a3\u6837\u5bb9\u6613\u51fa\u95ee\u9898\uff0c\u4f46\u5982\u679c\u6709\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684 <code class=\"literal\">SET</code> \u9009\u9879\u5904\u7406\u3002</p>\n<p lang=\"zh\"><span class=\"emphasis\"><em>\u4e0d</em></span>\u5efa\u8bae\u901a\u8fc7\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u7684\u4f1a\u8bdd\u7ea7\u8bbe\u7f6e\u6765\u8986\u76d6\u8fd9\u79cd\u884c\u4e3a\uff1b\u8fd9\u5f88\u53ef\u80fd\u5bfc\u81f4 <code class=\"filename\">postgres_fdw</code> \u5de5\u4f5c\u5f02\u5e38\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/postgres-fdw.html#POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">F.36.7. \u8de8\u7248\u672c\u517c\u5bb9\u6027</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5b83\u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-WAIT-EVENTS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/postgres-fdw.html#POSTGRES-FDW-WAIT-EVENTS\">F.36.8. \u7b49\u5f85\u4e8b\u4ef6</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u5728\u7b49\u5f85\u4e8b\u4ef6\u7c7b\u578b <code class=\"literal\">Extension</code> \u4e0b\u62a5\u544a\u4ee5\u4e0b\u7b49\u5f85\u4e8b\u4ef6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwCleanupResult</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u4e8b\u52a1\u4e2d\u6b62\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwConnect</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwGetResult</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u63a5\u6536\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u67e5\u8be2\u7ed3\u679c\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CONFIGURATION-PARAMETERS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/postgres-fdw.html#POSTGRES-FDW-CONFIGURATION-PARAMETERS\">F.36.9. \u914d\u7f6e\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt id=\"GUC-PGFDW-APPLICATION-NAME\"><span class=\"term\"><code class=\"varname\">postgres_fdw.application_name</code> (<code class=\"type\">string</code>) </span> </dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a\u7528\u4e8e<a class=\"xref\" href=\"/docs/17/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u914d\u7f6e\u53c2\u6570\u7684\u503c\uff0c\u8be5\u503c\u4f1a\u5728 <code class=\"filename\">postgres_fdw</code> \u5efa\u7acb\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u65f6\u4f7f\u7528\u3002\u8fd9\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u5bf9\u8c61\u7684 <code class=\"varname\">application_name</code> \u9009\u9879\u3002\u8bf7\u6ce8\u610f\uff0c\u4fee\u6539\u6b64\u53c2\u6570\u4e0d\u4f1a\u5f71\u54cd\u4efb\u4f55\u73b0\u6709\u8fde\u63a5\uff0c\u9664\u975e\u8fd9\u4e9b\u8fde\u63a5\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\"><code class=\"varname\">postgres_fdw.application_name</code> \u53ef\u4ee5\u662f\u4efb\u610f\u957f\u5ea6\u7684\u4efb\u610f\u5b57\u7b26\u4e32\uff0c\u751a\u81f3\u53ef\u4ee5\u5305\u542b\u975e ASCII \u5b57\u7b26\u3002\u4e0d\u8fc7\uff0c\u5f53\u5b83\u88ab\u4f20\u9012\u5e76\u4f5c\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u4e2d\u7684 <code class=\"varname\">application_name</code> \u4f7f\u7528\u65f6\uff0c\u8bf7\u6ce8\u610f\u5b83\u4f1a\u88ab\u622a\u65ad\u5230\u5c11\u4e8e <code class=\"symbol\">NAMEDATALEN</code> \u4e2a\u5b57\u7b26\u3002\u9664\u53ef\u6253\u5370 ASCII \u5b57\u7b26\u4ee5\u5916\u7684\u6240\u6709\u5b57\u7b26\u90fd\u4f1a\u88ab\u66ff\u6362\u4e3a<a class=\"link\" href=\"/docs/17/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE\" title=\"4.1.2.2.\u00a0C\u98ce\u683c\u8f6c\u4e49\u7684\u5b57\u7b26\u4e32\u5e38\u91cf\">C \u98ce\u683c\u7684\u5341\u516d\u8fdb\u5236\u8f6c\u4e49</a>\u3002\u6709\u5173\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/17/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u3002</p>\n<p lang=\"zh\"><code class=\"literal\">%</code> \u5b57\u7b26\u8868\u793a<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u7684\u5f00\u59cb\uff0c\u5e76\u4f1a\u6309\u4e0b\u8ff0\u65b9\u5f0f\u66ff\u6362\u4e3a\u72b6\u6001\u4fe1\u606f\u3002\u672a\u8bc6\u522b\u7684\u8f6c\u4e49\u4f1a\u88ab\u5ffd\u7565\u3002\u5176\u4ed6\u5b57\u7b26\u4f1a\u539f\u6837\u590d\u5236\u5230\u5e94\u7528\u540d\u4e2d\u3002\u8bf7\u6ce8\u610f\uff0c\u4e0d\u5141\u8bb8\u5728 <code class=\"literal\">%</code> \u4e0e\u9009\u9879\u5b57\u6bcd\u4e4b\u95f4\u6307\u5b9a\u6b63\u8d1f\u53f7\u6216\u6570\u5b57\u5b57\u9762\u91cf\u6765\u8fdb\u884c\u5bf9\u9f50\u548c\u586b\u5145\u3002</p>\n<div class=\"informaltable\">\n<table class=\"informaltable\">\n<thead>\n<tr>\n<th lang=\"zh\">\u8f6c\u4e49\u5e8f\u5217</th>\n<th lang=\"zh\">\u6548\u679c</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"literal\">%a</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u5e94\u7528\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%c</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u4f1a\u8bdd ID\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/17/runtime-config-logging.html#GUC-LOG-LINE-PREFIX\">log_line_prefix</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%C</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u96c6\u7c07\u540d\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/17/runtime-config-logging.html#GUC-CLUSTER-NAME\">cluster_name</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%u</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u7528\u6237\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%d</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u5e93\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%p</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u540e\u7aef\u7684\u8fdb\u7a0b ID</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%%</code></td>\n<td lang=\"zh\">\u5b57\u9762\u5b57\u7b26 %</td>\n</tr>\n</tbody>\n</table>\n</div>\n<p lang=\"zh\">\u4f8b\u5982\uff0c\u5047\u8bbe\u7528\u6237 local_user \u4ece\u6570\u636e\u5e93 local_db \u4ee5 foreign_user \u8eab\u4efd\u8fde\u63a5\u5230 foreign_db\uff0c\u5219\u8bbe\u7f6e 'db=%d, user=%u' \u4f1a\u66ff\u6362\u4e3a 'db=local_db, user=local_user'\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-EXAMPLES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/postgres-fdw.html#POSTGRES-FDW-EXAMPLES\">F.36.10. \u793a\u4f8b</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4e0b\u9762\u662f\u4f7f\u7528 <code class=\"literal\">postgres_fdw</code> \u521b\u5efa\u5916\u90e8\u8868\u7684\u4e00\u4e2a\u793a\u4f8b\u3002\u9996\u5148\u5b89\u88c5\u6269\u5c55\uff1a</p>\n<pre class=\"programlisting\">CREATE EXTENSION postgres_fdw;\n</pre>\n<p lang=\"zh\">\u7136\u540e\u4f7f\u7528<a class=\"xref\" href=\"/docs/17/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8fde\u63a5\u5230\u4e00\u53f0 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\uff0c\u5b83\u8fd0\u884c\u5728\u4e3b\u673a <code class=\"literal\">192.83.123.89</code> \u4e0a\u5e76\u76d1\u542c <code class=\"literal\">5432</code> \u7aef\u53e3\u3002\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"literal\">foreign_db</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER foreign_server\n        FOREIGN DATA WRAPPER postgres_fdw\n        OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');\n</pre>\n<p lang=\"zh\">\u8fd8\u9700\u8981\u7528<a class=\"xref\" href=\"/docs/17/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u5b9a\u4e49\u4e00\u4e2a\u7528\u6237\u6620\u5c04\uff0c\u4ee5\u6807\u8bc6\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u54ea\u4e2a\u89d2\u8272\uff1a</p>\n<pre class=\"programlisting\">CREATE USER MAPPING FOR local_user\n        SERVER foreign_server\n        OPTIONS (user 'foreign_user', password 'password');\n</pre>\n<p lang=\"zh\">\u73b0\u5728\u5c31\u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/17/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u521b\u5efa\u5916\u90e8\u8868\u4e86\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"structname\">some_schema.some_table</code> \u7684\u8868\u3002\u5b83\u5728\u672c\u5730\u7684\u540d\u79f0\u5c06\u662f <code class=\"structname\">foreign_table</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE FOREIGN TABLE foreign_table (\n        id integer NOT NULL,\n        data text\n)\n        SERVER foreign_server\n        OPTIONS (schema_name 'some_schema', table_name 'some_table');\n</pre>\n<p lang=\"zh\">\u5728 <code class=\"command\">CREATE FOREIGN TABLE</code> \u4e2d\u58f0\u660e\u7684\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u5176\u4ed6\u5c5e\u6027\uff0c\u5fc5\u987b\u4e0e\u5b9e\u9645\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u5217\u540d\u4e5f\u5fc5\u987b\u5339\u914d\uff0c\u9664\u975e\u4e3a\u5404\u4e2a\u5217\u9644\u52a0 <code class=\"literal\">column_name</code> \u9009\u9879\u6765\u6307\u660e\u5b83\u4eec\u5728\u8fdc\u7a0b\u8868\u4e2d\u7684\u540d\u79f0\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u76f8\u6bd4\u624b\u5de5\u6784\u9020\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4f7f\u7528 <a class=\"link\" href=\"/docs/17/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><code class=\"command\">IMPORT FOREIGN SCHEMA</code></a> \u66f4\u53ef\u53d6\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-AUTHOR\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/17/postgres-fdw.html#POSTGRES-FDW-AUTHOR\">F.36.11. \u4f5c\u8005</a></span></h3>\n</div>\n</div>\n</div>\n<p>Shigeru Hanada <code class=\"email\">&lt;<a class=\"email\" href=\"mailto:shigeru.hanada@gmail.com\">shigeru.hanada@gmail.com</a>&gt;</code></p>\n</div>\n</div>", "manual_path": "/docs/17/postgres-fdw.html", "localization": {"status": "complete", "sources": [{"url": "/docs/17/postgres-fdw.html", "method": "same-major semantic node", "sha256": "356dd393d4152daf6db0830efa3ecb8dbb7e37b3fe7f1d97b55cb342cb0af84e", "language": "zh", "matched_nodes": ["#POSTGRES-FDW/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[10]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/div[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[4]", "#POSTGRES-FDW/div[12]/div[1]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/p[3]", "#POSTGRES-FDW/div[12]/div[1]/p[4]", "#POSTGRES-FDW/div[12]/div[1]/p[5]", "#POSTGRES-FDW/div[12]/div[1]/p[7]", "#POSTGRES-FDW/div[12]/div[2]/div[0]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[2]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/div[0]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[3]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/p[3]", "#POSTGRES-FDW/div[12]/div[3]/p[4]", "#POSTGRES-FDW/div[12]/div[4]/div[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[2]", "#POSTGRES-FDW/div[12]/div[4]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[12]/div[5]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/div[0]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[6]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/p[3]", "#POSTGRES-FDW/div[12]/div[6]/p[4]", "#POSTGRES-FDW/div[12]/div[7]/div[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[7]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/div[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[7]", "#POSTGRES-FDW/div[12]/div[9]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/p[2]", "#POSTGRES-FDW/div[12]/div[9]/p[4]", "#POSTGRES-FDW/div[12]/div[9]/p[5]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[14]/p[1]", "#POSTGRES-FDW/div[14]/p[2]", "#POSTGRES-FDW/div[14]/p[3]", "#POSTGRES-FDW/div[15]/p[1]", "#POSTGRES-FDW/div[15]/p[2]", "#POSTGRES-FDW/div[15]/p[3]", "#POSTGRES-FDW/div[16]/p[1]", "#POSTGRES-FDW/div[16]/p[2]", "#POSTGRES-FDW/div[16]/p[3]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[0]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[1]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[2]", "#POSTGRES-FDW/div[17]/p[1]", "#POSTGRES-FDW/div[17]/p[2]", "#POSTGRES-FDW/div[17]/p[4]", "#POSTGRES-FDW/div[17]/p[5]", "#POSTGRES-FDW/div[19]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[19]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[19]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[19]/p[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[0]", "#POSTGRES-FDW/div[1]/dl[0]/dt[10]", "#POSTGRES-FDW/div[1]/dl[0]/dt[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[4]", "#POSTGRES-FDW/div[1]/dl[0]/dt[5]", "#POSTGRES-FDW/div[1]/dl[0]/dt[6]", "#POSTGRES-FDW/div[1]/dl[0]/dt[7]", "#POSTGRES-FDW/div[1]/dl[0]/dt[8]", "#POSTGRES-FDW/div[1]/dl[0]/dt[9]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[0]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[1]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[2]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[3]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[4]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[5]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[6]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[0]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[21]/p[1]", "#POSTGRES-FDW/div[21]/p[3]", "#POSTGRES-FDW/div[21]/p[5]", "#POSTGRES-FDW/div[21]/p[7]", "#POSTGRES-FDW/div[21]/p[9]", "#POSTGRES-FDW/div[6]/ol[0]/li[0]", "#POSTGRES-FDW/div[6]/ol[0]/li[1]", "#POSTGRES-FDW/div[6]/ol[0]/li[2]", "#POSTGRES-FDW/div[6]/ol[0]/li[3]", "#POSTGRES-FDW/p[10]", "#POSTGRES-FDW/p[11]", "#POSTGRES-FDW/p[3]", "#POSTGRES-FDW/p[4]", "#POSTGRES-FDW/p[5]", "#POSTGRES-FDW/p[7]", "#POSTGRES-FDW/p[8]"]}], "language": "zh", "original_text": {"/versions/17/description/0": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/versions/17/facts/0/label": "Interface family", "/versions/17/facts/0/value": "Foreign-data wrapper", "/versions/17/facts/1/label": "Handler or routine", "/versions/17/facts/2/label": "Recorded callbacks", "/versions/17/facts/3/label": "Data source", "/versions/17/facts/3/value": "Remote PostgreSQL servers", "/versions/17/tables/0/title": "Registered interface handlers", "/versions/17/tables/1/title": "Documented options", "/versions/17/related/0/label": "Foreign-data wrapper catalog", "/versions/17/related/1/label": "Existing extension catalogue identity", "/versions/17/related/2/label": "Foreign Scan plan node", "/versions/17/sections/0/title": "Interface and capability boundaries", "/versions/17/sections/1/title": "Asynchronous Execution Options", "/versions/17/sections/2/title": "Transaction Management Options", "/versions/17/sections/3/title": "Transaction Management", "/versions/17/sections/4/title": "Remote Query Optimization", "/versions/17/sections/5/title": "Cross-Version Compatibility", "/versions/17/sections/6/title": "Registered implementation in core source", "/versions/17/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/17/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/17/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/17/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/17/sections/1/paragraphs/0": "postgres_fdw supports asynchronous execution, which runs multiple parts of an Append node concurrently rather than serially to improve performance. This execution can be controlled using the following option:", "/versions/17/sections/2/paragraphs/0": "As described in the Transaction Management section, in postgres_fdw transactions are managed by creating corresponding remote transactions, and subtransactions are managed by creating corresponding remote subtransactions. When multiple remote transactions are involved in the current local transaction, by default postgres_fdw commits or aborts those remote transactions serially when the local transaction is committed or aborted. When multiple remote subtransactions are involved in the current local subtransaction, by default postgres_fdw commits or aborts those remote subtransactions serially when the local subtransaction is committed or aborted. Performance can be improved with the following options:", "/versions/17/sections/2/paragraphs/1": "If multiple foreign servers with these options enabled are involved in a local transaction, multiple remote transactions on those foreign servers are committed or aborted in parallel across those foreign servers when the local transaction is committed or aborted.", "/versions/17/sections/2/paragraphs/2": "When these options are enabled, a foreign server with many remote transactions may see a negative performance impact when the local transaction is committed or aborted.", "/versions/17/sections/3/paragraphs/0": "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints.", "/versions/17/sections/3/paragraphs/1": "The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local transaction uses SERIALIZABLE or REPEATABLE READ isolation level, but it might be surprising for a READ COMMITTED local transaction. A future PostgreSQL release might modify these rules.", "/versions/17/sections/3/paragraphs/2": "Note that it is currently not supported by postgres_fdw to prepare the remote transaction for two-phase commit.", "/versions/17/sections/4/paragraphs/0": "postgres_fdw attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by sending query WHERE clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, WHERE clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an extension that's listed in the foreign server's extensions option. Operators and functions in such clauses must be IMMUTABLE as well. For an UPDATE or DELETE query, postgres_fdw attempts to optimize the query execution by sending the whole query to the remote server if there are no query WHERE clauses that cannot be sent to the remote server, no local joins for the query, no row-level local BEFORE or AFTER triggers or stored generated columns on the target table, and no CHECK OPTION constraints from parent views. In UPDATE , expressions to assign to target columns must use only built-in data types, IMMUTABLE operators, or IMMUTABLE functions, to reduce the risk of misexecution of the query.", "/versions/17/sections/4/paragraphs/1": "When postgres_fdw encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved are subject to different user mappings. While sending the JOIN clauses, it takes the same precautions as mentioned above for the WHERE clauses.", "/versions/17/sections/4/paragraphs/2": "The query that is actually sent to the remote server for execution can be examined using EXPLAIN VERBOSE .", "/versions/17/sections/5/paragraphs/0": "postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1. A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent to it for execution, resulting in \u201c function does not exist \u201d or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table reference in a sub- SELECT with OFFSET 0 as an optimization fence, and placing the problematic function or operator outside the sub- SELECT .", "/versions/17/tables/0/rows/0/feature": "Scan rows", "/versions/17/tables/0/rows/5/feature": "Join path pushdown", "/versions/17/tables/0/rows/6/feature": "Upper paths, including aggregation", "/versions/17/tables/0/rows/7/feature": "Batch insert", "/versions/17/tables/0/rows/8/feature": "Asynchronous append execution", "/versions/17/tables/0/rows/9/feature": "Import schema", "/versions/17/tables/0/columns/0/label": "Interface operation", "/versions/17/tables/0/columns/1/label": "Source observation", "/versions/17/tables/0/columns/2/label": "Callback", "/versions/17/tables/0/columns/3/label": "Implementation", "/versions/17/tables/1/columns/0/label": "Option", "/versions/17/tables/1/columns/1/label": "Same-version definition", "/versions/17/tables/1/rows/0/definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used.", "/versions/17/tables/1/rows/1/definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used.", "/versions/17/tables/1/rows/2/definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used.", "/versions/17/tables/1/rows/3/definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false .", "/versions/17/tables/1/rows/4/definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 .", "/versions/17/tables/1/rows/5/definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.2 .", "/versions/17/tables/1/rows/6/definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table samples the data on the remote side, or reads and transfers all data and performs the sampling locally. The supported values are off , random , system , bernoulli and auto . off disables remote sampling, so all data are transferred and sampled locally. random performs remote sampling using the random() function to choose returned rows, while system and bernoulli rely on the built-in TABLESAMPLE methods of those names. random works on all remote server versions, while TABLESAMPLE is supported only since 9.5. auto (the default) picks the recommended sampling method automatically; currently it means either bernoulli or random depending on the remote server version.", "/versions/17/tables/1/rows/7/definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.", "/versions/17/tables/1/rows/8/definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 .", "/versions/17/tables/1/rows/9/definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error. This option also applies when copying into foreign tables. In that case the actual number of rows postgres_fdw copies at once is determined in a similar way to the insert case, but it is limited to at most 1000 due to implementation restrictions of the COPY command.", "/versions/17/tables/1/rows/10/definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release.", "/versions/17/tables/1/rows/11/definition": "This option controls whether postgres_fdw commits, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false .", "/versions/17/tables/1/rows/12/definition": "This option controls whether postgres_fdw aborts, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is aborted. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false .", "/versions/17/tables/1/rows/13/definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server.", "/versions/17/tables/1/rows/14/definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server.", "/versions/17/tables/1/rows/15/definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different.", "/versions/17/tables/1/rows/16/definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally.", "/versions/17/tables/1/rows/17/definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally.", "/versions/17/tables/1/rows/18/definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true .", "/versions/17/tables/1/rows/19/definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "c34a26c6fbc4b1cc28aea3405b7b21ffd6c82e914f44eca6d2437931d1852e02"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "schema_name", "definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used."}, {"name": "table_name", "definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used."}, {"name": "column_name", "definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used."}, {"name": "use_remote_estimate", "definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false ."}, {"name": "fdw_startup_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 ."}, {"name": "fdw_tuple_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.2 ."}, {"name": "analyze_sampling", "definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table samples the data on the remote side, or reads and transfers all data and performs the sampling locally. The supported values are off , random , system , bernoulli and auto . off disables remote sampling, so all data are transferred and sampled locally. random performs remote sampling using the random() function to choose returned rows, while system and bernoulli rely on the built-in TABLESAMPLE methods of those names. random works on all remote server versions, while TABLESAMPLE is supported only since 9.5. auto (the default) picks the recommended sampling method automatically; currently it means either bernoulli or random depending on the remote server version."}, {"name": "extensions", "definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly."}, {"name": "fetch_size", "definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 ."}, {"name": "batch_size", "definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error. This option also applies when copying into foreign tables. In that case the actual number of rows postgres_fdw copies at once is determined in a similar way to the insert case, but it is limited to at most 1000 due to implementation restrictions of the COPY command."}, {"name": "async_capable", "definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release."}, {"name": "parallel_commit", "definition": "This option controls whether postgres_fdw commits, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false ."}, {"name": "parallel_abort", "definition": "This option controls whether postgres_fdw aborts, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is aborted. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false ."}, {"name": "updatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server."}, {"name": "truncatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server."}, {"name": "import_collate", "definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different."}, {"name": "import_default", "definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally."}, {"name": "import_generated", "definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally."}, {"name": "import_not_null", "definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true ."}, {"name": "keep_connections", "definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction."}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "source_options": [], "protocol_versions": {}}, "comparison_hash": "25282118ab4029d89b6fa7885ee7b60180d7a2cba8b128942ae84bc3aaadc228", "manual_language": "zh", "runtime_verified": false}, "18": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "postgres_fdw_handler"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "36"}, {"label": "\u6570\u636e\u6e90", "value": "\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u626b\u63cf\u6570\u636e\u884c", "callback": "IterateForeignScan", "implementation": "postgresIterateForeignScan"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "INSERT", "callback": "ExecForeignInsert", "implementation": "postgresExecForeignInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "UPDATE", "callback": "ExecForeignUpdate", "implementation": "postgresExecForeignUpdate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "DELETE", "callback": "ExecForeignDelete", "implementation": "postgresExecForeignDelete"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "ExecForeignTruncate", "implementation": "postgresExecForeignTruncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u8fde\u63a5\u8def\u5f84\u4e0b\u63a8", "callback": "GetForeignJoinPaths", "implementation": "postgresGetForeignJoinPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u4e0a\u5c42\u8def\u5f84\uff0c\u5305\u62ec\u805a\u5408", "callback": "GetForeignUpperPaths", "implementation": "postgresGetForeignUpperPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6279\u91cf\u63d2\u5165", "callback": "ExecForeignBatchInsert", "implementation": "postgresExecForeignBatchInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f02\u6b65\u8ffd\u52a0\u6267\u884c", "callback": "ForeignAsyncRequest", "implementation": "postgresForeignAsyncRequest"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5bfc\u5165\u6a21\u5f0f", "callback": "ImportForeignSchema", "implementation": "postgresImportForeignSchema"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "schema_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002"}, {"name": "table_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "column_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "use_remote_estimate", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 postgres_fdw \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b EXPLAIN \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "fdw_startup_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "fdw_tuple_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a 0.2 \u3002"}, {"name": "analyze_sampling", "definition": "\u6b64\u9009\u9879\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u51b3\u5b9a\u5916\u90e8\u8868 ANALYZE \u662f\u5728\u8fdc\u7a0b\u91c7\u6837\uff0c\u8fd8\u662f\u8bfb\u53d6\u5e76\u4f20\u8f93\u5168\u90e8\u6570\u636e\u540e\u5728\u672c\u5730\u91c7\u6837\u3002\u652f\u6301 off\u3001random\u3001system\u3001bernoulli \u548c auto\u3002off \u7981\u7528\u8fdc\u7a0b\u91c7\u6837\uff0c\u5168\u90e8\u6570\u636e\u4f1a\u4f20\u5230\u672c\u5730\u540e\u91c7\u6837\u3002random \u4f7f\u7528 random() \u51fd\u6570\u5728\u8fdc\u7a0b\u9009\u62e9\u8fd4\u56de\u884c\uff1bsystem \u548c bernoulli \u4f7f\u7528\u540c\u540d\u5185\u7f6e TABLESAMPLE \u65b9\u6cd5\u3002random \u9002\u7528\u4e8e\u6240\u6709\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\uff0cTABLESAMPLE \u4ec5\u4ece 9.5 \u8d77\u652f\u6301\u3002\u9ed8\u8ba4\u503c auto \u81ea\u52a8\u9009\u62e9\u63a8\u8350\u65b9\u6cd5\uff0c\u76ee\u524d\u6839\u636e\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\u9009\u62e9 bernoulli \u6216 random\u3002"}, {"name": "extensions", "definition": "\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 PostgreSQL \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002 \u4f7f\u7528 extensions \u9009\u9879\u65f6\uff0c \u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002"}, {"name": "fetch_size", "definition": "\u8be5\u9009\u9879\u6307\u5b9a postgres_fdw \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "batch_size", "definition": "\u6b64\u9009\u9879\u6307\u5b9a postgres_fdw \u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u5e94\u63d2\u5165\u7684\u884c\u6570\uff0c\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u8868\u7ea7\u8bbe\u7f6e\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u8bbe\u7f6e\uff0c\u9ed8\u8ba4\u503c\u4e3a 1\u3002\u5b9e\u9645\u4e00\u6b21\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u548c batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u4e00\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570\u4e58\u4ee5 batch_size \u8d85\u51fa\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u62a5\u9519\u3002\u6b64\u9009\u9879\u4e5f\u9002\u7528\u4e8e\u5411\u5916\u90e8\u8868\u6267\u884c COPY\uff0c\u5b9e\u9645\u4e00\u6b21\u590d\u5236\u7684\u884c\u6570\u6309\u7c7b\u4f3c\u65b9\u5f0f\u786e\u5b9a\uff0c\u4f46\u53d7 COPY \u5b9e\u73b0\u9650\u5236\uff0c\u6700\u591a\u4e3a 1000 \u884c\u3002"}, {"name": "async_capable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002 \u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c postgres_fdw \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002 \u5373\u4f7f Append \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 postgres_fdw \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002"}, {"name": "parallel_commit", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "parallel_abort", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u4e2d\u6b62\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u4e2d\u6b62\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "updatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 INSERT \u3001 UPDATE \u548c DELETE \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c information_schema \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 postgres_fdw \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002"}, {"name": "truncatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 TRUNCATE \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002"}, {"name": "import_collate", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 COLLATE \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002 \u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a true \uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 COLLATE \"default\" \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002"}, {"name": "import_default", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 DEFAULT \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b nextval() \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_generated", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 GENERATED \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_not_null", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 NOT NULL \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002"}, {"name": "keep_connections", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a on \u3002\u5982\u679c\u8bbe\u7f6e\u4e3a off \uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002"}, {"name": "use_scram_passthrough", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u5728\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\u65f6\u662f\u5426\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u3002\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u6307\u5b9a\u3002\u7528\u6237\u6620\u5c04\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5916\u90e8\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\u3002\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u65f6\uff0c postgres_fdw \u4f7f\u7528\u7ecf SCRAM Hash \u5904\u7406\u7684\u51ed\u636e\uff0c\u800c\u4e0d\u662f\u660e\u6587\u7528\u6237\u5bc6\u7801\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5728 PostgreSQL \u7cfb\u7edf\u76ee\u5f55\u4e2d\u5b58\u50a8\u660e\u6587\u7528\u6237\u5bc6\u7801\u3002 \u8981\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\uff1a \u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8bf7\u6c42 scram-sha-256 \u8ba4\u8bc1\u65b9\u6cd5\uff1b\u5426\u5219\u8fde\u63a5\u5c06\u5931\u8d25\u3002 \u8fdc\u7a0b\u670d\u52a1\u5668\u53ef\u4ee5\u662f\u4efb\u4f55\u652f\u6301 SCRAM \u7684 PostgreSQL \u7248\u672c\u3002\u5bf9 use_scram_passthrough \u7684\u652f\u6301\u53ea\u8981\u6c42\u5ba2\u6237\u7aef\u4e00\u4fa7\uff08FDW \u4fa7\uff09\u5177\u5907\u3002 \u7528\u6237\u6620\u5c04\u5bc6\u7801\u4e0d\u4f1a\u88ab\u4f7f\u7528\u3002 \u8fd0\u884c postgres_fdw \u7684\u670d\u52a1\u5668\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u5fc5\u987b\u9488\u5bf9\u7528\u4e8e\u5728 postgres_fdw \u4e0a\u8ba4\u8bc1\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8be5\u7528\u6237\uff0c\u62e5\u6709\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\uff08\u52a0\u5bc6\u5bc6\u7801\uff09\uff08\u76d0\u503c\u548c\u8fed\u4ee3\u6b21\u6570\u90fd\u5fc5\u987b\u76f8\u540c\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5bc6\u7801\u76f8\u540c\uff09\u3002 \u56e0\u800c\uff0c\u5982\u679c\u8981\u5efa\u7acb\u5230\u591a\u4e2a\u4e3b\u673a\u7684 FDW \u8fde\u63a5\uff0c\u4f8b\u5982\u7528\u4e8e\u5206\u533a\u5916\u90e8\u8868\u6216\u5206\u7247\uff0c\u5219\u6240\u6709\u4e3b\u673a\u90fd\u5fc5\u987b\u4e3a\u76f8\u5173\u7528\u6237\u4fdd\u5b58\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\u3002 \u53d1\u8d77\u5bf9\u5916 FDW \u8fde\u63a5\u7684 PostgreSQL \u5b9e\u4f8b\u4e2d\uff0c\u5f53\u524d\u4f1a\u8bdd\u7684\u4f20\u5165\u5ba2\u6237\u7aef\u8fde\u63a5\u4e5f\u5fc5\u987b\u4f7f\u7528 SCRAM \u8ba4\u8bc1\u3002\uff08\u56e0\u6b64\u79f0\u4e3a \u201c \u900f\u4f20 \u201d \uff1aSCRAM \u5fc5\u987b\u5728\u8fdb\u5165\u548c\u79bb\u5f00\u65f6\u90fd\u88ab\u4f7f\u7528\u3002\uff09\u8fd9\u662f SCRAM \u534f\u8bae\u7684\u6280\u672f\u8981\u6c42\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}], "related": [{"url": "/wiki/catalog/pg_foreign_data_wrapper/?v=18", "label": "Foreign-data wrapper \u7cfb\u7edf\u76ee\u5f55"}, {"url": "/e/postgres_fdw/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/plan/foreign-scan/?v=18", "label": "Foreign Scan \u8ba1\u5212\u8282\u70b9"}], "release": {"ref": "PostgreSQL 18.6 source archive", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f", "source_url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/18/postgres-fdw.html", "path": "postgres-fdw.html", "label": "PostgreSQL 18 English manual", "sha256": "a7833ebac1e9581de25695443eaec67d16d32ef33107783cdfb940fefa5f66a3", "language": "en", "original_url": "/docs/18/postgres-fdw.html"}, {"url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "line": 557, "path": "contrib/postgres_fdw/postgres_fdw.c", "label": "contrib/postgres_fdw/postgres_fdw.c:557", "sha256": "5f61f89fc1f9d67a204c47fd993db575b2d619449e5238b536b9fb1877037db6", "archive_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u5f02\u6b65\u6267\u884c\u9009\u9879", "paragraphs": ["postgres_fdw \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c Append \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406\u9009\u9879", "paragraphs": ["\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0c\u5728 postgres_fdw \u4e2d\uff0c\u4e8b\u52a1\u662f\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u6765\u7ba1\u7406\u7684\uff0c\u5b50\u4e8b\u52a1\u5219\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u6765\u7ba1\u7406\u3002\u5f53\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c postgres_fdw \u4f1a\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c postgres_fdw \u4e5f\u4f1a\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u53ef\u4ee5\u6539\u5584\u6027\u80fd\uff1a", "\u5982\u679c\u542f\u7528\u4e86\u8fd9\u4e9b\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002", "\u542f\u7528\u8fd9\u4e9b\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406", "paragraphs": ["\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c postgres_fdw \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002", "\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a SERIALIZABLE \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \uff1b\u5426\u5219\u4f7f\u7528 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 SERIALIZABLE \u6216 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e READ COMMITTED \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 PostgreSQL \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002", "\u8bf7\u6ce8\u610f\uff0c postgres_fdw \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002"]}, {"title": "\u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316", "paragraphs": ["postgres_fdw \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 WHERE \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 WHERE \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 extensions \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f IMMUTABLE \u3002\u5bf9\u4e8e UPDATE \u6216 DELETE \u67e5\u8be2\uff0c postgres_fdw \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 WHERE \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 BEFORE \u6216 AFTER \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 CHECK OPTION \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 UPDATE \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001 IMMUTABLE \u64cd\u4f5c\u7b26\u6216 IMMUTABLE \u51fd\u6570\u3002", "\u5f53 postgres_fdw \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 JOIN \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 WHERE \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002", "\u53ef\u4ee5\u4f7f\u7528 EXPLAIN VERBOSE \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002"]}, {"title": "\u8de8\u7248\u672c\u517c\u5bb9\u6027", "paragraphs": ["postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002", "\u4e00\u4e2a\u9650\u5236\u662f\uff0cpostgres_fdw \u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u6240\u7528\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u901a\u8fc7\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\uff0c\u4ee5\u6b64\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002", "\u53e6\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5728\u5916\u90e8\u8868\u4e0a\u6267\u884c INSERT \u8bed\u53e5\u5e76\u5e26\u6709 ON CONFLICT DO NOTHING \u5b50\u53e5\u65f6\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8fd0\u884c PostgreSQL 9.5 \u6216\u66f4\u9ad8\u7248\u672c\uff0c\u56e0\u4e3a\u66f4\u65e9\u7248\u672c\u4e0d\u652f\u6301\u6b64\u7279\u6027\u3002"]}, {"code": "{\n\tFdwRoutine *routine = makeNode(FdwRoutine);\n\n\t/* Functions for scanning foreign tables */\n\troutine->GetForeignRelSize = postgresGetForeignRelSize;\n\troutine->GetForeignPaths = postgresGetForeignPaths;\n\troutine->GetForeignPlan = postgresGetForeignPlan;\n\troutine->BeginForeignScan = postgresBeginForeignScan;\n\troutine->IterateForeignScan = postgresIterateForeignScan;\n\troutine->ReScanForeignScan = postgresReScanForeignScan;\n\troutine->EndForeignScan = postgresEndForeignScan;\n\n\t/* Functions for updating foreign tables */\n\troutine->AddForeignUpdateTargets = postgresAddForeignUpdateTargets;\n\troutine->PlanForeignModify = postgresPlanForeignModify;\n\troutine->BeginForeignModify = postgresBeginForeignModify;\n\troutine->ExecForeignInsert = postgresExecForeignInsert;\n\troutine->ExecForeignBatchInsert = postgresExecForeignBatchInsert;\n\troutine->GetForeignModifyBatchSize = postgresGetForeignModifyBatchSize;\n\troutine->ExecForeignUpdate = postgresExecForeignUpdate;\n\troutine->ExecForeignDelete = postgresExecForeignDelete;\n\troutine->EndForeignModify = postgresEndForeignModify;\n\troutine->BeginForeignInsert = postgresBeginForeignInsert;\n\troutine->EndForeignInsert = postgresEndForeignInsert;\n\troutine->IsForeignRelUpdatable = postgresIsForeignRelUpdatable;\n\troutine->PlanDirectModify = postgresPlanDirectModify;\n\troutine->BeginDirectModify = postgresBeginDirectModify;\n\troutine->IterateDirectModify = postgresIterateDirectModify;\n\troutine->EndDirectModify = postgresEndDirectModify;\n\n\t/* Function for EvalPlanQual rechecks */\n\troutine->RecheckForeignScan = postgresRecheckForeignScan;\n\t/* Support functions for EXPLAIN */\n\troutine->ExplainForeignScan = postgresExplainForeignScan;\n\troutine->ExplainForeignModify = postgresExplainForeignModify;\n\troutine->ExplainDirectModify = postgresExplainDirectModify;\n\n\t/* Support function for TRUNCATE */\n\troutine->ExecForeignTruncate = postgresExecForeignTruncate;\n\n\t/* Support functions for ANALYZE */\n\troutine->AnalyzeForeignTable = postgresAnalyzeForeignTable;\n\n\t/* Support functions for IMPORT FOREIGN SCHEMA */\n\troutine->ImportForeignSchema = postgresImportForeignSchema;\n\n\t/* Support functions for join push-down */\n\troutine->GetForeignJoinPaths = postgresGetForeignJoinPaths;\n\n\t/* Support functions for upper relation push-down */\n\troutine->GetForeignUpperPaths = postgresGetForeignUpperPaths;\n\n\t/* Support functions for asynchronous execution */\n\troutine->IsForeignPathAsyncCapable = postgresIsForeignPathAsyncCapable;\n\troutine->ForeignAsyncRequest = postgresForeignAsyncRequest;\n\troutine->ForeignAsyncConfigureWait = postgresForeignAsyncConfigureWait;\n\troutine->ForeignAsyncNotify = postgresForeignAsyncNotify;\n\n\tPG_RETURN_POINTER(routine);\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "description": ["\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002"], "manual_html": "<div class=\"sect1\" id=\"POSTGRES-FDW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">F.38.\u00a0postgres_fdw \u2014 \u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u6a21\u5757\u63d0\u4f9b\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668 <code class=\"literal\">postgres_fdw</code>\uff0c\u53ef\u7528\u4e8e\u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u672c\u6a21\u5757\u63d0\u4f9b\u7684\u529f\u80fd\u4e0e\u8f83\u65e7\u7684<a class=\"xref\" href=\"/docs/18/dblink.html\" title=\"F.11.\u00a0dblink \u2014 \u8fde\u63a5\u5230\u5176\u4ed6 PostgreSQL \u6570\u636e\u5e93\">dblink</a>\u6a21\u5757\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u91cd\u53e0\u3002\u4f46 <code class=\"filename\">postgres_fdw</code> \u4e3a\u8bbf\u95ee\u8fdc\u7a0b\u8868\u63d0\u4f9b\u4e86\u66f4\u900f\u660e\u4e14\u7b26\u5408\u6807\u51c6\u7684\u8bed\u6cd5\uff0c\u5e76\u4e14\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u6027\u80fd\u66f4\u597d\u3002</p>\n<p lang=\"zh\">\u8981\u51c6\u5907\u901a\u8fc7 <code class=\"filename\">postgres_fdw</code> \u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee\uff1a</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5b89\u88c5 <code class=\"filename\">postgres_fdw</code> \u6269\u5c55\uff0c\u53ef\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-createextension.html\" title=\"CREATE EXTENSION\"><span class=\"refentrytitle\">CREATE EXTENSION</span></a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u5bf9\u8c61\uff0c\u7528\u6765\u8868\u793a\u6bcf\u4e2a\u8981\u8fde\u63a5\u7684\u8fdc\u7a0b\u6570\u636e\u5e93\u3002\u5c06\u9664 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u4e4b\u5916\u7684\u8fde\u63a5\u4fe1\u606f\u6307\u5b9a\u4e3a\u670d\u52a1\u5668\u5bf9\u8c61\u7684\u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u9700\u8981\u83b7\u51c6\u8bbf\u95ee\u5404\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u7528\u6237\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u521b\u5efa\u7528\u6237\u6620\u5c04\u3002\u5c06\u8981\u4f7f\u7528\u7684\u8fdc\u7a0b\u7528\u6237\u540d\u548c\u5bc6\u7801\u6307\u5b9a\u4e3a\u7528\u6237\u6620\u5c04\u7684 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u8981\u8bbf\u95ee\u7684\u8fdc\u7a0b\u8868\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u6216<a class=\"xref\" href=\"/docs/18/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5916\u90e8\u8868\u7684\u5217\u5fc5\u987b\u4e0e\u88ab\u5f15\u7528\u7684\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u5728\u5916\u90e8\u8868\u5bf9\u8c61\u7684\u9009\u9879\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8fdc\u7a0b\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0e\u8fdc\u7a0b\u8868\u4e0d\u540c\u7684\u8868\u540d\u548c/\u6216\u5217\u540d\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\">\u73b0\u5728\uff0c\u53ea\u9700\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">SELECT</code>\uff0c\u5373\u53ef\u8bbf\u95ee\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u4e2d\u5b58\u50a8\u7684\u6570\u636e\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code>\u3001<code class=\"command\">COPY</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4fee\u6539\u8fdc\u7a0b\u8868\u3002\uff08\u5f53\u7136\uff0c\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\u7684\u8fdc\u7a0b\u7528\u6237\u5fc5\u987b\u62e5\u6709\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u6743\u9650\u3002\uff09</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5728\u8bbf\u95ee\u6216\u4fee\u6539\u8fdc\u7a0b\u8868\u65f6\uff0c<code class=\"literal\">ONLY</code> \u9009\u9879\u5728 <code class=\"command\">SELECT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4e2d\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n<p lang=\"zh\">postgres_fdw \u76ee\u524d\u4e0d\u652f\u6301\u5e26 ON CONFLICT DO UPDATE \u5b50\u53e5\u7684 INSERT\u3002\u4e0d\u8fc7\uff0c\u652f\u6301 ON CONFLICT DO NOTHING\uff0c\u524d\u63d0\u662f\u4e0d\u6307\u5b9a\u552f\u4e00\u7d22\u5f15\u63a8\u65ad\u6761\u4ef6\u3002postgres_fdw \u8fd8\u652f\u6301\u5728\u5206\u533a\u8868\u4e0a\u6267\u884c UPDATE \u6240\u89e6\u53d1\u7684\u884c\u79fb\u52a8\uff0c\u4f46\u76ee\u524d\u4e0d\u652f\u6301\u4ee5\u4e0b\u60c5\u51b5\uff1a\u7528\u4e8e\u63a5\u6536\u79fb\u5165\u884c\u7684\u8fdc\u7aef\u5206\u533a\uff0c\u540c\u65f6\u4e5f\u662f\u540c\u4e00\u547d\u4ee4\u4e2d\u5176\u4ed6\u4f4d\u7f6e\u5c06\u8981\u66f4\u65b0\u7684 UPDATE \u76ee\u6807\u5206\u533a\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5c06\u5916\u90e8\u8868\u7684\u5217\u58f0\u660e\u4e3a\u4e0e\u88ab\u5f15\u7528\u8fdc\u7a0b\u8868\u7684\u5bf9\u5e94\u5217\u5177\u6709\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u5728\u9002\u7528\u65f6\u5177\u6709\u76f8\u540c\u7684\u6392\u5e8f\u89c4\u5219\u3002\u5c3d\u7ba1 <code class=\"filename\">postgres_fdw</code> \u76ee\u524d\u5728\u6309\u9700\u6267\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u9762\u76f8\u5f53\u5bbd\u5bb9\uff0c\u4f46\u5f53\u7c7b\u578b\u6216\u6392\u5e8f\u89c4\u5219\u4e0d\u5339\u914d\u65f6\uff0c\u4ecd\u53ef\u80fd\u51fa\u73b0\u4ee4\u4eba\u610f\u5916\u7684\u8bed\u4e49\u5f02\u5e38\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5bf9\u67e5\u8be2\u6761\u4ef6\u7684\u89e3\u91ca\u53ef\u80fd\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5916\u90e8\u8868\u7684\u58f0\u660e\u53ef\u4ee5\u6bd4\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u5c11\u4e00\u4e9b\u5217\uff0c\u6216\u8005\u4f7f\u7528\u4e0d\u540c\u7684\u5217\u987a\u5e8f\u3002\u4e0e\u8fdc\u7a0b\u8868\u5217\u7684\u5339\u914d\u662f\u6309\u540d\u79f0\u800c\u4e0d\u662f\u6309\u4f4d\u7f6e\u8fdb\u884c\u7684\u3002</p>\n<div class=\"sect2\" id=\"POSTGRES-FDW-OPTIONS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-OPTIONS\">F.38.1. postgres_fdw \u7684 FDW \u9009\u9879</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-CONNECTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.1.\u00a0\u8fde\u63a5\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528 <span class=\"application\">libpq</span> \u5728\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u63a5\u53d7\u7684\u76f8\u540c\u9009\u9879\uff0c\u8be6\u89c1<a class=\"xref\" href=\"/docs/18/libpq-connect.html#LIBPQ-PARAMKEYWORDS\" title=\"32.1.2.\u00a0\u53c2\u6570\u5173\u952e\u8bcd\">\u7b2c\u00a032.1.2\u00a0\u8282</a>\uff1b\u4f46\u4ee5\u4e0b\u9009\u9879\u4e0d\u5141\u8bb8\u4f7f\u7528\uff0c\u6216\u4f1a\u88ab\u7279\u6b8a\u5904\u7406\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">user</code>\u3001<code class=\"literal\">password</code> \u548c <code class=\"literal\">sslpassword</code>\uff08\u8bf7\u6539\u4e3a\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\uff0c\u6216\u4f7f\u7528\u670d\u52a1\u6587\u4ef6\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">client_encoding</code>\uff08\u4f1a\u6839\u636e\u672c\u5730\u670d\u52a1\u5668\u7f16\u7801\u81ea\u52a8\u8bbe\u7f6e\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">application_name</code> \u53ef\u4ee5\u51fa\u73b0\u5728\u8fde\u63a5\u9009\u9879\u548c<a class=\"xref\" href=\"/docs/18/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u4e2d\u7684<span class=\"emphasis\"><em>\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c<code class=\"varname\">postgres_fdw.application_name</code> \u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002\u4e0e <span class=\"application\">libpq</span> \u4e0d\u540c\uff0c<code class=\"filename\">postgres_fdw</code> \u5141\u8bb8 <code class=\"varname\">application_name</code> \u5305\u542b<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/18/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">fallback_application_name</code>\uff08\u59cb\u7ec8\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres_fdw</code>\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">sslkey</code> \u548c <code class=\"literal\">sslcert</code> \u53ef\u4ee5\u51fa\u73b0\u5728<span class=\"emphasis\"><em>\u8fde\u63a5\u9009\u9879\u3001\u7528\u6237\u6620\u5c04\u4e2d\u7684\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c\u7528\u6237\u6620\u5c04\u8bbe\u7f6e\u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002</p>\n</li>\n</ul>\n</div>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u521b\u5efa\u6216\u4fee\u6539\u5e26\u6709 <code class=\"literal\">sslcert</code> \u6216 <code class=\"literal\">sslkey</code> \u8bbe\u7f6e\u7684\u7528\u6237\u6620\u5c04\u3002</p>\n<p lang=\"zh\">\u975e\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5bc6\u7801\u8ba4\u8bc1\u6216\u4f7f\u7528 GSSAPI \u59d4\u6d3e\u51ed\u636e\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\uff0c\u56e0\u6b64\u5728\u9700\u8981\u5bc6\u7801\u8ba4\u8bc1\u7684\u573a\u666f\u4e2d\uff0c\u5e94\u4e3a\u5c5e\u4e8e\u975e\u8d85\u7ea7\u7528\u6237\u7684\u7528\u6237\u6620\u5c04\u6307\u5b9a <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u7528\u6237\u6620\u5c04\u9009\u9879 <code class=\"literal\">password_required 'false'</code> \u6309\u7528\u6237\u6620\u5c04\u5355\u72ec\u8986\u76d6\u6b64\u68c0\u67e5\uff0c\u4f8b\u5982\uff1a</p>\n<pre class=\"programlisting\">ALTER USER MAPPING FOR some_non_superuser SERVER loopback_nopw\nOPTIONS (ADD password_required 'false');\n</pre>\n<p lang=\"zh\">\u4e3a\u4e86\u9632\u6b62\u975e\u7279\u6743\u7528\u6237\u5229\u7528 postgres \u670d\u52a1\u5668\u6240\u8fd0\u884c\u7684 unix \u7528\u6237\u7684\u8ba4\u8bc1\u6743\u9650\u63d0\u5347\u5230\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u5728\u7528\u6237\u6620\u5c04\u4e0a\u8bbe\u7f6e\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u5fc5\u987b\u8c28\u614e\uff0c\u786e\u4fdd\u8fd9\u4e0d\u4f1a\u4f7f\u6620\u5c04\u7528\u6237\u80fd\u591f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\u5230\u6620\u5c04\u7684\u6570\u636e\u5e93\uff0c\u53c2\u89c1 CVE-2007-3278 \u548c CVE-2007-6601\u3002\u4e0d\u8981\u4e3a public \u89d2\u8272\u8bbe\u7f6e password_required=false\u3002\u8bf7\u6ce8\u610f\uff0c\u6620\u5c04\u7528\u6237\u53ef\u80fd\u4f7f\u7528\u8fd0\u884c postgres \u670d\u52a1\u5668\u7684\u7cfb\u7edf\u7528\u6237\u7684 Unix \u4e3b\u76ee\u5f55\u4e2d\u7684\u4efb\u4f55\u5ba2\u6237\u7aef\u8bc1\u4e66\u3001.pgpass\u3001.pg_service.conf \u7b49\u3002\uff08\u67e5\u627e\u4e3b\u76ee\u5f55\u7684\u89c4\u5219\u8be6\u89c1\u7b2c 32.16 \u8282\u3002\uff09\u4ed6\u4eec\u4e5f\u53ef\u80fd\u5229\u7528 peer\u3001ident \u7b49\u8ba4\u8bc1\u65b9\u5f0f\u6388\u4e88\u7684\u4efb\u4f55\u4fe1\u4efb\u5173\u7cfb\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-OBJECT-NAME\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.2.\u00a0\u5bf9\u8c61\u540d\u79f0\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u9009\u9879\u53ef\u7528\u4e8e\u63a7\u5236\u53d1\u9001\u5230\u8fdc\u7a0b <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u7684 SQL \u8bed\u53e5\u4e2d\u6240\u4f7f\u7528\u7684\u540d\u79f0\u3002\u5f53\u521b\u5efa\u5916\u90e8\u8868\u65f6\u6240\u7528\u7684\u540d\u79f0\u4e0e\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u7684\u540d\u79f0\u4e0d\u540c\u65f6\uff0c\u5c31\u9700\u8981\u8fd9\u4e9b\u9009\u9879\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">schema_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">table_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">column_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-COST-ESTIMATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.3.\u00a0\u4ee3\u4ef7\u4f30\u7b97\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u901a\u8fc7\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u67e5\u8be2\u6765\u83b7\u53d6\u8fdc\u7a0b\u6570\u636e\uff0c\u56e0\u6b64\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u626b\u63cf\u5916\u90e8\u8868\u7684\u4f30\u8ba1\u4ee3\u4ef7\u5e94\u5f53\u7b49\u4e8e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b8c\u6210\u8be5\u64cd\u4f5c\u7684\u4ee3\u4ef7\uff0c\u518d\u52a0\u4e0a\u4e00\u4e9b\u901a\u4fe1\u5f00\u9500\u3002\u83b7\u5f97\u8fd9\u79cd\u4f30\u7b97\u6700\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u662f\u5411\u8fdc\u7a0b\u670d\u52a1\u5668\u8be2\u95ee\uff0c\u518d\u628a\u5f00\u9500\u52a0\u4e0a\u53bb\uff1b\u4f46\u5bf9\u4e8e\u7b80\u5355\u67e5\u8be2\uff0c\u4e3a\u4e86\u53d6\u5f97\u4ee3\u4ef7\u4f30\u7b97\u800c\u989d\u5916\u53d1\u9001\u4e00\u6b21\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ef\u80fd\u5e76\u4e0d\u5212\u7b97\u3002\u56e0\u6b64 <code class=\"filename\">postgres_fdw</code> \u63d0\u4f9b\u4ee5\u4e0b\u9009\u9879\u6765\u63a7\u5236\u4ee3\u4ef7\u4f30\u7b97\u7684\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">use_remote_estimate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b <code class=\"command\">EXPLAIN</code> \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_startup_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_tuple_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">0.2</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u771f\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4ece\u8fdc\u7a0b\u670d\u52a1\u5668\u83b7\u53d6\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u5047\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u5728\u672c\u5730\u6267\u884c\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u518d\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u9664\u975e\u6709\u8fdc\u7a0b\u8868\u7edf\u8ba1\u4fe1\u606f\u7684\u672c\u5730\u526f\u672c\u53ef\u7528\uff0c\u5426\u5219\u8fd9\u79cd\u672c\u5730\u4f30\u7b97\u4e0d\u592a\u53ef\u80fd\u975e\u5e38\u51c6\u786e\u3002\u66f4\u65b0\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c\u662f\u5728\u5916\u90e8\u8868\u4e0a\u8fd0\u884c<a class=\"xref\" href=\"/docs/18/sql-analyze.html\" title=\"ANALYZE\"><span class=\"refentrytitle\">ANALYZE</span></a>\uff1b\u8fd9\u6837\u4f1a\u626b\u63cf\u8fdc\u7a0b\u8868\uff0c\u7136\u540e\u50cf\u5bf9\u5f85\u672c\u5730\u8868\u4e00\u6837\u8ba1\u7b97\u5e76\u5b58\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u4fdd\u7559\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u8fdc\u7a0b\u8868\u6bcf\u6b21\u67e5\u8be2\u7684\u89c4\u5212\u5f00\u9500\uff1b\u4f46\u5982\u679c\u8fdc\u7a0b\u8868\u7ecf\u5e38\u66f4\u65b0\uff0c\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u5f88\u5feb\u5c31\u4f1a\u8fc7\u65f6\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd <code class=\"command\">ANALYZE</code> \u64cd\u4f5c\u7684\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">analyze_sampling</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u51b3\u5b9a\u5916\u90e8\u8868 ANALYZE \u662f\u5728\u8fdc\u7a0b\u91c7\u6837\uff0c\u8fd8\u662f\u8bfb\u53d6\u5e76\u4f20\u8f93\u5168\u90e8\u6570\u636e\u540e\u5728\u672c\u5730\u91c7\u6837\u3002\u652f\u6301 off\u3001random\u3001system\u3001bernoulli \u548c auto\u3002off \u7981\u7528\u8fdc\u7a0b\u91c7\u6837\uff0c\u5168\u90e8\u6570\u636e\u4f1a\u4f20\u5230\u672c\u5730\u540e\u91c7\u6837\u3002random \u4f7f\u7528 random() \u51fd\u6570\u5728\u8fdc\u7a0b\u9009\u62e9\u8fd4\u56de\u884c\uff1bsystem \u548c bernoulli \u4f7f\u7528\u540c\u540d\u5185\u7f6e TABLESAMPLE \u65b9\u6cd5\u3002random \u9002\u7528\u4e8e\u6240\u6709\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\uff0cTABLESAMPLE \u4ec5\u4ece 9.5 \u8d77\u652f\u6301\u3002\u9ed8\u8ba4\u503c auto \u81ea\u52a8\u9009\u62e9\u63a8\u8350\u65b9\u6cd5\uff0c\u76ee\u524d\u6839\u636e\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\u9009\u62e9 bernoulli \u6216 random\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-REMOTE-EXECUTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.4.\u00a0\u8fdc\u7a0b\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709\u4f7f\u7528\u5185\u7f6e\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u624d\u4f1a\u88ab\u8003\u8651\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u3002\u6d89\u53ca\u975e\u5185\u7f6e\u51fd\u6570\u7684\u5b50\u53e5\u4f1a\u5728\u53d6\u56de\u884c\u4e4b\u540e\u5728\u672c\u5730\u68c0\u67e5\u3002\u5982\u679c\u8fd9\u4e9b\u51fd\u6570\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e5f\u53ef\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fe1\u5176\u7ed3\u679c\u4e0e\u672c\u5730\u76f8\u540c\uff0c\u5219\u5c06\u8fd9\u7c7b <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u7aef\u6267\u884c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u6b64\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">extensions</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 <span class=\"productname\">PostgreSQL</span> \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"literal\">extensions</code> \u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fetch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">batch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u4e2d\u5e94\u63d2\u5165\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">1</code>\u3002</p>\n<p lang=\"zh\">postgres_fdw \u6bcf\u6b21\u5b9e\u9645\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u4e0e\u6307\u5b9a\u7684 batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u5355\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7aef\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u91cf\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570 * batch_size \u8d85\u8fc7\u6b64\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u9519\u8bef\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u4e5f\u9002\u7528\u4e8e\u5411\u5916\u90e8\u8868\u590d\u5236\u6570\u636e\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u5b9e\u9645\u4e00\u6b21\u590d\u5236\u7684\u884c\u6570\u4f1a\u4ee5\u4e0e\u63d2\u5165\u573a\u666f\u7c7b\u4f3c\u7684\u65b9\u5f0f\u786e\u5b9a\uff0c\u4f46\u7531\u4e8e <code class=\"command\">COPY</code> \u547d\u4ee4\u7684\u5b9e\u73b0\u9650\u5236\uff0c\u6700\u591a\u53ea\u80fd\u4e3a 1000 \u884c\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-ASYNCHRONOUS-EXECUTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.5.\u00a0\u5f02\u6b65\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c <code class=\"structname\">Append</code> \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">async_capable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n<p lang=\"zh\">\u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c<code class=\"filename\">postgres_fdw</code> \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f <code class=\"structname\">Append</code> \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-TRANSACTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.6.\u00a0\u4e8b\u52a1\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0c\u5728 <code class=\"filename\">postgres_fdw</code> \u4e2d\uff0c\u4e8b\u52a1\u662f\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u6765\u7ba1\u7406\u7684\uff0c\u5b50\u4e8b\u52a1\u5219\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u6765\u7ba1\u7406\u3002\u5f53\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e5f\u4f1a\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u53ef\u4ee5\u6539\u5584\u6027\u80fd\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">parallel_commit</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">parallel_abort</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u4e2d\u6b62\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u4e2d\u6b62\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5982\u679c\u542f\u7528\u4e86\u8fd9\u4e9b\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002</p>\n<p lang=\"zh\">\u542f\u7528\u8fd9\u4e9b\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-UPDATABILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.7.\u00a0\u53ef\u66f4\u65b0\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u66f4\u65b0\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">updatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u548c <code class=\"command\">DELETE</code> \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c<code class=\"literal\">information_schema</code> \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-TRUNCATABILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.8.\u00a0\u53ef\u622a\u65ad\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u622a\u65ad\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">truncatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">TRUNCATE</code> \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-IMPORTING\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.9.\u00a0\u5bfc\u5165\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u5bfc\u5165\u5916\u90e8\u8868\u5b9a\u4e49\u3002\u8be5\u547d\u4ee4\u4f1a\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4ee5\u5339\u914d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868\u6216\u89c6\u56fe\u3002\u5982\u679c\u8981\u5bfc\u5165\u7684\u8fdc\u7a0b\u8868\u5217\u4f7f\u7528\u7528\u6237\u5b9a\u4e49\u6570\u636e\u7c7b\u578b\uff0c\u5219\u672c\u5730\u670d\u52a1\u5668\u5fc5\u987b\u5b58\u5728\u540c\u540d\u4e14\u517c\u5bb9\u7684\u7c7b\u578b\u3002</p>\n<p lang=\"zh\">\u53ef\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\uff08\u5728 <code class=\"command\">IMPORT FOREIGN SCHEMA</code> \u547d\u4ee4\u4e2d\u7ed9\u51fa\uff09\u81ea\u5b9a\u4e49\u5bfc\u5165\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">import_collate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">COLLATE</code> \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a <code class=\"literal\">true</code>\uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 <code class=\"literal\">COLLATE \"default\"</code> \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_default</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">DEFAULT</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b<code class=\"function\">nextval()</code> \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_generated</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">GENERATED</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_not_null</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">NOT NULL</code> \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u9664 <code class=\"literal\">NOT NULL</code> \u4e4b\u5916\u7684\u7ea6\u675f\u6c38\u8fdc\u4e0d\u4f1a\u4ece\u8fdc\u7a0b\u8868\u5bfc\u5165\u3002\u867d\u7136 <span class=\"productname\">PostgreSQL</span> \u786e\u5b9e\u652f\u6301\u5728\u5916\u90e8\u8868\u4e0a\u5b9a\u4e49\u68c0\u67e5\u7ea6\u675f\uff0c\u4f46\u7531\u4e8e\u7ea6\u675f\u8868\u8fbe\u5f0f\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u6c42\u503c\u4e0d\u540c\uff0c\u7cfb\u7edf\u4e0d\u4f1a\u81ea\u52a8\u5bfc\u5165\u5b83\u4eec\u3002\u6b64\u7c7b\u884c\u4e3a\u4e0d\u4e00\u81f4\u7684\u68c0\u67e5\u7ea6\u675f\uff0c\u53ef\u80fd\u5bfc\u81f4\u67e5\u8be2\u4f18\u5316\u4e2d\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5e0c\u671b\u5bfc\u5165\u68c0\u67e5\u7ea6\u675f\uff0c\u5fc5\u987b\u624b\u5de5\u5b8c\u6210\uff0c\u5e76\u5e94\u4ed4\u7ec6\u6838\u5b9e\u6bcf\u4e00\u4e2a\u7ea6\u675f\u7684\u8bed\u4e49\u3002\u6709\u5173\u5916\u90e8\u8868\u4e0a\u68c0\u67e5\u7ea6\u675f\u5904\u7406\u65b9\u5f0f\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/18/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u3002</p>\n<p lang=\"zh\">\u4f5c\u4e3a\u5176\u4ed6\u8868\u5206\u533a\u7684\u8868\u6216\u5916\u90e8\u8868\uff0c\u4ec5\u5728\u5b83\u4eec\u88ab\u660e\u786e\u5199\u5165 <code class=\"literal\">LIMIT TO</code> \u5b50\u53e5\u65f6\u624d\u4f1a\u5bfc\u5165\u3002\u5426\u5219\uff0c\u5b83\u4eec\u4f1a\u88ab\u81ea\u52a8\u6392\u9664\u5728<a class=\"xref\" href=\"/docs/18/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u4e4b\u5916\u3002\u7531\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u901a\u8fc7\u4f5c\u4e3a\u5206\u533a\u5c42\u6b21\u6839\u7684\u5206\u533a\u8868\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ea\u5bfc\u5165\u5206\u533a\u8868\u5373\u53ef\u8bbf\u95ee\u5168\u90e8\u6570\u636e\uff0c\u800c\u65e0\u9700\u521b\u5efa\u989d\u5916\u5bf9\u8c61\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-CONNECTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.10.\u00a0\u8fde\u63a5\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u672c\u5730\u4f1a\u8bdd\u4e2d\u4fdd\u6301\u6253\u5f00\uff0c\u4ee5\u4fbf\u91cd\u590d\u4f7f\u7528\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt id=\"POSTGRES-FDW-OPTION-KEEP-CONNECTIONS\"><span class=\"term\"><code class=\"literal\">keep_connections</code> (<code class=\"type\">boolean</code>)</span> </dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">on</code>\u3002\u5982\u679c\u8bbe\u7f6e\u4e3a <code class=\"literal\">off</code>\uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002</p>\n</p>\n</dd>\n<dt id=\"POSTGRES-FDW-OPTION-USE-SCRAM-PASSTHROUGH\"><span class=\"term\"><code class=\"literal\">use_scram_passthrough</code> (<code class=\"type\">boolean</code>)</span> </dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u5728\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\u65f6\u662f\u5426\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u3002\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u6307\u5b9a\u3002\u7528\u6237\u6620\u5c04\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5916\u90e8\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\u3002\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4f7f\u7528\u7ecf SCRAM Hash \u5904\u7406\u7684\u51ed\u636e\uff0c\u800c\u4e0d\u662f\u660e\u6587\u7528\u6237\u5bc6\u7801\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5728 PostgreSQL \u7cfb\u7edf\u76ee\u5f55\u4e2d\u5b58\u50a8\u660e\u6587\u7528\u6237\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8981\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8bf7\u6c42 <code class=\"literal\">scram-sha-256</code> \u8ba4\u8bc1\u65b9\u6cd5\uff1b\u5426\u5219\u8fde\u63a5\u5c06\u5931\u8d25\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8fdc\u7a0b\u670d\u52a1\u5668\u53ef\u4ee5\u662f\u4efb\u4f55\u652f\u6301 SCRAM \u7684 PostgreSQL \u7248\u672c\u3002\u5bf9 <code class=\"literal\">use_scram_passthrough</code> \u7684\u652f\u6301\u53ea\u8981\u6c42\u5ba2\u6237\u7aef\u4e00\u4fa7\uff08FDW \u4fa7\uff09\u5177\u5907\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u7528\u6237\u6620\u5c04\u5bc6\u7801\u4e0d\u4f1a\u88ab\u4f7f\u7528\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8fd0\u884c <code class=\"filename\">postgres_fdw</code> \u7684\u670d\u52a1\u5668\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u5fc5\u987b\u9488\u5bf9\u7528\u4e8e\u5728 <code class=\"filename\">postgres_fdw</code> \u4e0a\u8ba4\u8bc1\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8be5\u7528\u6237\uff0c\u62e5\u6709\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\uff08\u52a0\u5bc6\u5bc6\u7801\uff09\uff08\u76d0\u503c\u548c\u8fed\u4ee3\u6b21\u6570\u90fd\u5fc5\u987b\u76f8\u540c\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5bc6\u7801\u76f8\u540c\uff09\u3002</p>\n<p>\u56e0\u800c\uff0c\u5982\u679c\u8981\u5efa\u7acb\u5230\u591a\u4e2a\u4e3b\u673a\u7684 FDW \u8fde\u63a5\uff0c\u4f8b\u5982\u7528\u4e8e\u5206\u533a\u5916\u90e8\u8868\u6216\u5206\u7247\uff0c\u5219\u6240\u6709\u4e3b\u673a\u90fd\u5fc5\u987b\u4e3a\u76f8\u5173\u7528\u6237\u4fdd\u5b58\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u53d1\u8d77\u5bf9\u5916 FDW \u8fde\u63a5\u7684 PostgreSQL \u5b9e\u4f8b\u4e2d\uff0c\u5f53\u524d\u4f1a\u8bdd\u7684\u4f20\u5165\u5ba2\u6237\u7aef\u8fde\u63a5\u4e5f\u5fc5\u987b\u4f7f\u7528 SCRAM \u8ba4\u8bc1\u3002\uff08\u56e0\u6b64\u79f0\u4e3a<span class=\"quote\">\u201c<span class=\"quote\">\u900f\u4f20</span>\u201d</span>\uff1aSCRAM \u5fc5\u987b\u5728\u8fdb\u5165\u548c\u79bb\u5f00\u65f6\u90fd\u88ab\u4f7f\u7528\u3002\uff09\u8fd9\u662f SCRAM \u534f\u8bae\u7684\u6280\u672f\u8981\u6c42\u3002</p>\n</li>\n</ul>\n</div>\n</dd>\n</dl>\n</div>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-FUNCTIONS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-FUNCTIONS\">F.38.2. \u51fd\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_get_connections( IN check_conn boolean DEFAULT false, OUT server_name text, OUT user_name text, OUT valid boolean, OUT used_in_xact boolean, OUT closed boolean, OUT remote_backend_pid int4) returns setof record</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u8fd4\u56de postgres_fdw \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u6240\u6709\u6253\u5f00\u8fde\u63a5\u7684\u4fe1\u606f\u3002\u5982\u679c\u6ca1\u6709\u6253\u5f00\u7684\u8fde\u63a5\uff0c\u5219\u4e0d\u8fd4\u56de\u4efb\u4f55\u8bb0\u5f55\u3002</p>\n<p lang=\"zh\">check_conn \u4e3a true \u65f6\uff0c\u6b64\u51fd\u6570\u4f1a\u68c0\u67e5\u6bcf\u4e2a\u8fde\u63a5\u7684\u72b6\u6001\uff0c\u5e76\u5728 closed \u5217\u4e2d\u663e\u793a\u7ed3\u679c\u3002\u6b64\u529f\u80fd\u76ee\u524d\u4ec5\u9002\u7528\u4e8e\u652f\u6301 poll \u7cfb\u7edf\u8c03\u7528\u7684\u975e\u6807\u51c6 POLLRDHUP \u6269\u5c55\u7684\u7cfb\u7edf\uff0c\u5305\u62ec Linux\u3002\u5b83\u53ef\u7528\u4e8e\u68c0\u67e5\u4e8b\u52a1\u4e2d\u4f7f\u7528\u7684\u5168\u90e8\u8fde\u63a5\u662f\u5426\u4ecd\u7136\u6253\u5f00\u3002\u53ea\u8981\u6709\u8fde\u63a5\u5173\u95ed\uff0c\u4e8b\u52a1\u5c31\u65e0\u6cd5\u6210\u529f\u63d0\u4ea4\uff0c\u56e0\u6b64\u68c0\u6d4b\u5230\u8fde\u63a5\u5173\u95ed\u65f6\u5e94\u5c3d\u5feb\u56de\u6eda\uff0c\u800c\u975e\u7ee7\u7eed\u6267\u884c\u81f3\u7ed3\u675f\u3002\u5982\u679c\u51fd\u6570\u62a5\u544a\u67d0\u4e2a\u8fde\u63a5\u7684 used_in_xact \u548c closed \u5747\u4e3a true\uff0c\u7528\u6237\u53ef\u4ee5\u7acb\u5373\u56de\u6eda\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT * FROM postgres_fdw_get_connections(true);\n server_name | user_name | valid | used_in_xact | closed | remote_backend_pid\n-------------+-----------+-------+--------------+-----------------------------\n loopback1   | postgres  | t     | t            | f      |            1353340\n loopback2   | public    | t     | t            | f      |            1353120\n loopback3   |           | f     | t            | f      |            1353156\n</pre>\n<p lang=\"zh\">\u8f93\u51fa\u5217\u89c1<a class=\"xref\" href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-GET-CONNECTIONS-COLUMNS\" title=\"\u8868\u00a0F.28.\u00a0postgres_fdw_get_connections \u8f93\u51fa\u5217\">\u8868\u00a0F.28</a>\u3002</p>\n<div class=\"table\" id=\"POSTGRES-FDW-GET-CONNECTIONS-COLUMNS\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a0F.28.\u00a0<code class=\"function\">postgres_fdw_get_connections</code> \u8f93\u51fa\u5217</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5217</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"structfield\">server_name</code></td>\n<td lang=\"zh\">\u6587\u672c</td>\n<td lang=\"zh\">\u6b64\u8fde\u63a5\u7684\u5916\u90e8\u670d\u52a1\u5668\u540d\u79f0\u3002\u5982\u679c\u670d\u52a1\u5668\u5df2\u88ab\u5220\u9664\u4f46\u8fde\u63a5\u4ecd\u4fdd\u6301\u6253\u5f00\uff08\u5373\u88ab\u6807\u8bb0\u4e3a\u65e0\u6548\uff09\uff0c\u5219\u8be5\u503c\u4e3a <code class=\"literal\">NULL</code>\u3002</td>\n</tr>\n<tr>\n<td><code class=\"structfield\">user_name</code></td>\n<td lang=\"zh\">\u6587\u672c</td>\n<td lang=\"zh\">\u6620\u5c04\u5230\u6b64\u8fde\u63a5\u6240\u5c5e\u5916\u90e8\u670d\u52a1\u5668\u7684\u672c\u5730\u7528\u6237\u540d\u79f0\uff1b\u5982\u679c\u4f7f\u7528\u7684\u662f public \u6620\u5c04\uff0c\u5219\u4e3a <code class=\"literal\">public</code>\u3002\u5982\u679c\u7528\u6237\u6620\u5c04\u5df2\u88ab\u5220\u9664\u4f46\u8fde\u63a5\u4ecd\u4fdd\u6301\u6253\u5f00\uff08\u5373\u88ab\u6807\u8bb0\u4e3a\u65e0\u6548\uff09\uff0c\u5219\u8be5\u503c\u4e3a <code class=\"literal\">NULL</code>\u3002</td>\n</tr>\n<tr>\n<td lang=\"zh\">\u6709\u6548</td>\n<td><code class=\"type\">boolean</code></td>\n<td lang=\"zh\">\u5982\u679c\u6b64\u8fde\u63a5\u65e0\u6548\uff0c\u5219\u4e3a\u5047\uff1b\u65e0\u6548\u610f\u5473\u7740\u5b83\u5728\u5f53\u524d\u4e8b\u52a1\u4e2d\u88ab\u4f7f\u7528\uff0c\u4f46\u5176\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u5df2\u88ab\u66f4\u6539\u6216\u5220\u9664\u3002\u65e0\u6548\u8fde\u63a5\u5c06\u5728\u4e8b\u52a1\u7ed3\u675f\u65f6\u5173\u95ed\u3002\u5426\u5219\u8fd4\u56de\u771f\u3002</td>\n</tr>\n<tr>\n<td><code class=\"structfield\">used_in_xact</code></td>\n<td><code class=\"type\">boolean</code></td>\n<td lang=\"zh\">\u5982\u679c\u6b64\u8fde\u63a5\u5728\u5f53\u524d\u4e8b\u52a1\u4e2d\u88ab\u4f7f\u7528\uff0c\u5219\u4e3a\u771f\u3002</td>\n</tr>\n<tr>\n<td lang=\"zh\">\u5c01\u95ed</td>\n<td><code class=\"type\">boolean</code></td>\n<td lang=\"zh\">\u6b64\u8fde\u63a5\u5df2\u5173\u95ed\u65f6\u4e3a true\uff0c\u5426\u5219\u4e3a false\u3002\u5982\u679c check_conn \u8bbe\u4e3a false\uff0c\u6216\u5f53\u524d\u5e73\u53f0\u4e0d\u652f\u6301\u8fde\u63a5\u72b6\u6001\u68c0\u67e5\uff0c\u5219\u8fd4\u56de NULL\u3002</td>\n</tr>\n<tr>\n<td><code class=\"structfield\">remote_backend_pid</code></td>\n<td><code class=\"type\">int4</code></td>\n<td lang=\"zh\">\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u5904\u7406\u6b64\u8fde\u63a5\u7684\u8fdc\u7a0b\u540e\u7aef\u8fdb\u7a0b ID\u3002\u5982\u679c\u8fdc\u7a0b\u540e\u7aef\u5df2\u7ec8\u6b62\u4e14\u8fde\u63a5\u5df2\u5173\u95ed\uff08<code class=\"literal\">closed</code> \u4e3a <code class=\"literal\">true</code>\uff09\uff0c\u6b64\u5904\u4ecd\u4f1a\u663e\u793a\u8be5\u5df2\u7ec8\u6b62\u540e\u7aef\u7684\u8fdb\u7a0b ID\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect(server_name text) returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u8bf7\u6ce8\u610f\uff0c\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\u65f6\uff0c\u5bf9\u540c\u4e00\u670d\u52a1\u5668\u53ef\u80fd\u5b58\u5728\u591a\u4e2a\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u5982\u679c\u627e\u4e0d\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u62a5\u544a\u9519\u8bef\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect('loopback1');\n postgres_fdw_disconnect\n-------------------------\n t\n</pre>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect_all() returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5168\u90e8\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect_all();\n postgres_fdw_disconnect_all\n-----------------------------\n t\n</pre>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CONNECTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-CONNECTION-MANAGEMENT\">F.38.3. \u8fde\u63a5\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u5728\u9996\u6b21\u6267\u884c\u4f7f\u7528\u4e0e\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u5173\u8054\u7684\u5916\u90e8\u8868\u7684\u67e5\u8be2\u65f6\uff0c\u4f1a\u5efa\u7acb\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8be5\u8fde\u63a5\u4f1a\u5728\u540c\u4e00\u4f1a\u8bdd\u4e2d\u4fdd\u7559\u5e76\u4f9b\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u3002\u8fd9\u4e00\u884c\u4e3a\u53ef\u901a\u8fc7\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\u63a7\u5236\u3002\u5982\u679c\u4f7f\u7528\u591a\u4e2a\u7528\u6237\u6807\u8bc6\uff08\u7528\u6237\u6620\u5c04\uff09\u8bbf\u95ee\u8be5\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u4f1a\u4e3a\u6bcf\u4e2a\u7528\u6237\u6620\u5c04\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002</p>\n<p lang=\"zh\">\u5f53\u66f4\u6539\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u7684\u5b9a\u4e49\uff0c\u6216\u5c06\u5176\u5220\u9664\u65f6\uff0c\u76f8\u5173\u8fde\u63a5\u4f1a\u88ab\u5173\u95ed\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c\u5982\u679c\u4efb\u4f55\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u5728\u4f7f\u7528\uff0c\u5219\u4f1a\u4fdd\u7559\u5230\u4e8b\u52a1\u7ed3\u675f\u3002\u5173\u95ed\u7684\u8fde\u63a5\u4f1a\u5728\u540e\u7eed\u4f7f\u7528\u5916\u90e8\u8868\u7684\u67e5\u8be2\u9700\u8981\u5b83\u4eec\u65f6\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\">\u4e00\u65e6\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5b83\u4f1a\u4e00\u76f4\u4fdd\u7559\u5230\u672c\u5730\u4f1a\u8bdd\u6216\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u9000\u51fa\u3002\u8981\u663e\u5f0f\u65ad\u5f00\u8fde\u63a5\uff0c\u53ef\u4ee5\u7981\u7528\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\uff0c\u6216\u4f7f\u7528 <code class=\"function\">postgres_fdw_disconnect</code> \u548c <code class=\"function\">postgres_fdw_disconnect_all</code> \u51fd\u6570\u3002\u4f8b\u5982\uff0c\u8fd9\u4e9b\u51fd\u6570\u53ef\u7528\u4e8e\u5173\u95ed\u4e0d\u518d\u9700\u8981\u7684\u8fde\u63a5\uff0c\u4ece\u800c\u91ca\u653e\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u8fde\u63a5\u8d44\u6e90\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-TRANSACTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-TRANSACTION-MANAGEMENT\">F.38.4. \u4e8b\u52a1\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c<code class=\"filename\">postgres_fdw</code> \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002</p>\n<p lang=\"zh\">\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a <code class=\"literal\">SERIALIZABLE</code> \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code>\uff1b\u5426\u5219\u4f7f\u7528 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code> \u6216 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e <code class=\"literal\">READ COMMITTED</code> \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 <span class=\"productname\">PostgreSQL</span> \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c<code class=\"filename\">postgres_fdw</code> \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">F.38.5. \u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 <code class=\"literal\">extensions</code> \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f <code class=\"literal\">IMMUTABLE</code>\u3002\u5bf9\u4e8e <code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u67e5\u8be2\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 <code class=\"literal\">BEFORE</code> \u6216 <code class=\"literal\">AFTER</code> \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 <code class=\"literal\">CHECK OPTION</code> \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 <code class=\"command\">UPDATE</code> \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001<code class=\"literal\">IMMUTABLE</code> \u64cd\u4f5c\u7b26\u6216 <code class=\"literal\">IMMUTABLE</code> \u51fd\u6570\u3002</p>\n<p lang=\"zh\">\u5f53 <code class=\"filename\">postgres_fdw</code> \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 <code class=\"literal\">JOIN</code> \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">EXPLAIN VERBOSE</code> \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">F.38.6. \u8fdc\u7a0b\u67e5\u8be2\u6267\u884c\u73af\u5883</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728 <code class=\"filename\">postgres_fdw</code> \u6253\u5f00\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u4e2d\uff0c<a class=\"xref\" href=\"/docs/18/runtime-config-client.html#GUC-SEARCH-PATH\">search_path</a>\u53c2\u6570\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u5305\u542b <code class=\"literal\">pg_catalog</code>\uff0c\u8fd9\u6837\u65e0\u9700\u6a21\u5f0f\u9650\u5b9a\u5c31\u53ea\u80fd\u770b\u5230\u5185\u7f6e\u5bf9\u8c61\u3002\u8fd9\u5bf9 <code class=\"filename\">postgres_fdw</code> \u81ea\u8eab\u751f\u6210\u7684\u67e5\u8be2\u4e0d\u662f\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u603b\u662f\u63d0\u4f9b\u8fd9\u79cd\u9650\u5b9a\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bf9\u90a3\u4e9b\u901a\u8fc7\u8fdc\u7a0b\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u6216\u89c4\u5219\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u51fd\u6570\u5e26\u6765\u98ce\u9669\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u89c6\u56fe\uff0c\u5219\u8be5\u89c6\u56fe\u4e2d\u4f7f\u7528\u7684\u4efb\u4f55\u51fd\u6570\u90fd\u4f1a\u5728\u53d7\u9650\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u6267\u884c\u3002\u5efa\u8bae\u5728\u8fd9\u7c7b\u51fd\u6570\u4e2d\u5bf9\u6240\u6709\u540d\u79f0\u90fd\u5199\u6210\u5e26\u6a21\u5f0f\u9650\u5b9a\u7684\u5f62\u5f0f\uff0c\u6216\u8005\u4e3a\u8fd9\u7c7b\u51fd\u6570\u9644\u52a0 <code class=\"literal\">SET search_path</code> \u9009\u9879\uff08\u89c1<a class=\"xref\" href=\"/docs/18/sql-createfunction.html\" title=\"CREATE FUNCTION\"><span class=\"refentrytitle\">CREATE FUNCTION</span></a>\uff09\uff0c\u4ee5\u5efa\u7acb\u5176\u9884\u671f\u7684\u641c\u7d22\u8def\u5f84\u73af\u5883\u3002</p>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u8fd8\u4f1a\u4e3a\u8fdc\u7a0b\u4f1a\u8bdd\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/18/runtime-config-client.html#GUC-TIMEZONE\">TimeZone</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">UTC</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/18/runtime-config-client.html#GUC-DATESTYLE\">DateStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">ISO</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/18/runtime-config-client.html#GUC-INTERVALSTYLE\">IntervalStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\u5bf9\u4e8e 9.0 \u53ca\u66f4\u65b0\u7248\u672c\u7684\u8fdc\u7aef\u670d\u52a1\u5668\uff0cextra_float_digits \u8bbe\u4e3a 3\uff1b\u66f4\u65e9\u7248\u672c\u5219\u8bbe\u4e3a 2\u3002</li>\n</ul>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u8bbe\u7f6e\u901a\u5e38\u4e0d\u50cf <code class=\"varname\">search_path</code> \u90a3\u6837\u5bb9\u6613\u51fa\u95ee\u9898\uff0c\u4f46\u5982\u679c\u6709\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684 <code class=\"literal\">SET</code> \u9009\u9879\u5904\u7406\u3002</p>\n<p lang=\"zh\"><span class=\"emphasis\"><em>\u4e0d</em></span>\u5efa\u8bae\u901a\u8fc7\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u7684\u4f1a\u8bdd\u7ea7\u8bbe\u7f6e\u6765\u8986\u76d6\u8fd9\u79cd\u884c\u4e3a\uff1b\u8fd9\u5f88\u53ef\u80fd\u5bfc\u81f4 <code class=\"filename\">postgres_fdw</code> \u5de5\u4f5c\u5f02\u5e38\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">F.38.7. \u8de8\u7248\u672c\u517c\u5bb9\u6027</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002</p>\n<p lang=\"zh\">\u4e00\u4e2a\u9650\u5236\u662f\uff0cpostgres_fdw \u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u6240\u7528\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u901a\u8fc7\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\uff0c\u4ee5\u6b64\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002</p>\n<p lang=\"zh\">\u53e6\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5728\u5916\u90e8\u8868\u4e0a\u6267\u884c <code class=\"command\">INSERT</code> \u8bed\u53e5\u5e76\u5e26\u6709 <code class=\"literal\">ON CONFLICT DO NOTHING</code> \u5b50\u53e5\u65f6\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8fd0\u884c <span class=\"productname\">PostgreSQL</span> 9.5 \u6216\u66f4\u9ad8\u7248\u672c\uff0c\u56e0\u4e3a\u66f4\u65e9\u7248\u672c\u4e0d\u652f\u6301\u6b64\u7279\u6027\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-WAIT-EVENTS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-WAIT-EVENTS\">F.38.8. \u7b49\u5f85\u4e8b\u4ef6</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u5728\u7b49\u5f85\u4e8b\u4ef6\u7c7b\u578b <code class=\"literal\">Extension</code> \u4e0b\u62a5\u544a\u4ee5\u4e0b\u7b49\u5f85\u4e8b\u4ef6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwCleanupResult</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u4e8b\u52a1\u4e2d\u6b62\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwConnect</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwGetResult</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u63a5\u6536\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u67e5\u8be2\u7ed3\u679c\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CONFIGURATION-PARAMETERS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-CONFIGURATION-PARAMETERS\">F.38.9. \u914d\u7f6e\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt id=\"GUC-PGFDW-APPLICATION-NAME\"><span class=\"term\"><code class=\"varname\">postgres_fdw.application_name</code> (<code class=\"type\">string</code>) </span> </dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a\u7528\u4e8e<a class=\"xref\" href=\"/docs/18/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u914d\u7f6e\u53c2\u6570\u7684\u503c\uff0c\u8be5\u503c\u4f1a\u5728 <code class=\"filename\">postgres_fdw</code> \u5efa\u7acb\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u65f6\u4f7f\u7528\u3002\u8fd9\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u5bf9\u8c61\u7684 <code class=\"varname\">application_name</code> \u9009\u9879\u3002\u8bf7\u6ce8\u610f\uff0c\u4fee\u6539\u6b64\u53c2\u6570\u4e0d\u4f1a\u5f71\u54cd\u4efb\u4f55\u73b0\u6709\u8fde\u63a5\uff0c\u9664\u975e\u8fd9\u4e9b\u8fde\u63a5\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\"><code class=\"varname\">postgres_fdw.application_name</code> \u53ef\u4ee5\u662f\u4efb\u610f\u957f\u5ea6\u7684\u4efb\u610f\u5b57\u7b26\u4e32\uff0c\u751a\u81f3\u53ef\u4ee5\u5305\u542b\u975e ASCII \u5b57\u7b26\u3002\u4e0d\u8fc7\uff0c\u5f53\u5b83\u88ab\u4f20\u9012\u5e76\u4f5c\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u4e2d\u7684 <code class=\"varname\">application_name</code> \u4f7f\u7528\u65f6\uff0c\u8bf7\u6ce8\u610f\u5b83\u4f1a\u88ab\u622a\u65ad\u5230\u5c11\u4e8e <code class=\"symbol\">NAMEDATALEN</code> \u4e2a\u5b57\u7b26\u3002\u9664\u53ef\u6253\u5370 ASCII \u5b57\u7b26\u4ee5\u5916\u7684\u6240\u6709\u5b57\u7b26\u90fd\u4f1a\u88ab\u66ff\u6362\u4e3a<a class=\"link\" href=\"/docs/18/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE\" title=\"4.1.2.2.\u00a0C\u98ce\u683c\u8f6c\u4e49\u7684\u5b57\u7b26\u4e32\u5e38\u91cf\">C \u98ce\u683c\u7684\u5341\u516d\u8fdb\u5236\u8f6c\u4e49</a>\u3002\u6709\u5173\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/18/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u3002</p>\n<p lang=\"zh\"><code class=\"literal\">%</code> \u5b57\u7b26\u8868\u793a<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u7684\u5f00\u59cb\uff0c\u5e76\u4f1a\u6309\u4e0b\u8ff0\u65b9\u5f0f\u66ff\u6362\u4e3a\u72b6\u6001\u4fe1\u606f\u3002\u672a\u8bc6\u522b\u7684\u8f6c\u4e49\u4f1a\u88ab\u5ffd\u7565\u3002\u5176\u4ed6\u5b57\u7b26\u4f1a\u539f\u6837\u590d\u5236\u5230\u5e94\u7528\u540d\u4e2d\u3002\u8bf7\u6ce8\u610f\uff0c\u4e0d\u5141\u8bb8\u5728 <code class=\"literal\">%</code> \u4e0e\u9009\u9879\u5b57\u6bcd\u4e4b\u95f4\u6307\u5b9a\u6b63\u8d1f\u53f7\u6216\u6570\u5b57\u5b57\u9762\u91cf\u6765\u8fdb\u884c\u5bf9\u9f50\u548c\u586b\u5145\u3002</p>\n<div class=\"informaltable\">\n<table class=\"informaltable\">\n<thead>\n<tr>\n<th lang=\"zh\">\u8f6c\u4e49\u5e8f\u5217</th>\n<th lang=\"zh\">\u6548\u679c</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"literal\">%a</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u5e94\u7528\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%c</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u4f1a\u8bdd ID\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/18/runtime-config-logging.html#GUC-LOG-LINE-PREFIX\">log_line_prefix</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%C</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u96c6\u7c07\u540d\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/18/runtime-config-logging.html#GUC-CLUSTER-NAME\">cluster_name</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%u</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u7528\u6237\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%d</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u5e93\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%p</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u540e\u7aef\u7684\u8fdb\u7a0b ID</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%%</code></td>\n<td lang=\"zh\">\u5b57\u9762\u5b57\u7b26 %</td>\n</tr>\n</tbody>\n</table>\n</div>\n<p lang=\"zh\">\u4f8b\u5982\uff0c\u5047\u8bbe\u7528\u6237 local_user \u4ece\u6570\u636e\u5e93 local_db \u4ee5 foreign_user \u8eab\u4efd\u8fde\u63a5\u5230 foreign_db\uff0c\u5219\u8bbe\u7f6e 'db=%d, user=%u' \u4f1a\u66ff\u6362\u4e3a 'db=local_db, user=local_user'\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-EXAMPLES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-EXAMPLES\">F.38.10. \u793a\u4f8b</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4e0b\u9762\u662f\u4f7f\u7528 <code class=\"literal\">postgres_fdw</code> \u521b\u5efa\u5916\u90e8\u8868\u7684\u4e00\u4e2a\u793a\u4f8b\u3002\u9996\u5148\u5b89\u88c5\u6269\u5c55\uff1a</p>\n<pre class=\"programlisting\">CREATE EXTENSION postgres_fdw;\n</pre>\n<p lang=\"zh\">\u7136\u540e\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8fde\u63a5\u5230\u4e00\u53f0 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\uff0c\u5b83\u8fd0\u884c\u5728\u4e3b\u673a <code class=\"literal\">192.83.123.89</code> \u4e0a\u5e76\u76d1\u542c <code class=\"literal\">5432</code> \u7aef\u53e3\u3002\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"literal\">foreign_db</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER foreign_server\n        FOREIGN DATA WRAPPER postgres_fdw\n        OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');\n</pre>\n<p lang=\"zh\">\u8fd8\u9700\u8981\u7528<a class=\"xref\" href=\"/docs/18/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u5b9a\u4e49\u4e00\u4e2a\u7528\u6237\u6620\u5c04\uff0c\u4ee5\u6807\u8bc6\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u54ea\u4e2a\u89d2\u8272\uff1a</p>\n<pre class=\"programlisting\">CREATE USER MAPPING FOR local_user\n        SERVER foreign_server\n        OPTIONS (user 'foreign_user', password 'password');\n</pre>\n<p lang=\"zh\">\u73b0\u5728\u5c31\u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u521b\u5efa\u5916\u90e8\u8868\u4e86\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"structname\">some_schema.some_table</code> \u7684\u8868\u3002\u5b83\u5728\u672c\u5730\u7684\u540d\u79f0\u5c06\u662f <code class=\"structname\">foreign_table</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE FOREIGN TABLE foreign_table (\n        id integer NOT NULL,\n        data text\n)\n        SERVER foreign_server\n        OPTIONS (schema_name 'some_schema', table_name 'some_table');\n</pre>\n<p lang=\"zh\">\u5728 <code class=\"command\">CREATE FOREIGN TABLE</code> \u4e2d\u58f0\u660e\u7684\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u5176\u4ed6\u5c5e\u6027\uff0c\u5fc5\u987b\u4e0e\u5b9e\u9645\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u5217\u540d\u4e5f\u5fc5\u987b\u5339\u914d\uff0c\u9664\u975e\u4e3a\u5404\u4e2a\u5217\u9644\u52a0 <code class=\"literal\">column_name</code> \u9009\u9879\u6765\u6307\u660e\u5b83\u4eec\u5728\u8fdc\u7a0b\u8868\u4e2d\u7684\u540d\u79f0\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u76f8\u6bd4\u624b\u5de5\u6784\u9020\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4f7f\u7528 <a class=\"link\" href=\"/docs/18/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><code class=\"command\">IMPORT FOREIGN SCHEMA</code></a> \u66f4\u53ef\u53d6\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-AUTHOR\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-AUTHOR\">F.38.11. \u4f5c\u8005</a></span></h3>\n</div>\n</div>\n</div>\n<p>Shigeru Hanada <code class=\"email\">&lt;<a class=\"email\" href=\"mailto:shigeru.hanada@gmail.com\">shigeru.hanada@gmail.com</a>&gt;</code></p>\n</div>\n</div>", "manual_path": "/docs/18/postgres-fdw.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/datatype-geometric.html", "method": "same-major semantic node", "sha256": "3e6a2a9270d62b2d90e9de291deefbf6aeb3f07329b5c2913a40da835e8dee71", "language": "zh", "matched_nodes": ["#DATATYPE-GEOMETRIC/div[11]/p[2]/em[1]"]}, {"url": "/docs/18/postgres-fdw.html", "method": "same-major semantic node", "sha256": "13dee90aff35c8bd5d980d6b077844ad3d6090c3afdd7efd0fe921b18897a85b", "language": "zh", "matched_nodes": ["#POSTGRES-FDW/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[4]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/p[1]", "#POSTGRES-FDW/div[12]/div[10]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/div[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[4]", "#POSTGRES-FDW/div[12]/div[1]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/p[3]", "#POSTGRES-FDW/div[12]/div[1]/p[4]", "#POSTGRES-FDW/div[12]/div[1]/p[5]", "#POSTGRES-FDW/div[12]/div[1]/p[7]", "#POSTGRES-FDW/div[12]/div[2]/div[0]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[2]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/div[0]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[3]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/p[3]", "#POSTGRES-FDW/div[12]/div[3]/p[4]", "#POSTGRES-FDW/div[12]/div[4]/div[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[2]", "#POSTGRES-FDW/div[12]/div[4]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[12]/div[5]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/div[0]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[6]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/p[3]", "#POSTGRES-FDW/div[12]/div[6]/p[4]", "#POSTGRES-FDW/div[12]/div[7]/div[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[7]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/div[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[7]", "#POSTGRES-FDW/div[12]/div[9]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/p[2]", "#POSTGRES-FDW/div[12]/div[9]/p[4]", "#POSTGRES-FDW/div[12]/div[9]/p[5]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[0]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[1]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[2]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[3]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[5]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/thead[1]/tr[0]/th[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[4]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[14]/p[1]", "#POSTGRES-FDW/div[14]/p[2]", "#POSTGRES-FDW/div[14]/p[3]", "#POSTGRES-FDW/div[15]/p[1]", "#POSTGRES-FDW/div[15]/p[2]", "#POSTGRES-FDW/div[15]/p[3]", "#POSTGRES-FDW/div[16]/p[1]", "#POSTGRES-FDW/div[16]/p[2]", "#POSTGRES-FDW/div[16]/p[3]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[0]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[1]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[2]", "#POSTGRES-FDW/div[17]/p[1]", "#POSTGRES-FDW/div[17]/p[2]", "#POSTGRES-FDW/div[17]/p[4]", "#POSTGRES-FDW/div[17]/p[5]", "#POSTGRES-FDW/div[18]/p[3]", "#POSTGRES-FDW/div[19]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[19]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[19]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[19]/p[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[0]", "#POSTGRES-FDW/div[1]/dl[0]/dt[10]", "#POSTGRES-FDW/div[1]/dl[0]/dt[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[4]", "#POSTGRES-FDW/div[1]/dl[0]/dt[5]", "#POSTGRES-FDW/div[1]/dl[0]/dt[6]", "#POSTGRES-FDW/div[1]/dl[0]/dt[7]", "#POSTGRES-FDW/div[1]/dl[0]/dt[8]", "#POSTGRES-FDW/div[1]/dl[0]/dt[9]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[0]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[1]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[2]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[3]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[4]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[5]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[6]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[0]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[21]/p[1]", "#POSTGRES-FDW/div[21]/p[3]", "#POSTGRES-FDW/div[21]/p[5]", "#POSTGRES-FDW/div[21]/p[7]", "#POSTGRES-FDW/div[21]/p[9]", "#POSTGRES-FDW/div[6]/ol[0]/li[0]", "#POSTGRES-FDW/div[6]/ol[0]/li[1]", "#POSTGRES-FDW/div[6]/ol[0]/li[2]", "#POSTGRES-FDW/div[6]/ol[0]/li[3]", "#POSTGRES-FDW/p[10]", "#POSTGRES-FDW/p[11]", "#POSTGRES-FDW/p[3]", "#POSTGRES-FDW/p[4]", "#POSTGRES-FDW/p[5]", "#POSTGRES-FDW/p[7]", "#POSTGRES-FDW/p[8]"]}, {"url": "/docs/18/protocol-overview.html", "method": "same-major semantic node", "sha256": "3f1aa8bd4dbef58e9a82e8cf4c82829a4df7416cfa83dd61c18e9e25060f22da", "language": "zh", "matched_nodes": ["#PROTOCOL-OVERVIEW/div[9]/p[1]/span[2]/span[0]"]}, {"url": "/docs/18/sql-createindex.html", "method": "same-major semantic node", "sha256": "d943da3610e12ec596dded42ac67d7d3b2028c0c0aad7db6cddca4a61fc052aa", "language": "zh", "matched_nodes": ["#SQL-CREATEINDEX/div[5]/div[3]/p[4]/span[2]/span[0]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/versions/18/facts/0/label": "Interface family", "/versions/18/facts/0/value": "Foreign-data wrapper", "/versions/18/facts/1/label": "Handler or routine", "/versions/18/facts/2/label": "Recorded callbacks", "/versions/18/facts/3/label": "Data source", "/versions/18/facts/3/value": "Remote PostgreSQL servers", "/versions/18/tables/0/title": "Registered interface handlers", "/versions/18/tables/1/title": "Documented options", "/versions/18/related/0/label": "Foreign-data wrapper catalog", "/versions/18/related/1/label": "Existing extension catalogue identity", "/versions/18/related/2/label": "Foreign Scan plan node", "/versions/18/sections/0/title": "Interface and capability boundaries", "/versions/18/sections/1/title": "Asynchronous Execution Options", "/versions/18/sections/2/title": "Transaction Management Options", "/versions/18/sections/3/title": "Transaction Management", "/versions/18/sections/4/title": "Remote Query Optimization", "/versions/18/sections/5/title": "Cross-Version Compatibility", "/versions/18/sections/6/title": "Registered implementation in core source", "/versions/18/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/18/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/18/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/18/sections/1/paragraphs/0": "postgres_fdw supports asynchronous execution, which runs multiple parts of an Append node concurrently rather than serially to improve performance. This execution can be controlled using the following option:", "/versions/18/sections/2/paragraphs/0": "As described in the Transaction Management section, in postgres_fdw transactions are managed by creating corresponding remote transactions, and subtransactions are managed by creating corresponding remote subtransactions. When multiple remote transactions are involved in the current local transaction, by default postgres_fdw commits or aborts those remote transactions serially when the local transaction is committed or aborted. When multiple remote subtransactions are involved in the current local subtransaction, by default postgres_fdw commits or aborts those remote subtransactions serially when the local subtransaction is committed or aborted. Performance can be improved with the following options:", "/versions/18/sections/2/paragraphs/1": "If multiple foreign servers with these options enabled are involved in a local transaction, multiple remote transactions on those foreign servers are committed or aborted in parallel across those foreign servers when the local transaction is committed or aborted.", "/versions/18/sections/2/paragraphs/2": "When these options are enabled, a foreign server with many remote transactions may see a negative performance impact when the local transaction is committed or aborted.", "/versions/18/sections/3/paragraphs/0": "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints.", "/versions/18/sections/3/paragraphs/1": "The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local transaction uses SERIALIZABLE or REPEATABLE READ isolation level, but it might be surprising for a READ COMMITTED local transaction. A future PostgreSQL release might modify these rules.", "/versions/18/sections/3/paragraphs/2": "Note that it is currently not supported by postgres_fdw to prepare the remote transaction for two-phase commit.", "/versions/18/sections/4/paragraphs/0": "postgres_fdw attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by sending query WHERE clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, WHERE clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an extension that's listed in the foreign server's extensions option. Operators and functions in such clauses must be IMMUTABLE as well. For an UPDATE or DELETE query, postgres_fdw attempts to optimize the query execution by sending the whole query to the remote server if there are no query WHERE clauses that cannot be sent to the remote server, no local joins for the query, no row-level local BEFORE or AFTER triggers or stored generated columns on the target table, and no CHECK OPTION constraints from parent views. In UPDATE , expressions to assign to target columns must use only built-in data types, IMMUTABLE operators, or IMMUTABLE functions, to reduce the risk of misexecution of the query.", "/versions/18/sections/4/paragraphs/1": "When postgres_fdw encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved are subject to different user mappings. While sending the JOIN clauses, it takes the same precautions as mentioned above for the WHERE clauses.", "/versions/18/sections/4/paragraphs/2": "The query that is actually sent to the remote server for execution can be examined using EXPLAIN VERBOSE .", "/versions/18/sections/5/paragraphs/0": "postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1.", "/versions/18/sections/5/paragraphs/1": "A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent to it for execution, resulting in \u201c function does not exist \u201d or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table reference in a sub- SELECT with OFFSET 0 as an optimization fence, and placing the problematic function or operator outside the sub- SELECT .", "/versions/18/sections/5/paragraphs/2": "Another limitation is that when executing INSERT statements with an ON CONFLICT DO NOTHING clause on a foreign table, the remote server must be running PostgreSQL 9.5 or later, as earlier versions do not support this feature.", "/versions/18/tables/0/rows/0/feature": "Scan rows", "/versions/18/tables/0/rows/5/feature": "Join path pushdown", "/versions/18/tables/0/rows/6/feature": "Upper paths, including aggregation", "/versions/18/tables/0/rows/7/feature": "Batch insert", "/versions/18/tables/0/rows/8/feature": "Asynchronous append execution", "/versions/18/tables/0/rows/9/feature": "Import schema", "/versions/18/tables/0/columns/0/label": "Interface operation", "/versions/18/tables/0/columns/1/label": "Source observation", "/versions/18/tables/0/columns/2/label": "Callback", "/versions/18/tables/0/columns/3/label": "Implementation", "/versions/18/tables/1/columns/0/label": "Option", "/versions/18/tables/1/columns/1/label": "Same-version definition", "/versions/18/tables/1/rows/0/definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used.", "/versions/18/tables/1/rows/1/definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used.", "/versions/18/tables/1/rows/2/definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used.", "/versions/18/tables/1/rows/3/definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false .", "/versions/18/tables/1/rows/4/definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 .", "/versions/18/tables/1/rows/5/definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.2 .", "/versions/18/tables/1/rows/6/definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table samples the data on the remote side, or reads and transfers all data and performs the sampling locally. The supported values are off , random , system , bernoulli and auto . off disables remote sampling, so all data are transferred and sampled locally. random performs remote sampling using the random() function to choose returned rows, while system and bernoulli rely on the built-in TABLESAMPLE methods of those names. random works on all remote server versions, while TABLESAMPLE is supported only since 9.5. auto (the default) picks the recommended sampling method automatically; currently it means either bernoulli or random depending on the remote server version.", "/versions/18/tables/1/rows/7/definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.", "/versions/18/tables/1/rows/8/definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 .", "/versions/18/tables/1/rows/9/definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error. This option also applies when copying into foreign tables. In that case the actual number of rows postgres_fdw copies at once is determined in a similar way to the insert case, but it is limited to at most 1000 due to implementation restrictions of the COPY command.", "/versions/18/tables/1/rows/10/definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release.", "/versions/18/tables/1/rows/11/definition": "This option controls whether postgres_fdw commits, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false .", "/versions/18/tables/1/rows/12/definition": "This option controls whether postgres_fdw aborts, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is aborted. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false .", "/versions/18/tables/1/rows/13/definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server.", "/versions/18/tables/1/rows/14/definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server.", "/versions/18/tables/1/rows/15/definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different.", "/versions/18/tables/1/rows/16/definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally.", "/versions/18/tables/1/rows/17/definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally.", "/versions/18/tables/1/rows/18/definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true .", "/versions/18/tables/1/rows/19/definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction.", "/versions/18/tables/1/rows/20/definition": "This option controls whether postgres_fdw will use the SCRAM pass-through authentication to connect to the foreign server. It can be specified for a foreign server or a user mapping. A user mapping setting overrides the foreign server setting. With SCRAM pass-through authentication, postgres_fdw uses SCRAM-hashed secrets instead of plain-text user passwords to connect to the remote server. This avoids storing plain-text user passwords in PostgreSQL system catalogs. To use SCRAM pass-through authentication: The remote server must request the scram-sha-256 authentication method; otherwise, the connection will fail. The remote server can be of any PostgreSQL version that supports SCRAM. Support for use_scram_passthrough is only required on the client side (FDW side). The user mapping password is not used. The server running postgres_fdw and the remote server must have identical SCRAM secrets (encrypted passwords) for the user being used on postgres_fdw to authenticate on the foreign server (same salt and iterations, not merely the same password). As a corollary, if FDW connections to multiple hosts are to be made, for example for partitioned foreign tables/sharding, then all hosts must have identical SCRAM secrets for the users involved. The current session on the PostgreSQL instance that makes the outgoing FDW connections also must also use SCRAM authentication for its incoming client connection. (Hence \u201c pass-through \u201d : SCRAM must be used going in and out.) This is a technical requirement of the SCRAM protocol."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "2b79e355219a8470f850a537aed544d635d3c3e7ac7d25bc18bc2caaecdda2eb"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "schema_name", "definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used."}, {"name": "table_name", "definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used."}, {"name": "column_name", "definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used."}, {"name": "use_remote_estimate", "definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false ."}, {"name": "fdw_startup_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 ."}, {"name": "fdw_tuple_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.2 ."}, {"name": "analyze_sampling", "definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table samples the data on the remote side, or reads and transfers all data and performs the sampling locally. The supported values are off , random , system , bernoulli and auto . off disables remote sampling, so all data are transferred and sampled locally. random performs remote sampling using the random() function to choose returned rows, while system and bernoulli rely on the built-in TABLESAMPLE methods of those names. random works on all remote server versions, while TABLESAMPLE is supported only since 9.5. auto (the default) picks the recommended sampling method automatically; currently it means either bernoulli or random depending on the remote server version."}, {"name": "extensions", "definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly."}, {"name": "fetch_size", "definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 ."}, {"name": "batch_size", "definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error. This option also applies when copying into foreign tables. In that case the actual number of rows postgres_fdw copies at once is determined in a similar way to the insert case, but it is limited to at most 1000 due to implementation restrictions of the COPY command."}, {"name": "async_capable", "definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release."}, {"name": "parallel_commit", "definition": "This option controls whether postgres_fdw commits, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false ."}, {"name": "parallel_abort", "definition": "This option controls whether postgres_fdw aborts, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is aborted. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false ."}, {"name": "updatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server."}, {"name": "truncatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server."}, {"name": "import_collate", "definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different."}, {"name": "import_default", "definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally."}, {"name": "import_generated", "definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally."}, {"name": "import_not_null", "definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true ."}, {"name": "keep_connections", "definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction."}, {"name": "use_scram_passthrough", "definition": "This option controls whether postgres_fdw will use the SCRAM pass-through authentication to connect to the foreign server. It can be specified for a foreign server or a user mapping. A user mapping setting overrides the foreign server setting. With SCRAM pass-through authentication, postgres_fdw uses SCRAM-hashed secrets instead of plain-text user passwords to connect to the remote server. This avoids storing plain-text user passwords in PostgreSQL system catalogs. To use SCRAM pass-through authentication: The remote server must request the scram-sha-256 authentication method; otherwise, the connection will fail. The remote server can be of any PostgreSQL version that supports SCRAM. Support for use_scram_passthrough is only required on the client side (FDW side). The user mapping password is not used. The server running postgres_fdw and the remote server must have identical SCRAM secrets (encrypted passwords) for the user being used on postgres_fdw to authenticate on the foreign server (same salt and iterations, not merely the same password). As a corollary, if FDW connections to multiple hosts are to be made, for example for partitioned foreign tables/sharding, then all hosts must have identical SCRAM secrets for the users involved. The current session on the PostgreSQL instance that makes the outgoing FDW connections also must also use SCRAM authentication for its incoming client connection. (Hence \u201c pass-through \u201d : SCRAM must be used going in and out.) This is a technical requirement of the SCRAM protocol."}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "source_options": [], "protocol_versions": {}}, "comparison_hash": "b8cfe64df86ef92c7aa383c99b1ce6ddc0c195b32004bf9a4ec0ea46bb7e9ba8", "manual_language": "zh", "runtime_verified": false}, "19": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "postgres_fdw_handler"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "37"}, {"label": "\u6570\u636e\u6e90", "value": "\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u626b\u63cf\u6570\u636e\u884c", "callback": "IterateForeignScan", "implementation": "postgresIterateForeignScan"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "INSERT", "callback": "ExecForeignInsert", "implementation": "postgresExecForeignInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "UPDATE", "callback": "ExecForeignUpdate", "implementation": "postgresExecForeignUpdate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "DELETE", "callback": "ExecForeignDelete", "implementation": "postgresExecForeignDelete"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "ExecForeignTruncate", "implementation": "postgresExecForeignTruncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u8fde\u63a5\u8def\u5f84\u4e0b\u63a8", "callback": "GetForeignJoinPaths", "implementation": "postgresGetForeignJoinPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u4e0a\u5c42\u8def\u5f84\uff0c\u5305\u62ec\u805a\u5408", "callback": "GetForeignUpperPaths", "implementation": "postgresGetForeignUpperPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6279\u91cf\u63d2\u5165", "callback": "ExecForeignBatchInsert", "implementation": "postgresExecForeignBatchInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f02\u6b65\u8ffd\u52a0\u6267\u884c", "callback": "ForeignAsyncRequest", "implementation": "postgresForeignAsyncRequest"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5bfc\u5165\u6a21\u5f0f", "callback": "ImportForeignSchema", "implementation": "postgresImportForeignSchema"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "schema_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002"}, {"name": "table_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "column_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "use_remote_estimate", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 postgres_fdw \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b EXPLAIN \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "fdw_startup_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "fdw_tuple_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a 0.2 \u3002"}, {"name": "analyze_sampling", "definition": "\u6b64\u9009\u9879\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u51b3\u5b9a\u5916\u90e8\u8868 ANALYZE \u662f\u5728\u8fdc\u7a0b\u91c7\u6837\uff0c\u8fd8\u662f\u8bfb\u53d6\u5e76\u4f20\u8f93\u5168\u90e8\u6570\u636e\u540e\u5728\u672c\u5730\u91c7\u6837\u3002\u652f\u6301 off\u3001random\u3001system\u3001bernoulli \u548c auto\u3002off \u7981\u7528\u8fdc\u7a0b\u91c7\u6837\uff0c\u5168\u90e8\u6570\u636e\u4f1a\u4f20\u5230\u672c\u5730\u540e\u91c7\u6837\u3002random \u4f7f\u7528 random() \u51fd\u6570\u5728\u8fdc\u7a0b\u9009\u62e9\u8fd4\u56de\u884c\uff1bsystem \u548c bernoulli \u4f7f\u7528\u540c\u540d\u5185\u7f6e TABLESAMPLE \u65b9\u6cd5\u3002random \u9002\u7528\u4e8e\u6240\u6709\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\uff0cTABLESAMPLE \u4ec5\u4ece 9.5 \u8d77\u652f\u6301\u3002\u9ed8\u8ba4\u503c auto \u81ea\u52a8\u9009\u62e9\u63a8\u8350\u65b9\u6cd5\uff0c\u76ee\u524d\u6839\u636e\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\u9009\u62e9 bernoulli \u6216 random\u3002"}, {"name": "import_stats", "definition": "\u6b64\u9009\u9879\u53ef\u4ee5\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u51b3\u5b9a\u5bf9\u5916\u90e8\u8868\u6267\u884c ANALYZE \u65f6\uff0c\u662f\u5426\u6539\u4e3a\u5c1d\u8bd5\u83b7\u53d6\u8fdc\u7a0b\u8868\u7684\u73b0\u6709\u7edf\u8ba1\u4fe1\u606f\uff0c\u5e76\u5c06\u5176\u76f4\u63a5\u5bfc\u5165\u672c\u5730\u670d\u52a1\u5668\uff08\u4e0d\u5e94\u7528\u5916\u90e8\u8868\u5217\u7684 n_distinct \u9009\u9879\uff09\u3002\u5982\u679c\u5c1d\u8bd5\u5931\u8d25\uff0c\u5219\u901a\u8fc7\u5bf9\u5916\u90e8\u8868\u8fdb\u884c\u884c\u91c7\u6837\u6765\u6536\u96c6\u7edf\u8ba1\u4fe1\u606f\u3002\u6b64\u9009\u9879\u4ec5\u9002\u7528\u4e8e\u80fd\u591f\u5177\u6709\u5e38\u89c4\u7edf\u8ba1\u4fe1\u606f\u7684\u8fdc\u7a0b\u8868\uff08\u975e\u7ee7\u627f\u8868\u548c\u7269\u5316\u89c6\u56fe\uff09\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c \u7528\u6237\u6709\u8d23\u4efb \u786e\u4fdd\u8fdc\u7a0b\u8868\u7684\u73b0\u6709\u7edf\u8ba1\u4fe1\u606f\u662f\u6700\u65b0\u7684\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002 \u5982\u679c\u5916\u90e8\u8868\u662f\u5206\u533a\u8868\u7684\u4e00\u4e2a\u5206\u533a\uff0c\u90a3\u4e48\u65e0\u8bba\u6b64\u8bbe\u7f6e\u5982\u4f55\uff0c\u5206\u6790\u6574\u4e2a\u5206\u533a\u8868\u65f6\u4ecd\u4f1a\u5bf9\u8be5\u5916\u90e8\u8868\u8fdb\u884c\u884c\u91c7\u6837\uff1b\u4e0d\u8fc7\uff0c\u5982\u679c\u542f\u7528\u4e86\u6b64\u9009\u9879\uff0c\u76f4\u63a5\u5206\u6790\u8be5\u5916\u90e8\u8868\u65f6\u4f1a\u4f18\u5148\u5c1d\u8bd5\u83b7\u53d6\u5e76\u5bfc\u5165\u8fdc\u7a0b\u7edf\u8ba1\u4fe1\u606f\u3002 \u6ce8\u610f\uff0c\u6b64\u9009\u9879\u76ee\u524d\u4e0d\u652f\u6301\u8fdc\u7a0b\u8868\u53c2\u4e0e\u7ee7\u627f\uff08\u6216\u66fe\u7ecf\u53c2\u4e0e\u7ee7\u627f\uff09\u7684\u60c5\u51b5\u3002\u8fd9\u662f\u5b9e\u73b0\u4e0a\u7684\u9650\u5236\uff0c\u53ef\u80fd\u4f1a\u5728\u5c06\u6765\u7684\u7248\u672c\u4e2d\u4fee\u590d\u3002"}, {"name": "extensions", "definition": "\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 PostgreSQL \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002 \u4f7f\u7528 extensions \u9009\u9879\u65f6\uff0c \u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002"}, {"name": "fetch_size", "definition": "\u8be5\u9009\u9879\u6307\u5b9a postgres_fdw \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "batch_size", "definition": "\u6b64\u9009\u9879\u6307\u5b9a postgres_fdw \u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u5e94\u63d2\u5165\u7684\u884c\u6570\uff0c\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u8868\u7ea7\u8bbe\u7f6e\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u8bbe\u7f6e\uff0c\u9ed8\u8ba4\u503c\u4e3a 1\u3002\u5b9e\u9645\u4e00\u6b21\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u548c batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u4e00\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570\u4e58\u4ee5 batch_size \u8d85\u51fa\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u62a5\u9519\u3002\u6b64\u9009\u9879\u4e5f\u9002\u7528\u4e8e\u5411\u5916\u90e8\u8868\u6267\u884c COPY\uff0c\u5b9e\u9645\u4e00\u6b21\u590d\u5236\u7684\u884c\u6570\u6309\u7c7b\u4f3c\u65b9\u5f0f\u786e\u5b9a\uff0c\u4f46\u53d7 COPY \u5b9e\u73b0\u9650\u5236\uff0c\u6700\u591a\u4e3a 1000 \u884c\u3002"}, {"name": "async_capable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002 \u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c postgres_fdw \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002 \u5373\u4f7f Append \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 postgres_fdw \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002"}, {"name": "parallel_commit", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "parallel_abort", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u4e2d\u6b62\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u4e2d\u6b62\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "updatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 INSERT \u3001 UPDATE \u548c DELETE \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c information_schema \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 postgres_fdw \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002"}, {"name": "truncatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 TRUNCATE \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002"}, {"name": "import_collate", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 COLLATE \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002 \u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a true \uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 COLLATE \"default\" \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002"}, {"name": "import_default", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 DEFAULT \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b nextval() \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_generated", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 GENERATED \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_not_null", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 NOT NULL \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002"}, {"name": "keep_connections", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a on \u3002\u5982\u679c\u8bbe\u7f6e\u4e3a off \uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002"}, {"name": "use_scram_passthrough", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u5728\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\u65f6\u662f\u5426\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u3002\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u6307\u5b9a\u3002\u7528\u6237\u6620\u5c04\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5916\u90e8\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\u3002\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u65f6\uff0c postgres_fdw \u4f7f\u7528\u7ecf SCRAM Hash \u5904\u7406\u7684\u51ed\u636e\uff0c\u800c\u4e0d\u662f\u660e\u6587\u7528\u6237\u5bc6\u7801\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5728 PostgreSQL \u7cfb\u7edf\u76ee\u5f55\u4e2d\u5b58\u50a8\u660e\u6587\u7528\u6237\u5bc6\u7801\u3002 \u8981\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\uff1a \u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8bf7\u6c42 scram-sha-256 \u8ba4\u8bc1\u65b9\u6cd5\uff1b\u5426\u5219\u8fde\u63a5\u5c06\u5931\u8d25\u3002 \u8fdc\u7a0b\u670d\u52a1\u5668\u53ef\u4ee5\u662f\u4efb\u4f55\u652f\u6301 SCRAM \u7684 PostgreSQL \u7248\u672c\u3002\u5bf9 use_scram_passthrough \u7684\u652f\u6301\u53ea\u8981\u6c42\u5ba2\u6237\u7aef\u4e00\u4fa7\uff08FDW \u4fa7\uff09\u5177\u5907\u3002 \u7528\u6237\u6620\u5c04\u5bc6\u7801\u4e0d\u4f1a\u88ab\u4f7f\u7528\u3002 \u8fd0\u884c postgres_fdw \u7684\u670d\u52a1\u5668\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u5fc5\u987b\u9488\u5bf9\u7528\u4e8e\u5728 postgres_fdw \u4e0a\u8ba4\u8bc1\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8be5\u7528\u6237\uff0c\u62e5\u6709\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\uff08\u52a0\u5bc6\u5bc6\u7801\uff09\uff08\u76d0\u503c\u548c\u8fed\u4ee3\u6b21\u6570\u90fd\u5fc5\u987b\u76f8\u540c\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5bc6\u7801\u76f8\u540c\uff09\u3002 \u56e0\u800c\uff0c\u5982\u679c\u8981\u5efa\u7acb\u5230\u591a\u4e2a\u4e3b\u673a\u7684 FDW \u8fde\u63a5\uff0c\u4f8b\u5982\u7528\u4e8e\u5206\u533a\u5916\u90e8\u8868\u6216\u5206\u7247\uff0c\u5219\u6240\u6709\u4e3b\u673a\u90fd\u5fc5\u987b\u4e3a\u76f8\u5173\u7528\u6237\u4fdd\u5b58\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\u3002 \u53d1\u8d77\u5bf9\u5916 FDW \u8fde\u63a5\u7684 PostgreSQL \u5b9e\u4f8b\u4e2d\uff0c\u5f53\u524d\u4f1a\u8bdd\u7684\u4f20\u5165\u5ba2\u6237\u7aef\u8fde\u63a5\u4e5f\u5fc5\u987b\u4f7f\u7528 SCRAM \u8ba4\u8bc1\u3002\uff08\u56e0\u6b64\u79f0\u4e3a \u201c \u900f\u4f20 \u201d \uff1aSCRAM \u5fc5\u987b\u5728\u8fdb\u5165\u548c\u79bb\u5f00\u65f6\u90fd\u88ab\u4f7f\u7528\u3002\uff09\u8fd9\u662f SCRAM \u534f\u8bae\u7684\u6280\u672f\u8981\u6c42\u3002 \u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0d\u5f97\u7528\u4e8e\u8ba2\u9605\u8fde\u63a5\uff08\u89c1 \u7b2c F.40.4 \u8282 \uff09\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}], "related": [{"url": "/wiki/catalog/pg_foreign_data_wrapper/?v=19", "label": "Foreign-data wrapper \u7cfb\u7edf\u76ee\u5f55"}, {"url": "/e/postgres_fdw/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/plan/foreign-scan/?v=19", "label": "Foreign Scan \u8ba1\u5212\u8282\u70b9"}], "release": {"ref": "PostgreSQL 19beta4 source archive", "label": "19beta4", "major": "19", "channel": "preview", "revision": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86", "source_url": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/19/postgres-fdw.html", "path": "postgres-fdw.html", "label": "PostgreSQL 19 English manual", "sha256": "b54c9019efc9422022fac729e2c7a784cef59246af38ea90a385994b42818519", "language": "en", "original_url": "/docs/19/postgres-fdw.html"}, {"url": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "line": 650, "path": "contrib/postgres_fdw/postgres_fdw.c", "label": "contrib/postgres_fdw/postgres_fdw.c:650", "sha256": "fc9ada0efad0c84b8cbd8e2a1d788853b7e060cf22489e4724a78da67348333e", "archive_sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u5f02\u6b65\u6267\u884c\u9009\u9879", "paragraphs": ["postgres_fdw \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c Append \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406\u9009\u9879", "paragraphs": ["\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0c\u5728 postgres_fdw \u4e2d\uff0c\u4e8b\u52a1\u662f\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u6765\u7ba1\u7406\u7684\uff0c\u5b50\u4e8b\u52a1\u5219\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u6765\u7ba1\u7406\u3002\u5f53\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c postgres_fdw \u4f1a\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c postgres_fdw \u4e5f\u4f1a\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u53ef\u4ee5\u6539\u5584\u6027\u80fd\uff1a", "\u5982\u679c\u542f\u7528\u4e86\u8fd9\u4e9b\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002", "\u542f\u7528\u8fd9\u4e9b\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406", "paragraphs": ["\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c postgres_fdw \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002", "\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a SERIALIZABLE \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \uff1b\u5426\u5219\u4f7f\u7528 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 SERIALIZABLE \u6216 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e READ COMMITTED \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 PostgreSQL \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002", "\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u4ee5\u4e0e\u672c\u5730\u4e8b\u52a1\u76f8\u540c\u7684\u8bfb\u5199\u6a21\u5f0f\u6253\u5f00\uff1a\u5982\u679c\u672c\u5730\u4e8b\u52a1\u662f READ ONLY \uff0c\u5219\u8fdc\u7a0b\u4e8b\u52a1\u4ee5 READ ONLY \u6a21\u5f0f\u6253\u5f00\uff1b\u5426\u5219\u5b83\u4ee5 READ WRITE \u6a21\u5f0f\u6253\u5f00\u3002\uff08\u8fd9\u4e00\u89c4\u5219\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\uff09\u8bf7\u6ce8\u610f\uff0c\u8fd9\u5e76\u4e0d\u4f1a\u963b\u6b62\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u767b\u5f55\u89e6\u53d1\u5668\u5199\u5165\u6570\u636e\u3002", "\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u4ee5\u4e0e\u672c\u5730\u4e8b\u52a1\u76f8\u540c\u7684\u53ef\u5ef6\u8fdf\u6a21\u5f0f\u6253\u5f00\uff1a\u5982\u679c\u672c\u5730\u4e8b\u52a1\u662f DEFERRABLE \uff0c\u5219\u8fdc\u7a0b\u4e8b\u52a1\u4ee5 DEFERRABLE \u6a21\u5f0f\u6253\u5f00\uff1b\u5426\u5219\u5b83\u4ee5 NOT DEFERRABLE \u6a21\u5f0f\u6253\u5f00\u3002", "\u8bf7\u6ce8\u610f\uff0c postgres_fdw \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002"]}, {"title": "\u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316", "paragraphs": ["postgres_fdw \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 WHERE \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 WHERE \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 extensions \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f IMMUTABLE \u3002\u5bf9\u4e8e UPDATE \u6216 DELETE \u67e5\u8be2\uff0c postgres_fdw \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 WHERE \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 BEFORE \u6216 AFTER \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 CHECK OPTION \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 UPDATE \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001 IMMUTABLE \u64cd\u4f5c\u7b26\u6216 IMMUTABLE \u51fd\u6570\u3002", "\u5f53 postgres_fdw \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 JOIN \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 WHERE \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002", "\u53ef\u4ee5\u4f7f\u7528 EXPLAIN VERBOSE \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002"]}, {"title": "\u8de8\u7248\u672c\u517c\u5bb9\u6027", "paragraphs": ["postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002", "\u4e00\u4e2a\u9650\u5236\u662f\uff0cpostgres_fdw \u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u6240\u7528\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u901a\u8fc7\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\uff0c\u4ee5\u6b64\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002", "\u53e6\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5728\u5916\u90e8\u8868\u4e0a\u6267\u884c INSERT \u8bed\u53e5\u5e76\u5e26\u6709 ON CONFLICT DO NOTHING \u5b50\u53e5\u65f6\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8fd0\u884c PostgreSQL 9.5 \u6216\u66f4\u9ad8\u7248\u672c\uff0c\u56e0\u4e3a\u66f4\u65e9\u7248\u672c\u4e0d\u652f\u6301\u6b64\u7279\u6027\u3002"]}, {"code": "{\n\tFdwRoutine *routine = makeNode(FdwRoutine);\n\n\t/* Functions for scanning foreign tables */\n\troutine->GetForeignRelSize = postgresGetForeignRelSize;\n\troutine->GetForeignPaths = postgresGetForeignPaths;\n\troutine->GetForeignPlan = postgresGetForeignPlan;\n\troutine->BeginForeignScan = postgresBeginForeignScan;\n\troutine->IterateForeignScan = postgresIterateForeignScan;\n\troutine->ReScanForeignScan = postgresReScanForeignScan;\n\troutine->EndForeignScan = postgresEndForeignScan;\n\n\t/* Functions for updating foreign tables */\n\troutine->AddForeignUpdateTargets = postgresAddForeignUpdateTargets;\n\troutine->PlanForeignModify = postgresPlanForeignModify;\n\troutine->BeginForeignModify = postgresBeginForeignModify;\n\troutine->ExecForeignInsert = postgresExecForeignInsert;\n\troutine->ExecForeignBatchInsert = postgresExecForeignBatchInsert;\n\troutine->GetForeignModifyBatchSize = postgresGetForeignModifyBatchSize;\n\troutine->ExecForeignUpdate = postgresExecForeignUpdate;\n\troutine->ExecForeignDelete = postgresExecForeignDelete;\n\troutine->EndForeignModify = postgresEndForeignModify;\n\troutine->BeginForeignInsert = postgresBeginForeignInsert;\n\troutine->EndForeignInsert = postgresEndForeignInsert;\n\troutine->IsForeignRelUpdatable = postgresIsForeignRelUpdatable;\n\troutine->PlanDirectModify = postgresPlanDirectModify;\n\troutine->BeginDirectModify = postgresBeginDirectModify;\n\troutine->IterateDirectModify = postgresIterateDirectModify;\n\troutine->EndDirectModify = postgresEndDirectModify;\n\n\t/* Function for EvalPlanQual rechecks */\n\troutine->RecheckForeignScan = postgresRecheckForeignScan;\n\t/* Support functions for EXPLAIN */\n\troutine->ExplainForeignScan = postgresExplainForeignScan;\n\troutine->ExplainForeignModify = postgresExplainForeignModify;\n\troutine->ExplainDirectModify = postgresExplainDirectModify;\n\n\t/* Support function for TRUNCATE */\n\troutine->ExecForeignTruncate = postgresExecForeignTruncate;\n\n\t/* Support functions for ANALYZE */\n\troutine->AnalyzeForeignTable = postgresAnalyzeForeignTable;\n\troutine->ImportForeignStatistics = postgresImportForeignStatistics;\n\n\t/* Support functions for IMPORT FOREIGN SCHEMA */\n\troutine->ImportForeignSchema = postgresImportForeignSchema;\n\n\t/* Support functions for join push-down */\n\troutine->GetForeignJoinPaths = postgresGetForeignJoinPaths;\n\n\t/* Support functions for upper relation push-down */\n\troutine->GetForeignUpperPaths = postgresGetForeignUpperPaths;\n\n\t/* Support functions for asynchronous execution */\n\troutine->IsForeignPathAsyncCapable = postgresIsForeignPathAsyncCapable;\n\troutine->ForeignAsyncRequest = postgresForeignAsyncRequest;\n\troutine->ForeignAsyncConfigureWait = postgresForeignAsyncConfigureWait;\n\troutine->ForeignAsyncNotify = postgresForeignAsyncNotify;\n\n\tPG_RETURN_POINTER(routine);\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ImportForeignStatistics": "postgresImportForeignStatistics", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "description": ["\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002"], "manual_html": "<div class=\"sect1\" id=\"POSTGRES-FDW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">F.40.\u00a0postgres_fdw \u2014 \u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u6a21\u5757\u63d0\u4f9b\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668 <code class=\"literal\">postgres_fdw</code>\uff0c\u53ef\u7528\u4e8e\u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u672c\u6a21\u5757\u63d0\u4f9b\u7684\u529f\u80fd\u4e0e\u8f83\u65e7\u7684<a class=\"xref\" href=\"/docs/19/dblink.html\" title=\"F.11.\u00a0dblink \u2014 \u8fde\u63a5\u5230\u5176\u4ed6 PostgreSQL \u6570\u636e\u5e93\">dblink</a>\u6a21\u5757\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u91cd\u53e0\u3002\u4f46 <code class=\"filename\">postgres_fdw</code> \u4e3a\u8bbf\u95ee\u8fdc\u7a0b\u8868\u63d0\u4f9b\u4e86\u66f4\u900f\u660e\u4e14\u7b26\u5408\u6807\u51c6\u7684\u8bed\u6cd5\uff0c\u5e76\u4e14\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u6027\u80fd\u66f4\u597d\u3002</p>\n<p lang=\"zh\">\u8981\u51c6\u5907\u901a\u8fc7 <code class=\"filename\">postgres_fdw</code> \u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee\uff1a</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5b89\u88c5 <code class=\"filename\">postgres_fdw</code> \u6269\u5c55\uff0c\u53ef\u4f7f\u7528<a class=\"xref\" href=\"/docs/19/sql-createextension.html\" title=\"CREATE EXTENSION\"><span class=\"refentrytitle\">CREATE EXTENSION</span></a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u4f7f\u7528<a class=\"xref\" href=\"/docs/19/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u5bf9\u8c61\uff0c\u7528\u6765\u8868\u793a\u6bcf\u4e2a\u8981\u8fde\u63a5\u7684\u8fdc\u7a0b\u6570\u636e\u5e93\u3002\u5c06\u9664 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u4e4b\u5916\u7684\u8fde\u63a5\u4fe1\u606f\u6307\u5b9a\u4e3a\u670d\u52a1\u5668\u5bf9\u8c61\u7684\u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u9700\u8981\u83b7\u51c6\u8bbf\u95ee\u5404\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u7528\u6237\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/19/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u521b\u5efa\u7528\u6237\u6620\u5c04\u3002\u5c06\u8981\u4f7f\u7528\u7684\u8fdc\u7a0b\u7528\u6237\u540d\u548c\u5bc6\u7801\u6307\u5b9a\u4e3a\u7528\u6237\u6620\u5c04\u7684 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u8981\u8bbf\u95ee\u7684\u8fdc\u7a0b\u8868\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/19/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u6216<a class=\"xref\" href=\"/docs/19/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5916\u90e8\u8868\u7684\u5217\u5fc5\u987b\u4e0e\u88ab\u5f15\u7528\u7684\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u5728\u5916\u90e8\u8868\u5bf9\u8c61\u7684\u9009\u9879\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8fdc\u7a0b\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0e\u8fdc\u7a0b\u8868\u4e0d\u540c\u7684\u8868\u540d\u548c/\u6216\u5217\u540d\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\">\u73b0\u5728\uff0c\u53ea\u9700\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">SELECT</code>\uff0c\u5373\u53ef\u8bbf\u95ee\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u4e2d\u5b58\u50a8\u7684\u6570\u636e\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code>\u3001<code class=\"command\">COPY</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4fee\u6539\u8fdc\u7a0b\u8868\u3002\uff08\u5f53\u7136\uff0c\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\u7684\u8fdc\u7a0b\u7528\u6237\u5fc5\u987b\u62e5\u6709\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u6743\u9650\u3002\uff09</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5728\u8bbf\u95ee\u6216\u4fee\u6539\u8fdc\u7a0b\u8868\u65f6\uff0c<code class=\"literal\">ONLY</code> \u9009\u9879\u5728 <code class=\"command\">SELECT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4e2d\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n<p lang=\"zh\">postgres_fdw \u76ee\u524d\u4e0d\u652f\u6301\u5e26 ON CONFLICT DO SELECT/UPDATE \u5b50\u53e5\u7684 INSERT\u3002\u4e0d\u8fc7\uff0c\u652f\u6301 ON CONFLICT DO NOTHING\uff0c\u524d\u63d0\u662f\u4e0d\u6307\u5b9a\u552f\u4e00\u7d22\u5f15\u63a8\u65ad\u6761\u4ef6\u3002postgres_fdw \u8fd8\u652f\u6301\u5728\u5206\u533a\u8868\u4e0a\u6267\u884c UPDATE \u6240\u89e6\u53d1\u7684\u884c\u79fb\u52a8\uff0c\u4f46\u76ee\u524d\u4e0d\u652f\u6301\u4ee5\u4e0b\u60c5\u51b5\uff1a\u7528\u4e8e\u63a5\u6536\u79fb\u5165\u884c\u7684\u8fdc\u7aef\u5206\u533a\uff0c\u540c\u65f6\u4e5f\u662f\u540c\u4e00\u547d\u4ee4\u4e2d\u5176\u4ed6\u4f4d\u7f6e\u5c06\u8981\u66f4\u65b0\u7684 UPDATE \u76ee\u6807\u5206\u533a\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5c06\u5916\u90e8\u8868\u7684\u5217\u58f0\u660e\u4e3a\u4e0e\u88ab\u5f15\u7528\u8fdc\u7a0b\u8868\u7684\u5bf9\u5e94\u5217\u5177\u6709\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u5728\u9002\u7528\u65f6\u5177\u6709\u76f8\u540c\u7684\u6392\u5e8f\u89c4\u5219\u3002\u5c3d\u7ba1 <code class=\"filename\">postgres_fdw</code> \u76ee\u524d\u5728\u6309\u9700\u6267\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u9762\u76f8\u5f53\u5bbd\u5bb9\uff0c\u4f46\u5f53\u7c7b\u578b\u6216\u6392\u5e8f\u89c4\u5219\u4e0d\u5339\u914d\u65f6\uff0c\u4ecd\u53ef\u80fd\u51fa\u73b0\u4ee4\u4eba\u610f\u5916\u7684\u8bed\u4e49\u5f02\u5e38\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5bf9\u67e5\u8be2\u6761\u4ef6\u7684\u89e3\u91ca\u53ef\u80fd\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5916\u90e8\u8868\u7684\u58f0\u660e\u53ef\u4ee5\u6bd4\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u5c11\u4e00\u4e9b\u5217\uff0c\u6216\u8005\u4f7f\u7528\u4e0d\u540c\u7684\u5217\u987a\u5e8f\u3002\u4e0e\u8fdc\u7a0b\u8868\u5217\u7684\u5339\u914d\u662f\u6309\u540d\u79f0\u800c\u4e0d\u662f\u6309\u4f4d\u7f6e\u8fdb\u884c\u7684\u3002</p>\n<div class=\"sect2\" id=\"POSTGRES-FDW-OPTIONS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-OPTIONS\">F.40.1. postgres_fdw \u7684 FDW \u9009\u9879</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-CONNECTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.1.\u00a0\u8fde\u63a5\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528 <span class=\"application\">libpq</span> \u5728\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u63a5\u53d7\u7684\u76f8\u540c\u9009\u9879\uff0c\u8be6\u89c1<a class=\"xref\" href=\"/docs/19/libpq-connect.html#LIBPQ-PARAMKEYWORDS\" title=\"32.1.2.\u00a0\u53c2\u6570\u5173\u952e\u8bcd\">\u7b2c\u00a032.1.2\u00a0\u8282</a>\uff1b\u4f46\u4ee5\u4e0b\u9009\u9879\u4e0d\u5141\u8bb8\u4f7f\u7528\uff0c\u6216\u4f1a\u88ab\u7279\u6b8a\u5904\u7406\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">user</code>\u3001<code class=\"literal\">password</code> \u548c <code class=\"literal\">sslpassword</code>\uff08\u8bf7\u6539\u4e3a\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\uff0c\u6216\u4f7f\u7528\u670d\u52a1\u6587\u4ef6\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">client_encoding</code>\uff08\u4f1a\u6839\u636e\u672c\u5730\u670d\u52a1\u5668\u7f16\u7801\u81ea\u52a8\u8bbe\u7f6e\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">application_name</code> \u53ef\u4ee5\u51fa\u73b0\u5728\u8fde\u63a5\u9009\u9879\u548c<a class=\"xref\" href=\"/docs/19/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u4e2d\u7684<span class=\"emphasis\"><em>\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c<code class=\"varname\">postgres_fdw.application_name</code> \u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002\u4e0e <span class=\"application\">libpq</span> \u4e0d\u540c\uff0c<code class=\"filename\">postgres_fdw</code> \u5141\u8bb8 <code class=\"varname\">application_name</code> \u5305\u542b<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/19/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">fallback_application_name</code>\uff08\u59cb\u7ec8\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres_fdw</code>\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">sslkey</code> \u548c <code class=\"literal\">sslcert</code> \u53ef\u4ee5\u51fa\u73b0\u5728<span class=\"emphasis\"><em>\u8fde\u63a5\u9009\u9879\u3001\u7528\u6237\u6620\u5c04\u4e2d\u7684\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c\u7528\u6237\u6620\u5c04\u8bbe\u7f6e\u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002</p>\n</li>\n</ul>\n</div>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u521b\u5efa\u6216\u4fee\u6539\u5e26\u6709 <code class=\"literal\">sslcert</code> \u6216 <code class=\"literal\">sslkey</code> \u8bbe\u7f6e\u7684\u7528\u6237\u6620\u5c04\u3002</p>\n<p lang=\"zh\">\u975e\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5bc6\u7801\u8ba4\u8bc1\u6216\u4f7f\u7528 GSSAPI \u59d4\u6d3e\u51ed\u636e\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\uff0c\u56e0\u6b64\u5728\u9700\u8981\u5bc6\u7801\u8ba4\u8bc1\u7684\u573a\u666f\u4e2d\uff0c\u5e94\u4e3a\u5c5e\u4e8e\u975e\u8d85\u7ea7\u7528\u6237\u7684\u7528\u6237\u6620\u5c04\u6307\u5b9a <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u7528\u6237\u6620\u5c04\u9009\u9879 <code class=\"literal\">password_required 'false'</code> \u6309\u7528\u6237\u6620\u5c04\u5355\u72ec\u8986\u76d6\u6b64\u68c0\u67e5\uff0c\u4f8b\u5982\uff1a</p>\n<pre class=\"programlisting\">ALTER USER MAPPING FOR some_non_superuser SERVER loopback_nopw\nOPTIONS (ADD password_required 'false');\n</pre>\n<p lang=\"zh\">\u4e3a\u4e86\u9632\u6b62\u975e\u7279\u6743\u7528\u6237\u5229\u7528 postgres \u670d\u52a1\u5668\u6240\u8fd0\u884c\u7684 unix \u7528\u6237\u7684\u8ba4\u8bc1\u6743\u9650\u63d0\u5347\u5230\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u5728\u7528\u6237\u6620\u5c04\u4e0a\u8bbe\u7f6e\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u5fc5\u987b\u8c28\u614e\uff0c\u786e\u4fdd\u8fd9\u4e0d\u4f1a\u4f7f\u6620\u5c04\u7528\u6237\u80fd\u591f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\u5230\u6620\u5c04\u7684\u6570\u636e\u5e93\uff0c\u53c2\u89c1 CVE-2007-3278 \u548c CVE-2007-6601\u3002\u4e0d\u8981\u4e3a public \u89d2\u8272\u8bbe\u7f6e password_required=false\u3002\u8bf7\u6ce8\u610f\uff0c\u6620\u5c04\u7528\u6237\u53ef\u80fd\u4f7f\u7528\u8fd0\u884c postgres \u670d\u52a1\u5668\u7684\u7cfb\u7edf\u7528\u6237\u7684 Unix \u4e3b\u76ee\u5f55\u4e2d\u7684\u4efb\u4f55\u5ba2\u6237\u7aef\u8bc1\u4e66\u3001.pgpass\u3001.pg_service.conf \u7b49\u3002\uff08\u67e5\u627e\u4e3b\u76ee\u5f55\u7684\u89c4\u5219\u8be6\u89c1\u7b2c 32.16 \u8282\u3002\uff09\u4ed6\u4eec\u4e5f\u53ef\u80fd\u5229\u7528 peer\u3001ident \u7b49\u8ba4\u8bc1\u65b9\u5f0f\u6388\u4e88\u7684\u4efb\u4f55\u4fe1\u4efb\u5173\u7cfb\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-OBJECT-NAME\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.2.\u00a0\u5bf9\u8c61\u540d\u79f0\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u9009\u9879\u53ef\u7528\u4e8e\u63a7\u5236\u53d1\u9001\u5230\u8fdc\u7a0b <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u7684 SQL \u8bed\u53e5\u4e2d\u6240\u4f7f\u7528\u7684\u540d\u79f0\u3002\u5f53\u521b\u5efa\u5916\u90e8\u8868\u65f6\u6240\u7528\u7684\u540d\u79f0\u4e0e\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u7684\u540d\u79f0\u4e0d\u540c\u65f6\uff0c\u5c31\u9700\u8981\u8fd9\u4e9b\u9009\u9879\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">schema_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">table_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">column_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-COST-ESTIMATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.3.\u00a0\u4ee3\u4ef7\u4f30\u7b97\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u901a\u8fc7\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u67e5\u8be2\u6765\u83b7\u53d6\u8fdc\u7a0b\u6570\u636e\uff0c\u56e0\u6b64\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u626b\u63cf\u5916\u90e8\u8868\u7684\u4f30\u8ba1\u4ee3\u4ef7\u5e94\u5f53\u7b49\u4e8e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b8c\u6210\u8be5\u64cd\u4f5c\u7684\u4ee3\u4ef7\uff0c\u518d\u52a0\u4e0a\u4e00\u4e9b\u901a\u4fe1\u5f00\u9500\u3002\u83b7\u5f97\u8fd9\u79cd\u4f30\u7b97\u6700\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u662f\u5411\u8fdc\u7a0b\u670d\u52a1\u5668\u8be2\u95ee\uff0c\u518d\u628a\u5f00\u9500\u52a0\u4e0a\u53bb\uff1b\u4f46\u5bf9\u4e8e\u7b80\u5355\u67e5\u8be2\uff0c\u4e3a\u4e86\u53d6\u5f97\u4ee3\u4ef7\u4f30\u7b97\u800c\u989d\u5916\u53d1\u9001\u4e00\u6b21\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ef\u80fd\u5e76\u4e0d\u5212\u7b97\u3002\u56e0\u6b64 <code class=\"filename\">postgres_fdw</code> \u63d0\u4f9b\u4ee5\u4e0b\u9009\u9879\u6765\u63a7\u5236\u4ee3\u4ef7\u4f30\u7b97\u7684\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">use_remote_estimate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b <code class=\"command\">EXPLAIN</code> \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_startup_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_tuple_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">0.2</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u771f\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4ece\u8fdc\u7a0b\u670d\u52a1\u5668\u83b7\u53d6\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u5047\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u5728\u672c\u5730\u6267\u884c\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u518d\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u9664\u975e\u6709\u8fdc\u7a0b\u8868\u7edf\u8ba1\u4fe1\u606f\u7684\u672c\u5730\u526f\u672c\u53ef\u7528\uff0c\u5426\u5219\u8fd9\u79cd\u672c\u5730\u4f30\u7b97\u4e0d\u592a\u53ef\u80fd\u975e\u5e38\u51c6\u786e\u3002\u66f4\u65b0\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c\u662f\u5728\u5916\u90e8\u8868\u4e0a\u8fd0\u884c<a class=\"xref\" href=\"/docs/19/sql-analyze.html\" title=\"ANALYZE\"><span class=\"refentrytitle\">ANALYZE</span></a>\uff1b\u8fd9\u6837\u4f1a\u626b\u63cf\u8fdc\u7a0b\u8868\uff0c\u7136\u540e\u50cf\u5bf9\u5f85\u672c\u5730\u8868\u4e00\u6837\u8ba1\u7b97\u5e76\u5b58\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u4fdd\u7559\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u8fdc\u7a0b\u8868\u6bcf\u6b21\u67e5\u8be2\u7684\u89c4\u5212\u5f00\u9500\uff1b\u4f46\u5982\u679c\u8fdc\u7a0b\u8868\u7ecf\u5e38\u66f4\u65b0\uff0c\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u5f88\u5feb\u5c31\u4f1a\u8fc7\u65f6\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd <code class=\"command\">ANALYZE</code> \u64cd\u4f5c\u7684\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">analyze_sampling</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u51b3\u5b9a\u5916\u90e8\u8868 ANALYZE \u662f\u5728\u8fdc\u7a0b\u91c7\u6837\uff0c\u8fd8\u662f\u8bfb\u53d6\u5e76\u4f20\u8f93\u5168\u90e8\u6570\u636e\u540e\u5728\u672c\u5730\u91c7\u6837\u3002\u652f\u6301 off\u3001random\u3001system\u3001bernoulli \u548c auto\u3002off \u7981\u7528\u8fdc\u7a0b\u91c7\u6837\uff0c\u5168\u90e8\u6570\u636e\u4f1a\u4f20\u5230\u672c\u5730\u540e\u91c7\u6837\u3002random \u4f7f\u7528 random() \u51fd\u6570\u5728\u8fdc\u7a0b\u9009\u62e9\u8fd4\u56de\u884c\uff1bsystem \u548c bernoulli \u4f7f\u7528\u540c\u540d\u5185\u7f6e TABLESAMPLE \u65b9\u6cd5\u3002random \u9002\u7528\u4e8e\u6240\u6709\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\uff0cTABLESAMPLE \u4ec5\u4ece 9.5 \u8d77\u652f\u6301\u3002\u9ed8\u8ba4\u503c auto \u81ea\u52a8\u9009\u62e9\u63a8\u8350\u65b9\u6cd5\uff0c\u76ee\u524d\u6839\u636e\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\u9009\u62e9 bernoulli \u6216 random\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_stats</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ef\u4ee5\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u51b3\u5b9a\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">ANALYZE</code> \u65f6\uff0c\u662f\u5426\u6539\u4e3a\u5c1d\u8bd5\u83b7\u53d6\u8fdc\u7a0b\u8868\u7684\u73b0\u6709\u7edf\u8ba1\u4fe1\u606f\uff0c\u5e76\u5c06\u5176\u76f4\u63a5\u5bfc\u5165\u672c\u5730\u670d\u52a1\u5668\uff08\u4e0d\u5e94\u7528\u5916\u90e8\u8868\u5217\u7684 <code class=\"literal\">n_distinct</code> \u9009\u9879\uff09\u3002\u5982\u679c\u5c1d\u8bd5\u5931\u8d25\uff0c\u5219\u901a\u8fc7\u5bf9\u5916\u90e8\u8868\u8fdb\u884c\u884c\u91c7\u6837\u6765\u6536\u96c6\u7edf\u8ba1\u4fe1\u606f\u3002\u6b64\u9009\u9879\u4ec5\u9002\u7528\u4e8e\u80fd\u591f\u5177\u6709\u5e38\u89c4\u7edf\u8ba1\u4fe1\u606f\u7684\u8fdc\u7a0b\u8868\uff08\u975e\u7ee7\u627f\u8868\u548c\u7269\u5316\u89c6\u56fe\uff09\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u7528\u6237\u6709\u8d23\u4efb</em></span>\u786e\u4fdd\u8fdc\u7a0b\u8868\u7684\u73b0\u6709\u7edf\u8ba1\u4fe1\u606f\u662f\u6700\u65b0\u7684\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5916\u90e8\u8868\u662f\u5206\u533a\u8868\u7684\u4e00\u4e2a\u5206\u533a\uff0c\u90a3\u4e48\u65e0\u8bba\u6b64\u8bbe\u7f6e\u5982\u4f55\uff0c\u5206\u6790\u6574\u4e2a\u5206\u533a\u8868\u65f6\u4ecd\u4f1a\u5bf9\u8be5\u5916\u90e8\u8868\u8fdb\u884c\u884c\u91c7\u6837\uff1b\u4e0d\u8fc7\uff0c\u5982\u679c\u542f\u7528\u4e86\u6b64\u9009\u9879\uff0c\u76f4\u63a5\u5206\u6790\u8be5\u5916\u90e8\u8868\u65f6\u4f1a\u4f18\u5148\u5c1d\u8bd5\u83b7\u53d6\u5e76\u5bfc\u5165\u8fdc\u7a0b\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u6b64\u9009\u9879\u76ee\u524d\u4e0d\u652f\u6301\u8fdc\u7a0b\u8868\u53c2\u4e0e\u7ee7\u627f\uff08\u6216\u66fe\u7ecf\u53c2\u4e0e\u7ee7\u627f\uff09\u7684\u60c5\u51b5\u3002\u8fd9\u662f\u5b9e\u73b0\u4e0a\u7684\u9650\u5236\uff0c\u53ef\u80fd\u4f1a\u5728\u5c06\u6765\u7684\u7248\u672c\u4e2d\u4fee\u590d\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-REMOTE-EXECUTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.4.\u00a0\u8fdc\u7a0b\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709\u4f7f\u7528\u5185\u7f6e\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u624d\u4f1a\u88ab\u8003\u8651\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u3002\u6d89\u53ca\u975e\u5185\u7f6e\u51fd\u6570\u7684\u5b50\u53e5\u4f1a\u5728\u53d6\u56de\u884c\u4e4b\u540e\u5728\u672c\u5730\u68c0\u67e5\u3002\u5982\u679c\u8fd9\u4e9b\u51fd\u6570\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e5f\u53ef\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fe1\u5176\u7ed3\u679c\u4e0e\u672c\u5730\u76f8\u540c\uff0c\u5219\u5c06\u8fd9\u7c7b <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u7aef\u6267\u884c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u6b64\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">extensions</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 <span class=\"productname\">PostgreSQL</span> \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"literal\">extensions</code> \u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fetch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">batch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u4e2d\u5e94\u63d2\u5165\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">1</code>\u3002</p>\n<p lang=\"zh\">postgres_fdw \u6bcf\u6b21\u5b9e\u9645\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u4e0e\u6307\u5b9a\u7684 batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u5355\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7aef\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u91cf\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570 * batch_size \u8d85\u8fc7\u6b64\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u9519\u8bef\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u4e5f\u9002\u7528\u4e8e\u5411\u5916\u90e8\u8868\u590d\u5236\u6570\u636e\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u5b9e\u9645\u4e00\u6b21\u590d\u5236\u7684\u884c\u6570\u4f1a\u4ee5\u4e0e\u63d2\u5165\u573a\u666f\u7c7b\u4f3c\u7684\u65b9\u5f0f\u786e\u5b9a\uff0c\u4f46\u7531\u4e8e <code class=\"command\">COPY</code> \u547d\u4ee4\u7684\u5b9e\u73b0\u9650\u5236\uff0c\u6700\u591a\u53ea\u80fd\u4e3a 1000 \u884c\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-ASYNCHRONOUS-EXECUTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.5.\u00a0\u5f02\u6b65\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c <code class=\"structname\">Append</code> \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">async_capable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n<p lang=\"zh\">\u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c<code class=\"filename\">postgres_fdw</code> \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f <code class=\"structname\">Append</code> \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-TRANSACTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.6.\u00a0\u4e8b\u52a1\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0c\u5728 <code class=\"filename\">postgres_fdw</code> \u4e2d\uff0c\u4e8b\u52a1\u662f\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u6765\u7ba1\u7406\u7684\uff0c\u5b50\u4e8b\u52a1\u5219\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u6765\u7ba1\u7406\u3002\u5f53\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e5f\u4f1a\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u53ef\u4ee5\u6539\u5584\u6027\u80fd\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">parallel_commit</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">parallel_abort</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u4e2d\u6b62\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u4e2d\u6b62\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5982\u679c\u542f\u7528\u4e86\u8fd9\u4e9b\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002</p>\n<p lang=\"zh\">\u542f\u7528\u8fd9\u4e9b\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-UPDATABILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.7.\u00a0\u53ef\u66f4\u65b0\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u66f4\u65b0\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">updatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u548c <code class=\"command\">DELETE</code> \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c<code class=\"literal\">information_schema</code> \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-TRUNCATABILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.8.\u00a0\u53ef\u622a\u65ad\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u622a\u65ad\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">truncatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">TRUNCATE</code> \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-IMPORTING\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.9.\u00a0\u5bfc\u5165\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/19/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u5bfc\u5165\u5916\u90e8\u8868\u5b9a\u4e49\u3002\u8be5\u547d\u4ee4\u4f1a\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4ee5\u5339\u914d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868\u6216\u89c6\u56fe\u3002\u5982\u679c\u8981\u5bfc\u5165\u7684\u8fdc\u7a0b\u8868\u5217\u4f7f\u7528\u7528\u6237\u5b9a\u4e49\u6570\u636e\u7c7b\u578b\uff0c\u5219\u672c\u5730\u670d\u52a1\u5668\u5fc5\u987b\u5b58\u5728\u540c\u540d\u4e14\u517c\u5bb9\u7684\u7c7b\u578b\u3002</p>\n<p lang=\"zh\">\u53ef\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\uff08\u5728 <code class=\"command\">IMPORT FOREIGN SCHEMA</code> \u547d\u4ee4\u4e2d\u7ed9\u51fa\uff09\u81ea\u5b9a\u4e49\u5bfc\u5165\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">import_collate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">COLLATE</code> \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a <code class=\"literal\">true</code>\uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 <code class=\"literal\">COLLATE \"default\"</code> \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_default</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">DEFAULT</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b<code class=\"function\">nextval()</code> \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_generated</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">GENERATED</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_not_null</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">NOT NULL</code> \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u9664 <code class=\"literal\">NOT NULL</code> \u4e4b\u5916\u7684\u7ea6\u675f\u6c38\u8fdc\u4e0d\u4f1a\u4ece\u8fdc\u7a0b\u8868\u5bfc\u5165\u3002\u867d\u7136 <span class=\"productname\">PostgreSQL</span> \u786e\u5b9e\u652f\u6301\u5728\u5916\u90e8\u8868\u4e0a\u5b9a\u4e49\u68c0\u67e5\u7ea6\u675f\uff0c\u4f46\u7531\u4e8e\u7ea6\u675f\u8868\u8fbe\u5f0f\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u6c42\u503c\u4e0d\u540c\uff0c\u7cfb\u7edf\u4e0d\u4f1a\u81ea\u52a8\u5bfc\u5165\u5b83\u4eec\u3002\u6b64\u7c7b\u884c\u4e3a\u4e0d\u4e00\u81f4\u7684\u68c0\u67e5\u7ea6\u675f\uff0c\u53ef\u80fd\u5bfc\u81f4\u67e5\u8be2\u4f18\u5316\u4e2d\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5e0c\u671b\u5bfc\u5165\u68c0\u67e5\u7ea6\u675f\uff0c\u5fc5\u987b\u624b\u5de5\u5b8c\u6210\uff0c\u5e76\u5e94\u4ed4\u7ec6\u6838\u5b9e\u6bcf\u4e00\u4e2a\u7ea6\u675f\u7684\u8bed\u4e49\u3002\u6709\u5173\u5916\u90e8\u8868\u4e0a\u68c0\u67e5\u7ea6\u675f\u5904\u7406\u65b9\u5f0f\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/19/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u3002</p>\n<p lang=\"zh\">\u4f5c\u4e3a\u5176\u4ed6\u8868\u5206\u533a\u7684\u8868\u6216\u5916\u90e8\u8868\uff0c\u4ec5\u5728\u5b83\u4eec\u88ab\u660e\u786e\u5199\u5165 <code class=\"literal\">LIMIT TO</code> \u5b50\u53e5\u65f6\u624d\u4f1a\u5bfc\u5165\u3002\u5426\u5219\uff0c\u5b83\u4eec\u4f1a\u88ab\u81ea\u52a8\u6392\u9664\u5728<a class=\"xref\" href=\"/docs/19/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u4e4b\u5916\u3002\u7531\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u901a\u8fc7\u4f5c\u4e3a\u5206\u533a\u5c42\u6b21\u6839\u7684\u5206\u533a\u8868\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ea\u5bfc\u5165\u5206\u533a\u8868\u5373\u53ef\u8bbf\u95ee\u5168\u90e8\u6570\u636e\uff0c\u800c\u65e0\u9700\u521b\u5efa\u989d\u5916\u5bf9\u8c61\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-CONNECTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.10.\u00a0\u8fde\u63a5\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u672c\u5730\u4f1a\u8bdd\u4e2d\u4fdd\u6301\u6253\u5f00\uff0c\u4ee5\u4fbf\u91cd\u590d\u4f7f\u7528\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt id=\"POSTGRES-FDW-OPTION-KEEP-CONNECTIONS\"><span class=\"term\"><code class=\"literal\">keep_connections</code> (<code class=\"type\">boolean</code>)</span> </dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">on</code>\u3002\u5982\u679c\u8bbe\u7f6e\u4e3a <code class=\"literal\">off</code>\uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002</p>\n</p>\n</dd>\n<dt id=\"POSTGRES-FDW-OPTION-USE-SCRAM-PASSTHROUGH\"><span class=\"term\"><code class=\"literal\">use_scram_passthrough</code> (<code class=\"type\">boolean</code>)</span> </dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u5728\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\u65f6\u662f\u5426\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u3002\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u6307\u5b9a\u3002\u7528\u6237\u6620\u5c04\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5916\u90e8\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\u3002\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4f7f\u7528\u7ecf SCRAM Hash \u5904\u7406\u7684\u51ed\u636e\uff0c\u800c\u4e0d\u662f\u660e\u6587\u7528\u6237\u5bc6\u7801\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5728 PostgreSQL \u7cfb\u7edf\u76ee\u5f55\u4e2d\u5b58\u50a8\u660e\u6587\u7528\u6237\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8981\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8bf7\u6c42 <code class=\"literal\">scram-sha-256</code> \u8ba4\u8bc1\u65b9\u6cd5\uff1b\u5426\u5219\u8fde\u63a5\u5c06\u5931\u8d25\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8fdc\u7a0b\u670d\u52a1\u5668\u53ef\u4ee5\u662f\u4efb\u4f55\u652f\u6301 SCRAM \u7684 PostgreSQL \u7248\u672c\u3002\u5bf9 <code class=\"literal\">use_scram_passthrough</code> \u7684\u652f\u6301\u53ea\u8981\u6c42\u5ba2\u6237\u7aef\u4e00\u4fa7\uff08FDW \u4fa7\uff09\u5177\u5907\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u7528\u6237\u6620\u5c04\u5bc6\u7801\u4e0d\u4f1a\u88ab\u4f7f\u7528\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8fd0\u884c <code class=\"filename\">postgres_fdw</code> \u7684\u670d\u52a1\u5668\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u5fc5\u987b\u9488\u5bf9\u7528\u4e8e\u5728 <code class=\"filename\">postgres_fdw</code> \u4e0a\u8ba4\u8bc1\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8be5\u7528\u6237\uff0c\u62e5\u6709\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\uff08\u52a0\u5bc6\u5bc6\u7801\uff09\uff08\u76d0\u503c\u548c\u8fed\u4ee3\u6b21\u6570\u90fd\u5fc5\u987b\u76f8\u540c\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5bc6\u7801\u76f8\u540c\uff09\u3002</p>\n<p>\u56e0\u800c\uff0c\u5982\u679c\u8981\u5efa\u7acb\u5230\u591a\u4e2a\u4e3b\u673a\u7684 FDW \u8fde\u63a5\uff0c\u4f8b\u5982\u7528\u4e8e\u5206\u533a\u5916\u90e8\u8868\u6216\u5206\u7247\uff0c\u5219\u6240\u6709\u4e3b\u673a\u90fd\u5fc5\u987b\u4e3a\u76f8\u5173\u7528\u6237\u4fdd\u5b58\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u53d1\u8d77\u5bf9\u5916 FDW \u8fde\u63a5\u7684 PostgreSQL \u5b9e\u4f8b\u4e2d\uff0c\u5f53\u524d\u4f1a\u8bdd\u7684\u4f20\u5165\u5ba2\u6237\u7aef\u8fde\u63a5\u4e5f\u5fc5\u987b\u4f7f\u7528 SCRAM \u8ba4\u8bc1\u3002\uff08\u56e0\u6b64\u79f0\u4e3a<span class=\"quote\">\u201c<span class=\"quote\">\u900f\u4f20</span>\u201d</span>\uff1aSCRAM \u5fc5\u987b\u5728\u8fdb\u5165\u548c\u79bb\u5f00\u65f6\u90fd\u88ab\u4f7f\u7528\u3002\uff09\u8fd9\u662f SCRAM \u534f\u8bae\u7684\u6280\u672f\u8981\u6c42\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0d\u5f97\u7528\u4e8e\u8ba2\u9605\u8fde\u63a5\uff08\u89c1<a class=\"xref\" href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-SERVER-SUBSCRIPTION\" title=\"F.40.4.\u00a0\u8ba2\u9605\u7ba1\u7406\">\u7b2c\u00a0F.40.4\u00a0\u8282</a>\uff09\u3002</p>\n</li>\n</ul>\n</div>\n</dd>\n</dl>\n</div>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-FUNCTIONS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-FUNCTIONS\">F.40.2. \u51fd\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_get_connections( IN check_conn boolean DEFAULT false, OUT server_name text, OUT user_name text, OUT valid boolean, OUT used_in_xact boolean, OUT closed boolean, OUT remote_backend_pid int4) returns setof record</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u8fd4\u56de postgres_fdw \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u6240\u6709\u6253\u5f00\u8fde\u63a5\u7684\u4fe1\u606f\u3002\u5982\u679c\u6ca1\u6709\u6253\u5f00\u7684\u8fde\u63a5\uff0c\u5219\u4e0d\u8fd4\u56de\u4efb\u4f55\u8bb0\u5f55\u3002</p>\n<p lang=\"zh\">check_conn \u4e3a true \u65f6\uff0c\u6b64\u51fd\u6570\u4f1a\u68c0\u67e5\u6bcf\u4e2a\u8fde\u63a5\u7684\u72b6\u6001\uff0c\u5e76\u5728 closed \u5217\u4e2d\u663e\u793a\u7ed3\u679c\u3002\u6b64\u529f\u80fd\u76ee\u524d\u4ec5\u9002\u7528\u4e8e\u652f\u6301 poll \u7cfb\u7edf\u8c03\u7528\u7684\u975e\u6807\u51c6 POLLRDHUP \u6269\u5c55\u7684\u7cfb\u7edf\uff0c\u5305\u62ec Linux\u3002\u5b83\u53ef\u7528\u4e8e\u68c0\u67e5\u4e8b\u52a1\u4e2d\u4f7f\u7528\u7684\u5168\u90e8\u8fde\u63a5\u662f\u5426\u4ecd\u7136\u6253\u5f00\u3002\u53ea\u8981\u6709\u8fde\u63a5\u5173\u95ed\uff0c\u4e8b\u52a1\u5c31\u65e0\u6cd5\u6210\u529f\u63d0\u4ea4\uff0c\u56e0\u6b64\u68c0\u6d4b\u5230\u8fde\u63a5\u5173\u95ed\u65f6\u5e94\u5c3d\u5feb\u56de\u6eda\uff0c\u800c\u975e\u7ee7\u7eed\u6267\u884c\u81f3\u7ed3\u675f\u3002\u5982\u679c\u51fd\u6570\u62a5\u544a\u67d0\u4e2a\u8fde\u63a5\u7684 used_in_xact \u548c closed \u5747\u4e3a true\uff0c\u7528\u6237\u53ef\u4ee5\u7acb\u5373\u56de\u6eda\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT * FROM postgres_fdw_get_connections(true);\n server_name | user_name | valid | used_in_xact | closed | remote_backend_pid\n-------------+-----------+-------+--------------+-----------------------------\n loopback1   | postgres  | t     | t            | f      |            1353340\n loopback2   | public    | t     | t            | f      |            1353120\n loopback3   |           | f     | t            | f      |            1353156\n</pre>\n<p lang=\"zh\">\u8f93\u51fa\u5217\u89c1<a class=\"xref\" href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-GET-CONNECTIONS-COLUMNS\" title=\"\u8868\u00a0F.29.\u00a0postgres_fdw_get_connections \u8f93\u51fa\u5217\">\u8868\u00a0F.29</a>\u3002</p>\n<div class=\"table\" id=\"POSTGRES-FDW-GET-CONNECTIONS-COLUMNS\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a0F.29.\u00a0<code class=\"function\">postgres_fdw_get_connections</code> \u8f93\u51fa\u5217</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5217</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"structfield\">server_name</code></td>\n<td lang=\"zh\">\u6587\u672c</td>\n<td lang=\"zh\">\u6b64\u8fde\u63a5\u7684\u5916\u90e8\u670d\u52a1\u5668\u540d\u79f0\u3002\u5982\u679c\u670d\u52a1\u5668\u5df2\u88ab\u5220\u9664\u4f46\u8fde\u63a5\u4ecd\u4fdd\u6301\u6253\u5f00\uff08\u5373\u88ab\u6807\u8bb0\u4e3a\u65e0\u6548\uff09\uff0c\u5219\u8be5\u503c\u4e3a <code class=\"literal\">NULL</code>\u3002</td>\n</tr>\n<tr>\n<td><code class=\"structfield\">user_name</code></td>\n<td lang=\"zh\">\u6587\u672c</td>\n<td lang=\"zh\">\u6620\u5c04\u5230\u6b64\u8fde\u63a5\u6240\u5c5e\u5916\u90e8\u670d\u52a1\u5668\u7684\u672c\u5730\u7528\u6237\u540d\u79f0\uff1b\u5982\u679c\u4f7f\u7528\u7684\u662f public \u6620\u5c04\uff0c\u5219\u4e3a <code class=\"literal\">public</code>\u3002\u5982\u679c\u7528\u6237\u6620\u5c04\u5df2\u88ab\u5220\u9664\u4f46\u8fde\u63a5\u4ecd\u4fdd\u6301\u6253\u5f00\uff08\u5373\u88ab\u6807\u8bb0\u4e3a\u65e0\u6548\uff09\uff0c\u5219\u8be5\u503c\u4e3a <code class=\"literal\">NULL</code>\u3002</td>\n</tr>\n<tr>\n<td lang=\"zh\">\u6709\u6548</td>\n<td><code class=\"type\">boolean</code></td>\n<td lang=\"zh\">\u5982\u679c\u6b64\u8fde\u63a5\u65e0\u6548\uff0c\u5219\u4e3a\u5047\uff1b\u65e0\u6548\u610f\u5473\u7740\u5b83\u5728\u5f53\u524d\u4e8b\u52a1\u4e2d\u88ab\u4f7f\u7528\uff0c\u4f46\u5176\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u5df2\u88ab\u66f4\u6539\u6216\u5220\u9664\u3002\u65e0\u6548\u8fde\u63a5\u5c06\u5728\u4e8b\u52a1\u7ed3\u675f\u65f6\u5173\u95ed\u3002\u5426\u5219\u8fd4\u56de\u771f\u3002</td>\n</tr>\n<tr>\n<td><code class=\"structfield\">used_in_xact</code></td>\n<td><code class=\"type\">boolean</code></td>\n<td lang=\"zh\">\u5982\u679c\u6b64\u8fde\u63a5\u5728\u5f53\u524d\u4e8b\u52a1\u4e2d\u88ab\u4f7f\u7528\uff0c\u5219\u4e3a\u771f\u3002</td>\n</tr>\n<tr>\n<td lang=\"zh\">\u5c01\u95ed</td>\n<td><code class=\"type\">boolean</code></td>\n<td lang=\"zh\">\u6b64\u8fde\u63a5\u5df2\u5173\u95ed\u65f6\u4e3a true\uff0c\u5426\u5219\u4e3a false\u3002\u5982\u679c check_conn \u8bbe\u4e3a false\uff0c\u6216\u5f53\u524d\u5e73\u53f0\u4e0d\u652f\u6301\u8fde\u63a5\u72b6\u6001\u68c0\u67e5\uff0c\u5219\u8fd4\u56de NULL\u3002</td>\n</tr>\n<tr>\n<td><code class=\"structfield\">remote_backend_pid</code></td>\n<td><code class=\"type\">int4</code></td>\n<td lang=\"zh\">\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u5904\u7406\u6b64\u8fde\u63a5\u7684\u8fdc\u7a0b\u540e\u7aef\u8fdb\u7a0b ID\u3002\u5982\u679c\u8fdc\u7a0b\u540e\u7aef\u5df2\u7ec8\u6b62\u4e14\u8fde\u63a5\u5df2\u5173\u95ed\uff08<code class=\"literal\">closed</code> \u4e3a <code class=\"literal\">true</code>\uff09\uff0c\u6b64\u5904\u4ecd\u4f1a\u663e\u793a\u8be5\u5df2\u7ec8\u6b62\u540e\u7aef\u7684\u8fdb\u7a0b ID\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect(server_name text) returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u8bf7\u6ce8\u610f\uff0c\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\u65f6\uff0c\u5bf9\u540c\u4e00\u670d\u52a1\u5668\u53ef\u80fd\u5b58\u5728\u591a\u4e2a\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u5982\u679c\u627e\u4e0d\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u62a5\u544a\u9519\u8bef\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect('loopback1');\n postgres_fdw_disconnect\n-------------------------\n t\n</pre>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect_all() returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5168\u90e8\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect_all();\n postgres_fdw_disconnect_all\n-----------------------------\n t\n</pre>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CONNECTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-CONNECTION-MANAGEMENT\">F.40.3. \u8fde\u63a5\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u5728\u9996\u6b21\u6267\u884c\u4f7f\u7528\u4e0e\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u5173\u8054\u7684\u5916\u90e8\u8868\u7684\u67e5\u8be2\u65f6\uff0c\u4f1a\u5efa\u7acb\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8be5\u8fde\u63a5\u4f1a\u5728\u540c\u4e00\u4f1a\u8bdd\u4e2d\u4fdd\u7559\u5e76\u4f9b\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u3002\u8fd9\u4e00\u884c\u4e3a\u53ef\u901a\u8fc7\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\u63a7\u5236\u3002\u5982\u679c\u4f7f\u7528\u591a\u4e2a\u7528\u6237\u6807\u8bc6\uff08\u7528\u6237\u6620\u5c04\uff09\u8bbf\u95ee\u8be5\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u4f1a\u4e3a\u6bcf\u4e2a\u7528\u6237\u6620\u5c04\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002</p>\n<p lang=\"zh\">\u5f53\u66f4\u6539\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u7684\u5b9a\u4e49\uff0c\u6216\u5c06\u5176\u5220\u9664\u65f6\uff0c\u76f8\u5173\u8fde\u63a5\u4f1a\u88ab\u5173\u95ed\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c\u5982\u679c\u4efb\u4f55\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u5728\u4f7f\u7528\uff0c\u5219\u4f1a\u4fdd\u7559\u5230\u4e8b\u52a1\u7ed3\u675f\u3002\u5173\u95ed\u7684\u8fde\u63a5\u4f1a\u5728\u540e\u7eed\u4f7f\u7528\u5916\u90e8\u8868\u7684\u67e5\u8be2\u9700\u8981\u5b83\u4eec\u65f6\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\">\u4e00\u65e6\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5b83\u4f1a\u4e00\u76f4\u4fdd\u7559\u5230\u672c\u5730\u4f1a\u8bdd\u6216\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u9000\u51fa\u3002\u8981\u663e\u5f0f\u65ad\u5f00\u8fde\u63a5\uff0c\u53ef\u4ee5\u7981\u7528\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\uff0c\u6216\u4f7f\u7528 <code class=\"function\">postgres_fdw_disconnect</code> \u548c <code class=\"function\">postgres_fdw_disconnect_all</code> \u51fd\u6570\u3002\u4f8b\u5982\uff0c\u8fd9\u4e9b\u51fd\u6570\u53ef\u7528\u4e8e\u5173\u95ed\u4e0d\u518d\u9700\u8981\u7684\u8fde\u63a5\uff0c\u4ece\u800c\u91ca\u653e\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u8fde\u63a5\u8d44\u6e90\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-SERVER-SUBSCRIPTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-SERVER-SUBSCRIPTION\">F.40.4. \u8ba2\u9605\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f7f\u7528\u4e0e<a class=\"xref\" href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-OPTIONS-CONNECTION\" title=\"F.40.1.1.\u00a0\u8fde\u63a5\u9009\u9879\">\u7b2c\u00a0F.40.1.1\u00a0\u8282</a>\u4e2d\u63cf\u8ff0\u76f8\u540c\u7684\u9009\u9879\u6765\u652f\u6301\u8ba2\u9605\u8fde\u63a5\u3002</p>\n<p lang=\"zh\">\u4f8b\u5982\uff0c\u5047\u8bbe\u8fdc\u7a0b\u670d\u52a1\u5668 <code class=\"literal\">foreign-host</code> \u4e0a\u6709\u4e00\u4e2a\u53d1\u5e03 <code class=\"literal\">testpub</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER subscription_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'foreign-host', dbname 'foreign_db');\nCREATE USER MAPPING FOR local_user SERVER subscription_server OPTIONS (user 'foreign_user', password 'password');\nCREATE SUBSCRIPTION my_subscription SERVER subscription_server PUBLICATION testpub;\n</pre>\n<p lang=\"zh\">\u8981\u521b\u5efa\u8ba2\u9605\uff0c\u7528\u6237\u5fc5\u987b\u662f<a class=\"xref\" href=\"/docs/19/predefined-roles.html#PREDEFINED-ROLE-PG-CREATE-SUBSCRIPTION\">pg_create_subscription</a>\u89d2\u8272\u7684\u6210\u5458\uff0c\u5e76\u4e14\u5bf9\u8be5\u670d\u52a1\u5668\u5177\u6709 <code class=\"literal\">USAGE</code> \u6743\u9650\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-TRANSACTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-TRANSACTION-MANAGEMENT\">F.40.5. \u4e8b\u52a1\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c<code class=\"filename\">postgres_fdw</code> \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002</p>\n<p lang=\"zh\">\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a <code class=\"literal\">SERIALIZABLE</code> \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code>\uff1b\u5426\u5219\u4f7f\u7528 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code> \u6216 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e <code class=\"literal\">READ COMMITTED</code> \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 <span class=\"productname\">PostgreSQL</span> \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002</p>\n<p lang=\"zh\">\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u4ee5\u4e0e\u672c\u5730\u4e8b\u52a1\u76f8\u540c\u7684\u8bfb\u5199\u6a21\u5f0f\u6253\u5f00\uff1a\u5982\u679c\u672c\u5730\u4e8b\u52a1\u662f <code class=\"literal\">READ ONLY</code>\uff0c\u5219\u8fdc\u7a0b\u4e8b\u52a1\u4ee5 <code class=\"literal\">READ ONLY</code> \u6a21\u5f0f\u6253\u5f00\uff1b\u5426\u5219\u5b83\u4ee5 <code class=\"literal\">READ WRITE</code> \u6a21\u5f0f\u6253\u5f00\u3002\uff08\u8fd9\u4e00\u89c4\u5219\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\uff09\u8bf7\u6ce8\u610f\uff0c\u8fd9\u5e76\u4e0d\u4f1a\u963b\u6b62\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u767b\u5f55\u89e6\u53d1\u5668\u5199\u5165\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u4ee5\u4e0e\u672c\u5730\u4e8b\u52a1\u76f8\u540c\u7684\u53ef\u5ef6\u8fdf\u6a21\u5f0f\u6253\u5f00\uff1a\u5982\u679c\u672c\u5730\u4e8b\u52a1\u662f <code class=\"literal\">DEFERRABLE</code>\uff0c\u5219\u8fdc\u7a0b\u4e8b\u52a1\u4ee5 <code class=\"literal\">DEFERRABLE</code> \u6a21\u5f0f\u6253\u5f00\uff1b\u5426\u5219\u5b83\u4ee5 <code class=\"literal\">NOT DEFERRABLE</code> \u6a21\u5f0f\u6253\u5f00\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c<code class=\"filename\">postgres_fdw</code> \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">F.40.6. \u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 <code class=\"literal\">extensions</code> \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f <code class=\"literal\">IMMUTABLE</code>\u3002\u5bf9\u4e8e <code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u67e5\u8be2\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 <code class=\"literal\">BEFORE</code> \u6216 <code class=\"literal\">AFTER</code> \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 <code class=\"literal\">CHECK OPTION</code> \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 <code class=\"command\">UPDATE</code> \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001<code class=\"literal\">IMMUTABLE</code> \u64cd\u4f5c\u7b26\u6216 <code class=\"literal\">IMMUTABLE</code> \u51fd\u6570\u3002</p>\n<p lang=\"zh\">\u5f53 <code class=\"filename\">postgres_fdw</code> \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 <code class=\"literal\">JOIN</code> \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">EXPLAIN VERBOSE</code> \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">F.40.7. \u8fdc\u7a0b\u67e5\u8be2\u6267\u884c\u73af\u5883</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728 <code class=\"filename\">postgres_fdw</code> \u6253\u5f00\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u4e2d\uff0c<a class=\"xref\" href=\"/docs/19/runtime-config-client.html#GUC-SEARCH-PATH\">search_path</a>\u53c2\u6570\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u5305\u542b <code class=\"literal\">pg_catalog</code>\uff0c\u8fd9\u6837\u65e0\u9700\u6a21\u5f0f\u9650\u5b9a\u5c31\u53ea\u80fd\u770b\u5230\u5185\u7f6e\u5bf9\u8c61\u3002\u8fd9\u5bf9 <code class=\"filename\">postgres_fdw</code> \u81ea\u8eab\u751f\u6210\u7684\u67e5\u8be2\u4e0d\u662f\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u603b\u662f\u63d0\u4f9b\u8fd9\u79cd\u9650\u5b9a\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bf9\u90a3\u4e9b\u901a\u8fc7\u8fdc\u7a0b\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u6216\u89c4\u5219\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u51fd\u6570\u5e26\u6765\u98ce\u9669\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u89c6\u56fe\uff0c\u5219\u8be5\u89c6\u56fe\u4e2d\u4f7f\u7528\u7684\u4efb\u4f55\u51fd\u6570\u90fd\u4f1a\u5728\u53d7\u9650\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u6267\u884c\u3002\u5efa\u8bae\u5728\u8fd9\u7c7b\u51fd\u6570\u4e2d\u5bf9\u6240\u6709\u540d\u79f0\u90fd\u5199\u6210\u5e26\u6a21\u5f0f\u9650\u5b9a\u7684\u5f62\u5f0f\uff0c\u6216\u8005\u4e3a\u8fd9\u7c7b\u51fd\u6570\u9644\u52a0 <code class=\"literal\">SET search_path</code> \u9009\u9879\uff08\u89c1<a class=\"xref\" href=\"/docs/19/sql-createfunction.html\" title=\"CREATE FUNCTION\"><span class=\"refentrytitle\">CREATE FUNCTION</span></a>\uff09\uff0c\u4ee5\u5efa\u7acb\u5176\u9884\u671f\u7684\u641c\u7d22\u8def\u5f84\u73af\u5883\u3002</p>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u8fd8\u4f1a\u4e3a\u8fdc\u7a0b\u4f1a\u8bdd\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/19/runtime-config-client.html#GUC-TIMEZONE\">TimeZone</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">UTC</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/19/runtime-config-client.html#GUC-DATESTYLE\">DateStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">ISO</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/19/runtime-config-client.html#GUC-INTERVALSTYLE\">IntervalStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\u5bf9\u4e8e 9.0 \u53ca\u66f4\u65b0\u7248\u672c\u7684\u8fdc\u7aef\u670d\u52a1\u5668\uff0cextra_float_digits \u8bbe\u4e3a 3\uff1b\u66f4\u65e9\u7248\u672c\u5219\u8bbe\u4e3a 2\u3002</li>\n</ul>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u8bbe\u7f6e\u901a\u5e38\u4e0d\u50cf <code class=\"varname\">search_path</code> \u90a3\u6837\u5bb9\u6613\u51fa\u95ee\u9898\uff0c\u4f46\u5982\u679c\u6709\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684 <code class=\"literal\">SET</code> \u9009\u9879\u5904\u7406\u3002</p>\n<p lang=\"zh\"><span class=\"emphasis\"><em>\u4e0d</em></span>\u5efa\u8bae\u901a\u8fc7\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u7684\u4f1a\u8bdd\u7ea7\u8bbe\u7f6e\u6765\u8986\u76d6\u8fd9\u79cd\u884c\u4e3a\uff1b\u8fd9\u5f88\u53ef\u80fd\u5bfc\u81f4 <code class=\"filename\">postgres_fdw</code> \u5de5\u4f5c\u5f02\u5e38\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">F.40.8. \u8de8\u7248\u672c\u517c\u5bb9\u6027</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002</p>\n<p lang=\"zh\">\u4e00\u4e2a\u9650\u5236\u662f\uff0cpostgres_fdw \u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u6240\u7528\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u901a\u8fc7\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\uff0c\u4ee5\u6b64\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002</p>\n<p lang=\"zh\">\u53e6\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5728\u5916\u90e8\u8868\u4e0a\u6267\u884c <code class=\"command\">INSERT</code> \u8bed\u53e5\u5e76\u5e26\u6709 <code class=\"literal\">ON CONFLICT DO NOTHING</code> \u5b50\u53e5\u65f6\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8fd0\u884c <span class=\"productname\">PostgreSQL</span> 9.5 \u6216\u66f4\u9ad8\u7248\u672c\uff0c\u56e0\u4e3a\u66f4\u65e9\u7248\u672c\u4e0d\u652f\u6301\u6b64\u7279\u6027\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-WAIT-EVENTS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-WAIT-EVENTS\">F.40.9. \u7b49\u5f85\u4e8b\u4ef6</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u5728\u7b49\u5f85\u4e8b\u4ef6\u7c7b\u578b <code class=\"literal\">Extension</code> \u4e0b\u62a5\u544a\u4ee5\u4e0b\u7b49\u5f85\u4e8b\u4ef6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwCleanupResult</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u4e8b\u52a1\u4e2d\u6b62\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwConnect</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwGetResult</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u63a5\u6536\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u67e5\u8be2\u7ed3\u679c\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CONFIGURATION-PARAMETERS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-CONFIGURATION-PARAMETERS\">F.40.10. \u914d\u7f6e\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt id=\"GUC-PGFDW-APPLICATION-NAME\"><span class=\"term\"><code class=\"varname\">postgres_fdw.application_name</code> (<code class=\"type\">string</code>) </span> </dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a\u7528\u4e8e<a class=\"xref\" href=\"/docs/19/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u914d\u7f6e\u53c2\u6570\u7684\u503c\uff0c\u8be5\u503c\u4f1a\u5728 <code class=\"filename\">postgres_fdw</code> \u5efa\u7acb\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u65f6\u4f7f\u7528\u3002\u8fd9\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u5bf9\u8c61\u7684 <code class=\"varname\">application_name</code> \u9009\u9879\u3002\u8bf7\u6ce8\u610f\uff0c\u4fee\u6539\u6b64\u53c2\u6570\u4e0d\u4f1a\u5f71\u54cd\u4efb\u4f55\u73b0\u6709\u8fde\u63a5\uff0c\u9664\u975e\u8fd9\u4e9b\u8fde\u63a5\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\"><code class=\"varname\">postgres_fdw.application_name</code> \u53ef\u4ee5\u662f\u4efb\u610f\u957f\u5ea6\u7684\u4efb\u610f\u5b57\u7b26\u4e32\uff0c\u751a\u81f3\u53ef\u4ee5\u5305\u542b\u975e ASCII \u5b57\u7b26\u3002\u4e0d\u8fc7\uff0c\u5f53\u5b83\u88ab\u4f20\u9012\u5e76\u4f5c\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u4e2d\u7684 <code class=\"varname\">application_name</code> \u4f7f\u7528\u65f6\uff0c\u8bf7\u6ce8\u610f\u5b83\u4f1a\u88ab\u622a\u65ad\u5230\u5c11\u4e8e <code class=\"symbol\">NAMEDATALEN</code> \u4e2a\u5b57\u7b26\u3002\u9664\u53ef\u6253\u5370 ASCII \u5b57\u7b26\u4ee5\u5916\u7684\u6240\u6709\u5b57\u7b26\u90fd\u4f1a\u88ab\u66ff\u6362\u4e3a<a class=\"link\" href=\"/docs/19/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE\" title=\"4.1.2.2.\u00a0C\u98ce\u683c\u8f6c\u4e49\u7684\u5b57\u7b26\u4e32\u5e38\u91cf\">C \u98ce\u683c\u7684\u5341\u516d\u8fdb\u5236\u8f6c\u4e49</a>\u3002\u6709\u5173\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/19/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u3002</p>\n<p lang=\"zh\"><code class=\"literal\">%</code> \u5b57\u7b26\u8868\u793a<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u7684\u5f00\u59cb\uff0c\u5e76\u4f1a\u6309\u4e0b\u8ff0\u65b9\u5f0f\u66ff\u6362\u4e3a\u72b6\u6001\u4fe1\u606f\u3002\u672a\u8bc6\u522b\u7684\u8f6c\u4e49\u4f1a\u88ab\u5ffd\u7565\u3002\u5176\u4ed6\u5b57\u7b26\u4f1a\u539f\u6837\u590d\u5236\u5230\u5e94\u7528\u540d\u4e2d\u3002\u8bf7\u6ce8\u610f\uff0c\u4e0d\u5141\u8bb8\u5728 <code class=\"literal\">%</code> \u4e0e\u9009\u9879\u5b57\u6bcd\u4e4b\u95f4\u6307\u5b9a\u6b63\u8d1f\u53f7\u6216\u6570\u5b57\u5b57\u9762\u91cf\u6765\u8fdb\u884c\u5bf9\u9f50\u548c\u586b\u5145\u3002</p>\n<div class=\"informaltable\">\n<table class=\"informaltable\">\n<thead>\n<tr>\n<th lang=\"zh\">\u8f6c\u4e49\u5e8f\u5217</th>\n<th lang=\"zh\">\u6548\u679c</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"literal\">%a</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u5e94\u7528\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%c</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u4f1a\u8bdd ID\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/19/runtime-config-logging.html#GUC-LOG-LINE-PREFIX\">log_line_prefix</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%C</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u96c6\u7c07\u540d\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/19/runtime-config-logging.html#GUC-CLUSTER-NAME\">cluster_name</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%u</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u7528\u6237\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%d</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u5e93\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%p</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u540e\u7aef\u7684\u8fdb\u7a0b ID</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%%</code></td>\n<td lang=\"zh\">\u5b57\u9762\u5b57\u7b26 %</td>\n</tr>\n</tbody>\n</table>\n</div>\n<p lang=\"zh\">\u4f8b\u5982\uff0c\u5047\u8bbe\u7528\u6237 local_user \u4ece\u6570\u636e\u5e93 local_db \u4ee5 foreign_user \u8eab\u4efd\u8fde\u63a5\u5230 foreign_db\uff0c\u5219\u8bbe\u7f6e 'db=%d, user=%u' \u4f1a\u66ff\u6362\u4e3a 'db=local_db, user=local_user'\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-EXAMPLES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-EXAMPLES\">F.40.11. \u793a\u4f8b</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4e0b\u9762\u662f\u4f7f\u7528 <code class=\"literal\">postgres_fdw</code> \u521b\u5efa\u5916\u90e8\u8868\u7684\u4e00\u4e2a\u793a\u4f8b\u3002\u9996\u5148\u5b89\u88c5\u6269\u5c55\uff1a</p>\n<pre class=\"programlisting\">CREATE EXTENSION postgres_fdw;\n</pre>\n<p lang=\"zh\">\u7136\u540e\u4f7f\u7528<a class=\"xref\" href=\"/docs/19/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8fde\u63a5\u5230\u4e00\u53f0 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\uff0c\u5b83\u8fd0\u884c\u5728\u4e3b\u673a <code class=\"literal\">192.83.123.89</code> \u4e0a\u5e76\u76d1\u542c <code class=\"literal\">5432</code> \u7aef\u53e3\u3002\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"literal\">foreign_db</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER foreign_server\n        FOREIGN DATA WRAPPER postgres_fdw\n        OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');\n</pre>\n<p lang=\"zh\">\u8fd8\u9700\u8981\u7528<a class=\"xref\" href=\"/docs/19/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u5b9a\u4e49\u4e00\u4e2a\u7528\u6237\u6620\u5c04\uff0c\u4ee5\u6807\u8bc6\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u54ea\u4e2a\u89d2\u8272\uff1a</p>\n<pre class=\"programlisting\">CREATE USER MAPPING FOR local_user\n        SERVER foreign_server\n        OPTIONS (user 'foreign_user', password 'password');\n</pre>\n<p lang=\"zh\">\u73b0\u5728\u5c31\u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/19/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u521b\u5efa\u5916\u90e8\u8868\u4e86\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"structname\">some_schema.some_table</code> \u7684\u8868\u3002\u5b83\u5728\u672c\u5730\u7684\u540d\u79f0\u5c06\u662f <code class=\"structname\">foreign_table</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE FOREIGN TABLE foreign_table (\n        id integer NOT NULL,\n        data text\n)\n        SERVER foreign_server\n        OPTIONS (schema_name 'some_schema', table_name 'some_table');\n</pre>\n<p lang=\"zh\">\u5728 <code class=\"command\">CREATE FOREIGN TABLE</code> \u4e2d\u58f0\u660e\u7684\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u5176\u4ed6\u5c5e\u6027\uff0c\u5fc5\u987b\u4e0e\u5b9e\u9645\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u5217\u540d\u4e5f\u5fc5\u987b\u5339\u914d\uff0c\u9664\u975e\u4e3a\u5404\u4e2a\u5217\u9644\u52a0 <code class=\"literal\">column_name</code> \u9009\u9879\u6765\u6307\u660e\u5b83\u4eec\u5728\u8fdc\u7a0b\u8868\u4e2d\u7684\u540d\u79f0\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u76f8\u6bd4\u624b\u5de5\u6784\u9020\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4f7f\u7528 <a class=\"link\" href=\"/docs/19/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><code class=\"command\">IMPORT FOREIGN SCHEMA</code></a> \u66f4\u53ef\u53d6\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-AUTHOR\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/19/postgres-fdw.html#POSTGRES-FDW-AUTHOR\">F.40.12. \u4f5c\u8005</a></span></h3>\n</div>\n</div>\n</div>\n<p>Shigeru Hanada <code class=\"email\">&lt;<a class=\"email\" href=\"mailto:shigeru.hanada@gmail.com\">shigeru.hanada@gmail.com</a>&gt;</code></p>\n</div>\n</div>", "manual_path": "/docs/19/postgres-fdw.html", "localization": {"status": "complete", "sources": [{"url": "/docs/19/datatype-geometric.html", "method": "same-major semantic node", "sha256": "c8fa51f5ca156500a40b9cf0ac1ee80be54c3b1faa0b646ecea967e853f804bf", "language": "zh", "matched_nodes": ["#DATATYPE-GEOMETRIC/div[11]/p[2]/em[1]"]}, {"url": "/docs/19/postgres-fdw.html", "method": "same-major semantic node", "sha256": "db901961121d350c03d75b5ce7f7e011d331e902405441ae9905962679666178", "language": "zh", "matched_nodes": ["#POSTGRES-FDW/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[4]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[5]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/p[1]", "#POSTGRES-FDW/div[12]/div[10]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/div[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[4]", "#POSTGRES-FDW/div[12]/div[1]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/p[3]", "#POSTGRES-FDW/div[12]/div[1]/p[4]", "#POSTGRES-FDW/div[12]/div[1]/p[5]", "#POSTGRES-FDW/div[12]/div[1]/p[7]", "#POSTGRES-FDW/div[12]/div[2]/div[0]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[2]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/div[0]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[3]/div[5]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[3]/div[5]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[12]/div[3]/div[5]/dl[0]/dd[3]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/div[5]/dl[0]/dd[3]/p[2]", "#POSTGRES-FDW/div[12]/div[3]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/p[3]", "#POSTGRES-FDW/div[12]/div[3]/p[4]", "#POSTGRES-FDW/div[12]/div[4]/div[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[2]", "#POSTGRES-FDW/div[12]/div[4]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[12]/div[5]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/div[0]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[6]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/p[3]", "#POSTGRES-FDW/div[12]/div[6]/p[4]", "#POSTGRES-FDW/div[12]/div[7]/div[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[7]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/div[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[7]", "#POSTGRES-FDW/div[12]/div[9]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/p[2]", "#POSTGRES-FDW/div[12]/div[9]/p[4]", "#POSTGRES-FDW/div[12]/div[9]/p[5]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[0]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[1]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[2]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[3]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[5]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/thead[1]/tr[0]/th[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[4]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[14]/p[1]", "#POSTGRES-FDW/div[14]/p[2]", "#POSTGRES-FDW/div[14]/p[3]", "#POSTGRES-FDW/div[15]/p[1]", "#POSTGRES-FDW/div[15]/p[2]", "#POSTGRES-FDW/div[15]/p[4]", "#POSTGRES-FDW/div[16]/p[1]", "#POSTGRES-FDW/div[16]/p[2]", "#POSTGRES-FDW/div[16]/p[3]", "#POSTGRES-FDW/div[16]/p[4]", "#POSTGRES-FDW/div[16]/p[5]", "#POSTGRES-FDW/div[17]/p[1]", "#POSTGRES-FDW/div[17]/p[2]", "#POSTGRES-FDW/div[17]/p[3]", "#POSTGRES-FDW/div[18]/div[3]/ul[0]/li[0]", "#POSTGRES-FDW/div[18]/div[3]/ul[0]/li[1]", "#POSTGRES-FDW/div[18]/div[3]/ul[0]/li[2]", "#POSTGRES-FDW/div[18]/p[1]", "#POSTGRES-FDW/div[18]/p[2]", "#POSTGRES-FDW/div[18]/p[4]", "#POSTGRES-FDW/div[18]/p[5]", "#POSTGRES-FDW/div[19]/p[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[0]", "#POSTGRES-FDW/div[1]/dl[0]/dt[10]", "#POSTGRES-FDW/div[1]/dl[0]/dt[11]", "#POSTGRES-FDW/div[1]/dl[0]/dt[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[4]", "#POSTGRES-FDW/div[1]/dl[0]/dt[5]", "#POSTGRES-FDW/div[1]/dl[0]/dt[6]", "#POSTGRES-FDW/div[1]/dl[0]/dt[7]", "#POSTGRES-FDW/div[1]/dl[0]/dt[8]", "#POSTGRES-FDW/div[1]/dl[0]/dt[9]", "#POSTGRES-FDW/div[20]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[20]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[20]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[20]/p[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[0]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[1]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[2]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[3]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[4]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[5]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[6]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[0]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[22]/p[1]", "#POSTGRES-FDW/div[22]/p[3]", "#POSTGRES-FDW/div[22]/p[5]", "#POSTGRES-FDW/div[22]/p[7]", "#POSTGRES-FDW/div[22]/p[9]", "#POSTGRES-FDW/div[6]/ol[0]/li[0]", "#POSTGRES-FDW/div[6]/ol[0]/li[1]", "#POSTGRES-FDW/div[6]/ol[0]/li[2]", "#POSTGRES-FDW/div[6]/ol[0]/li[3]", "#POSTGRES-FDW/p[10]", "#POSTGRES-FDW/p[11]", "#POSTGRES-FDW/p[3]", "#POSTGRES-FDW/p[4]", "#POSTGRES-FDW/p[5]", "#POSTGRES-FDW/p[7]", "#POSTGRES-FDW/p[8]"]}, {"url": "/docs/19/protocol-overview.html", "method": "same-major semantic node", "sha256": "4650a5af6514ccd289c59f90ba62490b00e797ee04c02359ef9e2174c1f276ed", "language": "zh", "matched_nodes": ["#PROTOCOL-OVERVIEW/div[9]/p[1]/span[2]/span[0]"]}, {"url": "/docs/19/sql-createindex.html", "method": "same-major semantic node", "sha256": "c0ca811850b29181af087792babe2906963bb1715e38777b0c9f863810ba0699", "language": "zh", "matched_nodes": ["#SQL-CREATEINDEX/div[5]/div[3]/p[4]/span[2]/span[0]"]}], "language": "zh", "original_text": {"/versions/19/description/0": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/versions/19/facts/0/label": "Interface family", "/versions/19/facts/0/value": "Foreign-data wrapper", "/versions/19/facts/1/label": "Handler or routine", "/versions/19/facts/2/label": "Recorded callbacks", "/versions/19/facts/3/label": "Data source", "/versions/19/facts/3/value": "Remote PostgreSQL servers", "/versions/19/tables/0/title": "Registered interface handlers", "/versions/19/tables/1/title": "Documented options", "/versions/19/related/0/label": "Foreign-data wrapper catalog", "/versions/19/related/1/label": "Existing extension catalogue identity", "/versions/19/related/2/label": "Foreign Scan plan node", "/versions/19/sections/0/title": "Interface and capability boundaries", "/versions/19/sections/1/title": "Asynchronous Execution Options", "/versions/19/sections/2/title": "Transaction Management Options", "/versions/19/sections/3/title": "Transaction Management", "/versions/19/sections/4/title": "Remote Query Optimization", "/versions/19/sections/5/title": "Cross-Version Compatibility", "/versions/19/sections/6/title": "Registered implementation in core source", "/versions/19/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/19/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/19/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/19/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/19/sections/1/paragraphs/0": "postgres_fdw supports asynchronous execution, which runs multiple parts of an Append node concurrently rather than serially to improve performance. This execution can be controlled using the following option:", "/versions/19/sections/2/paragraphs/0": "As described in the Transaction Management section, in postgres_fdw transactions are managed by creating corresponding remote transactions, and subtransactions are managed by creating corresponding remote subtransactions. When multiple remote transactions are involved in the current local transaction, by default postgres_fdw commits or aborts those remote transactions serially when the local transaction is committed or aborted. When multiple remote subtransactions are involved in the current local subtransaction, by default postgres_fdw commits or aborts those remote subtransactions serially when the local subtransaction is committed or aborted. Performance can be improved with the following options:", "/versions/19/sections/2/paragraphs/1": "If multiple foreign servers with these options enabled are involved in a local transaction, multiple remote transactions on those foreign servers are committed or aborted in parallel across those foreign servers when the local transaction is committed or aborted.", "/versions/19/sections/2/paragraphs/2": "When these options are enabled, a foreign server with many remote transactions may see a negative performance impact when the local transaction is committed or aborted.", "/versions/19/sections/3/paragraphs/0": "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints.", "/versions/19/sections/3/paragraphs/1": "The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local transaction uses SERIALIZABLE or REPEATABLE READ isolation level, but it might be surprising for a READ COMMITTED local transaction. A future PostgreSQL release might modify these rules.", "/versions/19/sections/3/paragraphs/2": "The remote transaction is opened in the same read/write mode as the local transaction: if the local transaction is READ ONLY , the remote transaction is opened in READ ONLY mode, otherwise it is opened in READ WRITE mode. (This rule is also applied to remote and local subtransactions.) Note that this does not prevent login triggers executed on the remote server from writing.", "/versions/19/sections/3/paragraphs/3": "The remote transaction is also opened in the same deferrable mode as the local transaction: if the local transaction is DEFERRABLE , the remote transaction is opened in DEFERRABLE mode, otherwise it is opened in NOT DEFERRABLE mode.", "/versions/19/sections/3/paragraphs/4": "Note that it is currently not supported by postgres_fdw to prepare the remote transaction for two-phase commit.", "/versions/19/sections/4/paragraphs/0": "postgres_fdw attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by sending query WHERE clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, WHERE clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an extension that's listed in the foreign server's extensions option. Operators and functions in such clauses must be IMMUTABLE as well. For an UPDATE or DELETE query, postgres_fdw attempts to optimize the query execution by sending the whole query to the remote server if there are no query WHERE clauses that cannot be sent to the remote server, no local joins for the query, no row-level local BEFORE or AFTER triggers or stored generated columns on the target table, and no CHECK OPTION constraints from parent views. In UPDATE , expressions to assign to target columns must use only built-in data types, IMMUTABLE operators, or IMMUTABLE functions, to reduce the risk of misexecution of the query.", "/versions/19/sections/4/paragraphs/1": "When postgres_fdw encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved are subject to different user mappings. While sending the JOIN clauses, it takes the same precautions as mentioned above for the WHERE clauses.", "/versions/19/sections/4/paragraphs/2": "The query that is actually sent to the remote server for execution can be examined using EXPLAIN VERBOSE .", "/versions/19/sections/5/paragraphs/0": "postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1.", "/versions/19/sections/5/paragraphs/1": "A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent to it for execution, resulting in \u201c function does not exist \u201d or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table reference in a sub- SELECT with OFFSET 0 as an optimization fence, and placing the problematic function or operator outside the sub- SELECT .", "/versions/19/sections/5/paragraphs/2": "Another limitation is that when executing INSERT statements with an ON CONFLICT DO NOTHING clause on a foreign table, the remote server must be running PostgreSQL 9.5 or later, as earlier versions do not support this feature.", "/versions/19/tables/0/rows/0/feature": "Scan rows", "/versions/19/tables/0/rows/5/feature": "Join path pushdown", "/versions/19/tables/0/rows/6/feature": "Upper paths, including aggregation", "/versions/19/tables/0/rows/7/feature": "Batch insert", "/versions/19/tables/0/rows/8/feature": "Asynchronous append execution", "/versions/19/tables/0/rows/9/feature": "Import schema", "/versions/19/tables/0/columns/0/label": "Interface operation", "/versions/19/tables/0/columns/1/label": "Source observation", "/versions/19/tables/0/columns/2/label": "Callback", "/versions/19/tables/0/columns/3/label": "Implementation", "/versions/19/tables/1/columns/0/label": "Option", "/versions/19/tables/1/columns/1/label": "Same-version definition", "/versions/19/tables/1/rows/0/definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used.", "/versions/19/tables/1/rows/1/definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used.", "/versions/19/tables/1/rows/2/definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used.", "/versions/19/tables/1/rows/3/definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false .", "/versions/19/tables/1/rows/4/definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 .", "/versions/19/tables/1/rows/5/definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.2 .", "/versions/19/tables/1/rows/6/definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table samples the data on the remote side, or reads and transfers all data and performs the sampling locally. The supported values are off , random , system , bernoulli and auto . off disables remote sampling, so all data are transferred and sampled locally. random performs remote sampling using the random() function to choose returned rows, while system and bernoulli rely on the built-in TABLESAMPLE methods of those names. random works on all remote server versions, while TABLESAMPLE is supported only since 9.5. auto (the default) picks the recommended sampling method automatically; currently it means either bernoulli or random depending on the remote server version.", "/versions/19/tables/1/rows/7/definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table will instead attempt to fetch the existing statistics for the remote table, and import those statistics directly to the local server (without applying the foreign table columns' n_distinct option). If the attempt failed, statistics are collected by row sampling on the foreign table. This option is only useful if the remote table is one that can have regular statistics (tables, not inherited, and materialized views). When using this option, it is the user's responsibility to ensure that the existing statistics for the remote table are up-to-date. The default is false . If the foreign table is a partition of a partitioned table, analyzing the partitioned table will still result in row sampling on the foreign table regardless of this setting, though direct analysis of the foreign table would have attempted to fetch and import the remote statistics first if this option was enabled. Note that this option doesn't currently support the case where the remote table is (or was once) inherited. This is an implementation restriction that might be fixed in a future release.", "/versions/19/tables/1/rows/8/definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.", "/versions/19/tables/1/rows/9/definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 .", "/versions/19/tables/1/rows/10/definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error. This option also applies when copying into foreign tables. In that case the actual number of rows postgres_fdw copies at once is determined in a similar way to the insert case, but it is limited to at most 1000 due to implementation restrictions of the COPY command.", "/versions/19/tables/1/rows/11/definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release.", "/versions/19/tables/1/rows/12/definition": "This option controls whether postgres_fdw commits, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false .", "/versions/19/tables/1/rows/13/definition": "This option controls whether postgres_fdw aborts, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is aborted. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false .", "/versions/19/tables/1/rows/14/definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server.", "/versions/19/tables/1/rows/15/definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server.", "/versions/19/tables/1/rows/16/definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different.", "/versions/19/tables/1/rows/17/definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally.", "/versions/19/tables/1/rows/18/definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally.", "/versions/19/tables/1/rows/19/definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true .", "/versions/19/tables/1/rows/20/definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction.", "/versions/19/tables/1/rows/21/definition": "This option controls whether postgres_fdw will use the SCRAM pass-through authentication to connect to the foreign server. It can be specified for a foreign server or a user mapping. A user mapping setting overrides the foreign server setting. With SCRAM pass-through authentication, postgres_fdw uses SCRAM-hashed secrets instead of plain-text user passwords to connect to the remote server. This avoids storing plain-text user passwords in PostgreSQL system catalogs. To use SCRAM pass-through authentication: The remote server must request the scram-sha-256 authentication method; otherwise, the connection will fail. The remote server can be of any PostgreSQL version that supports SCRAM. Support for use_scram_passthrough is only required on the client side (FDW side). The user mapping password is not used. The server running postgres_fdw and the remote server must have identical SCRAM secrets (encrypted passwords) for the user being used on postgres_fdw to authenticate on the foreign server (same salt and iterations, not merely the same password). As a corollary, if FDW connections to multiple hosts are to be made, for example for partitioned foreign tables/sharding, then all hosts must have identical SCRAM secrets for the users involved. The current session on the PostgreSQL instance that makes the outgoing FDW connections also must also use SCRAM authentication for its incoming client connection. (Hence \u201c pass-through \u201d : SCRAM must be used going in and out.) This is a technical requirement of the SCRAM protocol. The foreign server must not be used for subscription connections (see Section F.40.4 )."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "aceed34e4fd364c40d3b6abfd09d894b7881ab0ff309deaa8c0f030ad22a0ae9"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "schema_name", "definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used."}, {"name": "table_name", "definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used."}, {"name": "column_name", "definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used."}, {"name": "use_remote_estimate", "definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false ."}, {"name": "fdw_startup_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 ."}, {"name": "fdw_tuple_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.2 ."}, {"name": "analyze_sampling", "definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table samples the data on the remote side, or reads and transfers all data and performs the sampling locally. The supported values are off , random , system , bernoulli and auto . off disables remote sampling, so all data are transferred and sampled locally. random performs remote sampling using the random() function to choose returned rows, while system and bernoulli rely on the built-in TABLESAMPLE methods of those names. random works on all remote server versions, while TABLESAMPLE is supported only since 9.5. auto (the default) picks the recommended sampling method automatically; currently it means either bernoulli or random depending on the remote server version."}, {"name": "import_stats", "definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table will instead attempt to fetch the existing statistics for the remote table, and import those statistics directly to the local server (without applying the foreign table columns' n_distinct option). If the attempt failed, statistics are collected by row sampling on the foreign table. This option is only useful if the remote table is one that can have regular statistics (tables, not inherited, and materialized views). When using this option, it is the user's responsibility to ensure that the existing statistics for the remote table are up-to-date. The default is false . If the foreign table is a partition of a partitioned table, analyzing the partitioned table will still result in row sampling on the foreign table regardless of this setting, though direct analysis of the foreign table would have attempted to fetch and import the remote statistics first if this option was enabled. Note that this option doesn't currently support the case where the remote table is (or was once) inherited. This is an implementation restriction that might be fixed in a future release."}, {"name": "extensions", "definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly."}, {"name": "fetch_size", "definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 ."}, {"name": "batch_size", "definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error. This option also applies when copying into foreign tables. In that case the actual number of rows postgres_fdw copies at once is determined in a similar way to the insert case, but it is limited to at most 1000 due to implementation restrictions of the COPY command."}, {"name": "async_capable", "definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release."}, {"name": "parallel_commit", "definition": "This option controls whether postgres_fdw commits, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false ."}, {"name": "parallel_abort", "definition": "This option controls whether postgres_fdw aborts, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is aborted. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false ."}, {"name": "updatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server."}, {"name": "truncatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server."}, {"name": "import_collate", "definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different."}, {"name": "import_default", "definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally."}, {"name": "import_generated", "definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally."}, {"name": "import_not_null", "definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true ."}, {"name": "keep_connections", "definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction."}, {"name": "use_scram_passthrough", "definition": "This option controls whether postgres_fdw will use the SCRAM pass-through authentication to connect to the foreign server. It can be specified for a foreign server or a user mapping. A user mapping setting overrides the foreign server setting. With SCRAM pass-through authentication, postgres_fdw uses SCRAM-hashed secrets instead of plain-text user passwords to connect to the remote server. This avoids storing plain-text user passwords in PostgreSQL system catalogs. To use SCRAM pass-through authentication: The remote server must request the scram-sha-256 authentication method; otherwise, the connection will fail. The remote server can be of any PostgreSQL version that supports SCRAM. Support for use_scram_passthrough is only required on the client side (FDW side). The user mapping password is not used. The server running postgres_fdw and the remote server must have identical SCRAM secrets (encrypted passwords) for the user being used on postgres_fdw to authenticate on the foreign server (same salt and iterations, not merely the same password). As a corollary, if FDW connections to multiple hosts are to be made, for example for partitioned foreign tables/sharding, then all hosts must have identical SCRAM secrets for the users involved. The current session on the PostgreSQL instance that makes the outgoing FDW connections also must also use SCRAM authentication for its incoming client connection. (Hence \u201c pass-through \u201d : SCRAM must be used going in and out.) This is a technical requirement of the SCRAM protocol. The foreign server must not be used for subscription connections (see Section F.40.4 )."}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ImportForeignStatistics": "postgresImportForeignStatistics", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "source_options": [], "protocol_versions": {}}, "comparison_hash": "979d5d561aadcb43a7175cdac42b9b3460c97a4ad5d7464e730ecb6404e60bbf", "manual_language": "zh", "runtime_verified": false}, "20": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "postgres_fdw_handler"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "37"}, {"label": "\u6570\u636e\u6e90", "value": "\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u626b\u63cf\u6570\u636e\u884c", "callback": "IterateForeignScan", "implementation": "postgresIterateForeignScan"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "INSERT", "callback": "ExecForeignInsert", "implementation": "postgresExecForeignInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "UPDATE", "callback": "ExecForeignUpdate", "implementation": "postgresExecForeignUpdate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "DELETE", "callback": "ExecForeignDelete", "implementation": "postgresExecForeignDelete"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "ExecForeignTruncate", "implementation": "postgresExecForeignTruncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u8fde\u63a5\u8def\u5f84\u4e0b\u63a8", "callback": "GetForeignJoinPaths", "implementation": "postgresGetForeignJoinPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u4e0a\u5c42\u8def\u5f84\uff0c\u5305\u62ec\u805a\u5408", "callback": "GetForeignUpperPaths", "implementation": "postgresGetForeignUpperPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6279\u91cf\u63d2\u5165", "callback": "ExecForeignBatchInsert", "implementation": "postgresExecForeignBatchInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f02\u6b65\u8ffd\u52a0\u6267\u884c", "callback": "ForeignAsyncRequest", "implementation": "postgresForeignAsyncRequest"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5bfc\u5165\u6a21\u5f0f", "callback": "ImportForeignSchema", "implementation": "postgresImportForeignSchema"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "schema_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002"}, {"name": "table_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "column_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "use_remote_estimate", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 postgres_fdw \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b EXPLAIN \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "fdw_startup_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "fdw_tuple_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a 0.2 \u3002"}, {"name": "analyze_sampling", "definition": "\u6b64\u9009\u9879\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u51b3\u5b9a\u5916\u90e8\u8868 ANALYZE \u662f\u5728\u8fdc\u7a0b\u91c7\u6837\uff0c\u8fd8\u662f\u8bfb\u53d6\u5e76\u4f20\u8f93\u5168\u90e8\u6570\u636e\u540e\u5728\u672c\u5730\u91c7\u6837\u3002\u652f\u6301 off\u3001random\u3001system\u3001bernoulli \u548c auto\u3002off \u7981\u7528\u8fdc\u7a0b\u91c7\u6837\uff0c\u5168\u90e8\u6570\u636e\u4f1a\u4f20\u5230\u672c\u5730\u540e\u91c7\u6837\u3002random \u4f7f\u7528 random() \u51fd\u6570\u5728\u8fdc\u7a0b\u9009\u62e9\u8fd4\u56de\u884c\uff1bsystem \u548c bernoulli \u4f7f\u7528\u540c\u540d\u5185\u7f6e TABLESAMPLE \u65b9\u6cd5\u3002random \u9002\u7528\u4e8e\u6240\u6709\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\uff0cTABLESAMPLE \u4ec5\u4ece 9.5 \u8d77\u652f\u6301\u3002\u9ed8\u8ba4\u503c auto \u81ea\u52a8\u9009\u62e9\u63a8\u8350\u65b9\u6cd5\uff0c\u76ee\u524d\u6839\u636e\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\u9009\u62e9 bernoulli \u6216 random\u3002"}, {"name": "import_stats", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u51b3\u5b9a\u5728\u5916\u90e8\u8868\u4e0a\u6267\u884c ANALYZE \u65f6\uff0c\u662f\u5426\u6539\u4e3a\u5c1d\u8bd5\u83b7\u53d6\u8fdc\u7a0b\u8868\u7684\u73b0\u6709\u7edf\u8ba1\u4fe1\u606f\uff0c\u5e76\u5c06\u8fd9\u4e9b\u7edf\u8ba1\u4fe1\u606f\u76f4\u63a5\u5bfc\u5165\u5230\u672c\u5730\u670d\u52a1\u5668\uff08\u4e0d\u5e94\u7528\u5916\u90e8\u8868\u5217\u7684 n_distinct \u9009\u9879\uff09\u3002\u5982\u679c\u5c1d\u8bd5\u5931\u8d25\uff0c\u5219\u4f1a\u901a\u8fc7\u5bf9\u5916\u90e8\u8868\u8fdb\u884c\u884c\u91c7\u6837\u6765\u6536\u96c6\u7edf\u8ba1\u4fe1\u606f\u3002\u8be5\u9009\u9879\u4ec5\u5728\u8fdc\u7a0b\u8868\u5c5e\u4e8e\u53ef\u4ee5\u62e5\u6709\u5e38\u89c4\u7edf\u8ba1\u4fe1\u606f\u7684\u5bf9\u8c61\u65f6\u624d\u6709\u7528\uff08\u5373\u975e\u7ee7\u627f\u7684\u8868\u548c\u7269\u5316\u89c6\u56fe\uff09\u3002\u4f7f\u7528\u8be5\u9009\u9879\u65f6\uff0c \u786e\u4fdd\u8fdc\u7a0b\u8868\u7684\u73b0\u6709\u7edf\u8ba1\u4fe1\u606f\u4fdd\u6301\u6700\u65b0\u662f\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002 \u5982\u679c\u5916\u90e8\u8868\u662f\u5206\u533a\u8868\u7684\u4e00\u4e2a\u5206\u533a\uff0c\u90a3\u4e48\u5373\u4fbf\u8bbe\u7f6e\u4e86\u8be5\u9009\u9879\uff0c\u5728\u5206\u6790\u6574\u4e2a\u5206\u533a\u8868\u65f6\uff0c\u4ecd\u7136\u4f1a\u5bf9\u8be5\u5916\u90e8\u8868\u6267\u884c\u884c\u91c7\u6837\uff1b\u4e0d\u8fc7\uff0c\u5982\u679c\u76f4\u63a5\u5206\u6790\u8be5\u5916\u90e8\u8868\uff0c\u5e76\u4e14\u542f\u7528\u4e86\u8be5\u9009\u9879\uff0c\u5c31\u4f1a\u4f18\u5148\u5c1d\u8bd5\u83b7\u53d6\u5e76\u5bfc\u5165\u8fdc\u7a0b\u7edf\u8ba1\u4fe1\u606f\u3002 \u6ce8\u610f\uff0c\u6b64\u9009\u9879\u76ee\u524d\u4e0d\u652f\u6301\u8fdc\u7a0b\u8868\u53c2\u4e0e\u7ee7\u627f\uff08\u6216\u66fe\u7ecf\u53c2\u4e0e\u7ee7\u627f\uff09\u7684\u60c5\u51b5\u3002\u8fd9\u662f\u4e00\u4e2a\u5b9e\u73b0\u4e0a\u7684\u9650\u5236\uff0c\u53ef\u80fd\u4f1a\u5728\u5c06\u6765\u7684\u7248\u672c\u4e2d\u4fee\u590d\u3002"}, {"name": "extensions", "definition": "\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 PostgreSQL \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002 \u4f7f\u7528 extensions \u9009\u9879\u65f6\uff0c \u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002"}, {"name": "fetch_size", "definition": "\u8be5\u9009\u9879\u6307\u5b9a postgres_fdw \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "batch_size", "definition": "\u6b64\u9009\u9879\u6307\u5b9a postgres_fdw \u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u5e94\u63d2\u5165\u7684\u884c\u6570\uff0c\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u8868\u7ea7\u8bbe\u7f6e\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u8bbe\u7f6e\uff0c\u9ed8\u8ba4\u503c\u4e3a 1\u3002\u5b9e\u9645\u4e00\u6b21\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u548c batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u4e00\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570\u4e58\u4ee5 batch_size \u8d85\u51fa\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u62a5\u9519\u3002\u6b64\u9009\u9879\u4e5f\u9002\u7528\u4e8e\u5411\u5916\u90e8\u8868\u6267\u884c COPY\uff0c\u5b9e\u9645\u4e00\u6b21\u590d\u5236\u7684\u884c\u6570\u6309\u7c7b\u4f3c\u65b9\u5f0f\u786e\u5b9a\uff0c\u4f46\u53d7 COPY \u5b9e\u73b0\u9650\u5236\uff0c\u6700\u591a\u4e3a 1000 \u884c\u3002"}, {"name": "async_capable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002 \u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c postgres_fdw \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002 \u5373\u4f7f Append \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 postgres_fdw \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002"}, {"name": "parallel_commit", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "parallel_abort", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u4e2d\u6b62\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u4e2d\u6b62\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "updatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 INSERT \u3001 UPDATE \u548c DELETE \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c information_schema \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 postgres_fdw \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002"}, {"name": "truncatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 TRUNCATE \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002"}, {"name": "import_collate", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 COLLATE \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002 \u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a true \uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 COLLATE \"default\" \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002"}, {"name": "import_default", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 DEFAULT \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b nextval() \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_generated", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 GENERATED \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_not_null", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 NOT NULL \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002"}, {"name": "keep_connections", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a on \u3002\u5982\u679c\u8bbe\u7f6e\u4e3a off \uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002"}, {"name": "use_scram_passthrough", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u5728\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\u65f6\u662f\u5426\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u3002\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u6307\u5b9a\u3002\u7528\u6237\u6620\u5c04\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5916\u90e8\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\u3002\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u65f6\uff0c postgres_fdw \u4f7f\u7528\u7ecf SCRAM Hash \u5904\u7406\u7684\u51ed\u636e\uff0c\u800c\u4e0d\u662f\u660e\u6587\u7528\u6237\u5bc6\u7801\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5728 PostgreSQL \u7cfb\u7edf\u76ee\u5f55\u4e2d\u5b58\u50a8\u660e\u6587\u7528\u6237\u5bc6\u7801\u3002 \u8981\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\uff1a \u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8bf7\u6c42 scram-sha-256 \u8ba4\u8bc1\u65b9\u6cd5\uff1b\u5426\u5219\u8fde\u63a5\u5c06\u5931\u8d25\u3002 \u8fdc\u7a0b\u670d\u52a1\u5668\u53ef\u4ee5\u662f\u4efb\u4f55\u652f\u6301 SCRAM \u7684 PostgreSQL \u7248\u672c\u3002\u5bf9 use_scram_passthrough \u7684\u652f\u6301\u53ea\u8981\u6c42\u5ba2\u6237\u7aef\u4e00\u4fa7\uff08FDW \u4fa7\uff09\u5177\u5907\u3002 \u7528\u6237\u6620\u5c04\u5bc6\u7801\u4e0d\u4f1a\u88ab\u4f7f\u7528\u3002 \u8fd0\u884c postgres_fdw \u7684\u670d\u52a1\u5668\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u5fc5\u987b\u9488\u5bf9\u7528\u4e8e\u5728 postgres_fdw \u4e0a\u8ba4\u8bc1\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8be5\u7528\u6237\uff0c\u62e5\u6709\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\uff08\u52a0\u5bc6\u5bc6\u7801\uff09\uff08\u76d0\u503c\u548c\u8fed\u4ee3\u6b21\u6570\u90fd\u5fc5\u987b\u76f8\u540c\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5bc6\u7801\u76f8\u540c\uff09\u3002 \u56e0\u800c\uff0c\u5982\u679c\u8981\u5efa\u7acb\u5230\u591a\u4e2a\u4e3b\u673a\u7684 FDW \u8fde\u63a5\uff0c\u4f8b\u5982\u7528\u4e8e\u5206\u533a\u5916\u90e8\u8868\u6216\u5206\u7247\uff0c\u5219\u6240\u6709\u4e3b\u673a\u90fd\u5fc5\u987b\u4e3a\u76f8\u5173\u7528\u6237\u4fdd\u5b58\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\u3002 \u53d1\u8d77\u5bf9\u5916 FDW \u8fde\u63a5\u7684 PostgreSQL \u5b9e\u4f8b\u4e2d\uff0c\u5f53\u524d\u4f1a\u8bdd\u7684\u4f20\u5165\u5ba2\u6237\u7aef\u8fde\u63a5\u4e5f\u5fc5\u987b\u4f7f\u7528 SCRAM \u8ba4\u8bc1\u3002\uff08\u56e0\u6b64\u79f0\u4e3a \u201c \u900f\u4f20 \u201d \uff1aSCRAM \u5fc5\u987b\u5728\u8fdb\u5165\u548c\u79bb\u5f00\u65f6\u90fd\u88ab\u4f7f\u7528\u3002\uff09\u8fd9\u662f SCRAM \u534f\u8bae\u7684\u6280\u672f\u8981\u6c42\u3002 \u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0d\u5f97\u7528\u4e8e\u8ba2\u9605\u8fde\u63a5\uff08\u89c1 \u7b2c F.40.4 \u8282 \uff09\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}], "related": [{"url": "/wiki/catalog/pg_foreign_data_wrapper/?v=20", "label": "Foreign-data wrapper \u7cfb\u7edf\u76ee\u5f55"}, {"url": "/e/postgres_fdw/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/plan/foreign-scan/?v=20", "label": "Foreign Scan \u8ba1\u5212\u8282\u70b9"}], "release": {"ref": "PostgreSQL 20devel source archive", "label": "20devel", "major": "20", "channel": "devel", "revision": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41", "source_url": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "source_snapshot_utc": "26-Sep-2026 20:22"}, "sources": [{"url": "https://pg.center/docs/devel/postgres-fdw.html", "path": "postgres-fdw.html", "label": "PostgreSQL 20 English manual", "sha256": "f13b7a8122b3c8dcc9c37645f07c2b3835b6980cca4e153c574f67bb098269cb", "language": "en", "original_url": "/docs/devel/postgres-fdw.html"}, {"url": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "line": 680, "path": "contrib/postgres_fdw/postgres_fdw.c", "label": "contrib/postgres_fdw/postgres_fdw.c:680", "sha256": "a164315da627f8cbc12eb147ccefcd99ca488f4f5806d7b740349ed547646dcd", "archive_sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u5f02\u6b65\u6267\u884c\u9009\u9879", "paragraphs": ["postgres_fdw \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c Append \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406\u9009\u9879", "paragraphs": ["\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0c\u5728 postgres_fdw \u4e2d\uff0c\u4e8b\u52a1\u662f\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u6765\u7ba1\u7406\u7684\uff0c\u5b50\u4e8b\u52a1\u5219\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u6765\u7ba1\u7406\u3002\u5f53\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c postgres_fdw \u4f1a\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c postgres_fdw \u4e5f\u4f1a\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u53ef\u4ee5\u6539\u5584\u6027\u80fd\uff1a", "\u5982\u679c\u542f\u7528\u4e86\u8fd9\u4e9b\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002", "\u542f\u7528\u8fd9\u4e9b\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406", "paragraphs": ["\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c postgres_fdw \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002", "\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a SERIALIZABLE \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \uff1b\u5426\u5219\u4f7f\u7528 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 SERIALIZABLE \u6216 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e READ COMMITTED \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 PostgreSQL \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002", "\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u4ee5\u4e0e\u672c\u5730\u4e8b\u52a1\u76f8\u540c\u7684\u8bfb\u5199\u6a21\u5f0f\u6253\u5f00\uff1a\u5982\u679c\u672c\u5730\u4e8b\u52a1\u662f READ ONLY \uff0c\u5219\u8fdc\u7a0b\u4e8b\u52a1\u4ee5 READ ONLY \u6a21\u5f0f\u6253\u5f00\uff1b\u5426\u5219\u5b83\u4ee5 READ WRITE \u6a21\u5f0f\u6253\u5f00\u3002\uff08\u8fd9\u4e00\u89c4\u5219\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\uff09\u8bf7\u6ce8\u610f\uff0c\u8fd9\u5e76\u4e0d\u4f1a\u963b\u6b62\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u767b\u5f55\u89e6\u53d1\u5668\u5199\u5165\u6570\u636e\u3002", "\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u4ee5\u4e0e\u672c\u5730\u4e8b\u52a1\u76f8\u540c\u7684\u53ef\u5ef6\u8fdf\u6a21\u5f0f\u6253\u5f00\uff1a\u5982\u679c\u672c\u5730\u4e8b\u52a1\u662f DEFERRABLE \uff0c\u5219\u8fdc\u7a0b\u4e8b\u52a1\u4ee5 DEFERRABLE \u6a21\u5f0f\u6253\u5f00\uff1b\u5426\u5219\u5b83\u4ee5 NOT DEFERRABLE \u6a21\u5f0f\u6253\u5f00\u3002", "\u8bf7\u6ce8\u610f\uff0c postgres_fdw \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002"]}, {"title": "\u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316", "paragraphs": ["postgres_fdw \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 WHERE \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 WHERE \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 extensions \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f IMMUTABLE \u3002\u5bf9\u4e8e UPDATE \u6216 DELETE \u67e5\u8be2\uff0c postgres_fdw \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 WHERE \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 BEFORE \u6216 AFTER \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 CHECK OPTION \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 UPDATE \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001 IMMUTABLE \u64cd\u4f5c\u7b26\u6216 IMMUTABLE \u51fd\u6570\u3002", "\u5f53 postgres_fdw \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 JOIN \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 WHERE \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002", "\u5916\u90e8\u8868\u4e0e FROM \u5217\u8868\u4e2d\u96c6\u5408\u8fd4\u56de\u51fd\u6570\u4e4b\u95f4\u7684 INNER JOIN \u540c\u6837\u53ef\u4ee5\u4e0b\u63a8\uff1a\u51fd\u6570\u8c03\u7528\u4f1a\u5e76\u5165\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ea\u83b7\u53d6\u4e0e\u51fd\u6570\u8f93\u51fa\u5339\u914d\u7684\u884c\u3002\u53ea\u6709\u51fd\u6570\u4e3a IMMUTABLE\uff08\u4fdd\u8bc1\u8fdc\u7a0b\u8ba1\u7b97\u4e0e\u672c\u5730\u8ba1\u7b97\u7ed3\u679c\u76f8\u540c\uff09\u3001\u53c2\u6570\u53ca\u5176\u9650\u5236\u6761\u4ef6\u5747\u53ef\u4e0b\u63a8\uff0c\u4e14\u4e0d\u5b58\u5728\u4ee5\u4e0b\u6392\u9664\u6761\u4ef6\u65f6\u624d\u5c1d\u8bd5\uff1a\u8fde\u63a5\u7c7b\u578b\u4e0d\u662f INNER\uff1b\u51fd\u6570\u4f7f\u7528 WITH ORDINALITY\uff1b\u51fd\u6570\u8fd4\u56de record \u7c7b\u578b\u4f46\u6ca1\u6709\u9644\u5e26\u5217\u5b9a\u4e49\u5217\u8868\uff1b\u6216\u8005\u51fd\u6570\u6a2a\u5411\u5f15\u7528\u540c\u4e00\u67e5\u8be2\u5c42\u7ea7\u7684\u5176\u4ed6\u5173\u7cfb\u3002\u5141\u8bb8\u51fd\u6570\u53c2\u6570\u6765\u81ea\u5916\u5c42\u67e5\u8be2\uff0c\u8be5\u53c2\u6570\u4f1a\u4f5c\u4e3a\u67e5\u8be2\u53c2\u6570\u4f20\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u3002", "\u53ef\u4ee5\u4f7f\u7528 EXPLAIN VERBOSE \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002"]}, {"title": "\u8de8\u7248\u672c\u517c\u5bb9\u6027", "paragraphs": ["postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002", "\u4e00\u4e2a\u9650\u5236\u662f\uff0cpostgres_fdw \u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u6240\u7528\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u901a\u8fc7\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\uff0c\u4ee5\u6b64\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002", "\u53e6\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5728\u5916\u90e8\u8868\u4e0a\u6267\u884c INSERT \u8bed\u53e5\u5e76\u5e26\u6709 ON CONFLICT DO NOTHING \u5b50\u53e5\u65f6\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8fd0\u884c PostgreSQL 9.5 \u6216\u66f4\u9ad8\u7248\u672c\uff0c\u56e0\u4e3a\u66f4\u65e9\u7248\u672c\u4e0d\u652f\u6301\u6b64\u7279\u6027\u3002"]}, {"code": "{\n\tFdwRoutine *routine = makeNode(FdwRoutine);\n\n\t/* Functions for scanning foreign tables */\n\troutine->GetForeignRelSize = postgresGetForeignRelSize;\n\troutine->GetForeignPaths = postgresGetForeignPaths;\n\troutine->GetForeignPlan = postgresGetForeignPlan;\n\troutine->BeginForeignScan = postgresBeginForeignScan;\n\troutine->IterateForeignScan = postgresIterateForeignScan;\n\troutine->ReScanForeignScan = postgresReScanForeignScan;\n\troutine->EndForeignScan = postgresEndForeignScan;\n\n\t/* Functions for updating foreign tables */\n\troutine->AddForeignUpdateTargets = postgresAddForeignUpdateTargets;\n\troutine->PlanForeignModify = postgresPlanForeignModify;\n\troutine->BeginForeignModify = postgresBeginForeignModify;\n\troutine->ExecForeignInsert = postgresExecForeignInsert;\n\troutine->ExecForeignBatchInsert = postgresExecForeignBatchInsert;\n\troutine->GetForeignModifyBatchSize = postgresGetForeignModifyBatchSize;\n\troutine->ExecForeignUpdate = postgresExecForeignUpdate;\n\troutine->ExecForeignDelete = postgresExecForeignDelete;\n\troutine->EndForeignModify = postgresEndForeignModify;\n\troutine->BeginForeignInsert = postgresBeginForeignInsert;\n\troutine->EndForeignInsert = postgresEndForeignInsert;\n\troutine->IsForeignRelUpdatable = postgresIsForeignRelUpdatable;\n\troutine->PlanDirectModify = postgresPlanDirectModify;\n\troutine->BeginDirectModify = postgresBeginDirectModify;\n\troutine->IterateDirectModify = postgresIterateDirectModify;\n\troutine->EndDirectModify = postgresEndDirectModify;\n\n\t/* Function for EvalPlanQual rechecks */\n\troutine->RecheckForeignScan = postgresRecheckForeignScan;\n\t/* Support functions for EXPLAIN */\n\troutine->ExplainForeignScan = postgresExplainForeignScan;\n\troutine->ExplainForeignModify = postgresExplainForeignModify;\n\troutine->ExplainDirectModify = postgresExplainDirectModify;\n\n\t/* Support function for TRUNCATE */\n\troutine->ExecForeignTruncate = postgresExecForeignTruncate;\n\n\t/* Support functions for ANALYZE */\n\troutine->AnalyzeForeignTable = postgresAnalyzeForeignTable;\n\troutine->ImportForeignStatistics = postgresImportForeignStatistics;\n\n\t/* Support functions for IMPORT FOREIGN SCHEMA */\n\troutine->ImportForeignSchema = postgresImportForeignSchema;\n\n\t/* Support functions for join push-down */\n\troutine->GetForeignJoinPaths = postgresGetForeignJoinPaths;\n\n\t/* Support functions for upper relation push-down */\n\troutine->GetForeignUpperPaths = postgresGetForeignUpperPaths;\n\n\t/* Support functions for asynchronous execution */\n\troutine->IsForeignPathAsyncCapable = postgresIsForeignPathAsyncCapable;\n\troutine->ForeignAsyncRequest = postgresForeignAsyncRequest;\n\troutine->ForeignAsyncConfigureWait = postgresForeignAsyncConfigureWait;\n\troutine->ForeignAsyncNotify = postgresForeignAsyncNotify;\n\n\tPG_RETURN_POINTER(routine);\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ImportForeignStatistics": "postgresImportForeignStatistics", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "description": ["\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002"], "manual_html": "<div class=\"sect1\" id=\"POSTGRES-FDW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">F.40.\u00a0postgres_fdw \u2014 \u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u6a21\u5757\u63d0\u4f9b\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668 <code class=\"literal\">postgres_fdw</code>\uff0c\u53ef\u7528\u4e8e\u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u672c\u6a21\u5757\u63d0\u4f9b\u7684\u529f\u80fd\u4e0e\u8f83\u65e7\u7684<a class=\"xref\" href=\"/docs/devel/dblink.html\" title=\"F.11.\u00a0dblink \u2014 \u8fde\u63a5\u5230\u5176\u4ed6 PostgreSQL \u6570\u636e\u5e93\">dblink</a>\u6a21\u5757\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u91cd\u53e0\u3002\u4f46 <code class=\"filename\">postgres_fdw</code> \u4e3a\u8bbf\u95ee\u8fdc\u7a0b\u8868\u63d0\u4f9b\u4e86\u66f4\u900f\u660e\u4e14\u7b26\u5408\u6807\u51c6\u7684\u8bed\u6cd5\uff0c\u5e76\u4e14\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u6027\u80fd\u66f4\u597d\u3002</p>\n<p lang=\"zh\">\u8981\u51c6\u5907\u901a\u8fc7 <code class=\"filename\">postgres_fdw</code> \u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee\uff1a</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5b89\u88c5 <code class=\"filename\">postgres_fdw</code> \u6269\u5c55\uff0c\u53ef\u4f7f\u7528<a class=\"xref\" href=\"/docs/devel/sql-createextension.html\" title=\"CREATE EXTENSION\"><span class=\"refentrytitle\">CREATE EXTENSION</span></a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u4f7f\u7528<a class=\"xref\" href=\"/docs/devel/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u5bf9\u8c61\uff0c\u7528\u6765\u8868\u793a\u6bcf\u4e2a\u8981\u8fde\u63a5\u7684\u8fdc\u7a0b\u6570\u636e\u5e93\u3002\u5c06\u9664 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u4e4b\u5916\u7684\u8fde\u63a5\u4fe1\u606f\u6307\u5b9a\u4e3a\u670d\u52a1\u5668\u5bf9\u8c61\u7684\u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u9700\u8981\u83b7\u51c6\u8bbf\u95ee\u5404\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u7528\u6237\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/devel/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u521b\u5efa\u7528\u6237\u6620\u5c04\u3002\u5c06\u8981\u4f7f\u7528\u7684\u8fdc\u7a0b\u7528\u6237\u540d\u548c\u5bc6\u7801\u6307\u5b9a\u4e3a\u7528\u6237\u6620\u5c04\u7684 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u8981\u8bbf\u95ee\u7684\u8fdc\u7a0b\u8868\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/devel/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u6216<a class=\"xref\" href=\"/docs/devel/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5916\u90e8\u8868\u7684\u5217\u5fc5\u987b\u4e0e\u88ab\u5f15\u7528\u7684\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u5728\u5916\u90e8\u8868\u5bf9\u8c61\u7684\u9009\u9879\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8fdc\u7a0b\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0e\u8fdc\u7a0b\u8868\u4e0d\u540c\u7684\u8868\u540d\u548c/\u6216\u5217\u540d\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\">\u73b0\u5728\uff0c\u53ea\u9700\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">SELECT</code>\uff0c\u5373\u53ef\u8bbf\u95ee\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u4e2d\u5b58\u50a8\u7684\u6570\u636e\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code>\u3001<code class=\"command\">COPY</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4fee\u6539\u8fdc\u7a0b\u8868\u3002\uff08\u5f53\u7136\uff0c\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\u7684\u8fdc\u7a0b\u7528\u6237\u5fc5\u987b\u62e5\u6709\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u6743\u9650\u3002\uff09</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5728\u8bbf\u95ee\u6216\u4fee\u6539\u8fdc\u7a0b\u8868\u65f6\uff0c<code class=\"literal\">ONLY</code> \u9009\u9879\u5728 <code class=\"command\">SELECT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4e2d\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n<p lang=\"zh\">postgres_fdw \u76ee\u524d\u4e0d\u652f\u6301\u5e26 ON CONFLICT DO SELECT/UPDATE \u5b50\u53e5\u7684 INSERT\u3002\u4e0d\u8fc7\uff0c\u652f\u6301 ON CONFLICT DO NOTHING\uff0c\u524d\u63d0\u662f\u4e0d\u6307\u5b9a\u552f\u4e00\u7d22\u5f15\u63a8\u65ad\u6761\u4ef6\u3002postgres_fdw \u8fd8\u652f\u6301\u5728\u5206\u533a\u8868\u4e0a\u6267\u884c UPDATE \u6240\u89e6\u53d1\u7684\u884c\u79fb\u52a8\uff0c\u4f46\u76ee\u524d\u4e0d\u652f\u6301\u4ee5\u4e0b\u60c5\u51b5\uff1a\u7528\u4e8e\u63a5\u6536\u79fb\u5165\u884c\u7684\u8fdc\u7aef\u5206\u533a\uff0c\u540c\u65f6\u4e5f\u662f\u540c\u4e00\u547d\u4ee4\u4e2d\u5176\u4ed6\u4f4d\u7f6e\u5c06\u8981\u66f4\u65b0\u7684 UPDATE \u76ee\u6807\u5206\u533a\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5c06\u5916\u90e8\u8868\u7684\u5217\u58f0\u660e\u4e3a\u4e0e\u88ab\u5f15\u7528\u8fdc\u7a0b\u8868\u7684\u5bf9\u5e94\u5217\u5177\u6709\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u5728\u9002\u7528\u65f6\u5177\u6709\u76f8\u540c\u7684\u6392\u5e8f\u89c4\u5219\u3002\u5c3d\u7ba1 <code class=\"filename\">postgres_fdw</code> \u76ee\u524d\u5728\u6309\u9700\u6267\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u9762\u76f8\u5f53\u5bbd\u5bb9\uff0c\u4f46\u5f53\u7c7b\u578b\u6216\u6392\u5e8f\u89c4\u5219\u4e0d\u5339\u914d\u65f6\uff0c\u4ecd\u53ef\u80fd\u51fa\u73b0\u4ee4\u4eba\u610f\u5916\u7684\u8bed\u4e49\u5f02\u5e38\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5bf9\u67e5\u8be2\u6761\u4ef6\u7684\u89e3\u91ca\u53ef\u80fd\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5916\u90e8\u8868\u7684\u58f0\u660e\u53ef\u4ee5\u6bd4\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u5c11\u4e00\u4e9b\u5217\uff0c\u6216\u8005\u4f7f\u7528\u4e0d\u540c\u7684\u5217\u987a\u5e8f\u3002\u4e0e\u8fdc\u7a0b\u8868\u5217\u7684\u5339\u914d\u662f\u6309\u540d\u79f0\u800c\u4e0d\u662f\u6309\u4f4d\u7f6e\u8fdb\u884c\u7684\u3002</p>\n<div class=\"sect2\" id=\"POSTGRES-FDW-OPTIONS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-OPTIONS\">F.40.1. postgres_fdw \u7684 FDW \u9009\u9879</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-CONNECTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.1.\u00a0\u8fde\u63a5\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528 <span class=\"application\">libpq</span> \u5728\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u63a5\u53d7\u7684\u76f8\u540c\u9009\u9879\uff0c\u8be6\u89c1<a class=\"xref\" href=\"/docs/devel/libpq-connect.html#LIBPQ-PARAMKEYWORDS\" title=\"32.1.2.\u00a0\u53c2\u6570\u5173\u952e\u8bcd\">\u7b2c\u00a032.1.2\u00a0\u8282</a>\uff1b\u4f46\u4ee5\u4e0b\u9009\u9879\u4e0d\u5141\u8bb8\u4f7f\u7528\uff0c\u6216\u4f1a\u88ab\u7279\u6b8a\u5904\u7406\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">user</code>\u3001<code class=\"literal\">password</code> \u548c <code class=\"literal\">sslpassword</code>\uff08\u8bf7\u6539\u4e3a\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\uff0c\u6216\u4f7f\u7528\u670d\u52a1\u6587\u4ef6\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">client_encoding</code>\uff08\u4f1a\u6839\u636e\u672c\u5730\u670d\u52a1\u5668\u7f16\u7801\u81ea\u52a8\u8bbe\u7f6e\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">application_name</code> \u53ef\u4ee5\u51fa\u73b0\u5728\u8fde\u63a5\u9009\u9879\u548c<a class=\"xref\" href=\"/docs/devel/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u4e2d\u7684<span class=\"emphasis\"><em>\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c<code class=\"varname\">postgres_fdw.application_name</code> \u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002\u4e0e <span class=\"application\">libpq</span> \u4e0d\u540c\uff0c<code class=\"filename\">postgres_fdw</code> \u5141\u8bb8 <code class=\"varname\">application_name</code> \u5305\u542b<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/devel/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">fallback_application_name</code>\uff08\u59cb\u7ec8\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres_fdw</code>\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">sslkey</code> \u548c <code class=\"literal\">sslcert</code> \u53ef\u4ee5\u51fa\u73b0\u5728<span class=\"emphasis\"><em>\u8fde\u63a5\u9009\u9879\u3001\u7528\u6237\u6620\u5c04\u4e2d\u7684\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c\u7528\u6237\u6620\u5c04\u8bbe\u7f6e\u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002</p>\n</li>\n</ul>\n</div>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u521b\u5efa\u6216\u4fee\u6539\u5e26\u6709 <code class=\"literal\">sslcert</code> \u6216 <code class=\"literal\">sslkey</code> \u8bbe\u7f6e\u7684\u7528\u6237\u6620\u5c04\u3002</p>\n<p lang=\"zh\">\u975e\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5bc6\u7801\u8ba4\u8bc1\u6216\u4f7f\u7528 GSSAPI \u59d4\u6d3e\u51ed\u636e\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\uff0c\u56e0\u6b64\u5728\u9700\u8981\u5bc6\u7801\u8ba4\u8bc1\u7684\u573a\u666f\u4e2d\uff0c\u5e94\u4e3a\u5c5e\u4e8e\u975e\u8d85\u7ea7\u7528\u6237\u7684\u7528\u6237\u6620\u5c04\u6307\u5b9a <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u7528\u6237\u6620\u5c04\u9009\u9879 <code class=\"literal\">password_required 'false'</code> \u6309\u7528\u6237\u6620\u5c04\u5355\u72ec\u8986\u76d6\u6b64\u68c0\u67e5\uff0c\u4f8b\u5982\uff1a</p>\n<pre class=\"programlisting\">ALTER USER MAPPING FOR some_non_superuser SERVER loopback_nopw\nOPTIONS (ADD password_required 'false');\n</pre>\n<p lang=\"zh\">\u4e3a\u4e86\u9632\u6b62\u975e\u7279\u6743\u7528\u6237\u5229\u7528 postgres \u670d\u52a1\u5668\u6240\u8fd0\u884c\u7684 unix \u7528\u6237\u7684\u8ba4\u8bc1\u6743\u9650\u63d0\u5347\u5230\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u5728\u7528\u6237\u6620\u5c04\u4e0a\u8bbe\u7f6e\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u5fc5\u987b\u8c28\u614e\uff0c\u786e\u4fdd\u8fd9\u4e0d\u4f1a\u4f7f\u6620\u5c04\u7528\u6237\u80fd\u591f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\u5230\u6620\u5c04\u7684\u6570\u636e\u5e93\uff0c\u53c2\u89c1 CVE-2007-3278 \u548c CVE-2007-6601\u3002\u4e0d\u8981\u4e3a public \u89d2\u8272\u8bbe\u7f6e password_required=false\u3002\u8bf7\u6ce8\u610f\uff0c\u6620\u5c04\u7528\u6237\u53ef\u80fd\u4f7f\u7528\u8fd0\u884c postgres \u670d\u52a1\u5668\u7684\u7cfb\u7edf\u7528\u6237\u7684 Unix \u4e3b\u76ee\u5f55\u4e2d\u7684\u4efb\u4f55\u5ba2\u6237\u7aef\u8bc1\u4e66\u3001.pgpass\u3001.pg_service.conf \u7b49\u3002\uff08\u67e5\u627e\u4e3b\u76ee\u5f55\u7684\u89c4\u5219\u8be6\u89c1\u7b2c 32.15 \u8282\u3002\uff09\u4ed6\u4eec\u4e5f\u53ef\u80fd\u5229\u7528 peer\u3001ident \u7b49\u8ba4\u8bc1\u65b9\u5f0f\u6388\u4e88\u7684\u4efb\u4f55\u4fe1\u4efb\u5173\u7cfb\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-OBJECT-NAME\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.2.\u00a0\u5bf9\u8c61\u540d\u79f0\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u9009\u9879\u53ef\u7528\u4e8e\u63a7\u5236\u53d1\u9001\u5230\u8fdc\u7a0b <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u7684 SQL \u8bed\u53e5\u4e2d\u6240\u4f7f\u7528\u7684\u540d\u79f0\u3002\u5f53\u521b\u5efa\u5916\u90e8\u8868\u65f6\u6240\u7528\u7684\u540d\u79f0\u4e0e\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u7684\u540d\u79f0\u4e0d\u540c\u65f6\uff0c\u5c31\u9700\u8981\u8fd9\u4e9b\u9009\u9879\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">schema_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">table_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">column_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-COST-ESTIMATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.3.\u00a0\u4ee3\u4ef7\u4f30\u7b97\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u901a\u8fc7\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u67e5\u8be2\u6765\u83b7\u53d6\u8fdc\u7a0b\u6570\u636e\uff0c\u56e0\u6b64\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u626b\u63cf\u5916\u90e8\u8868\u7684\u4f30\u8ba1\u4ee3\u4ef7\u5e94\u5f53\u7b49\u4e8e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b8c\u6210\u8be5\u64cd\u4f5c\u7684\u4ee3\u4ef7\uff0c\u518d\u52a0\u4e0a\u4e00\u4e9b\u901a\u4fe1\u5f00\u9500\u3002\u83b7\u5f97\u8fd9\u79cd\u4f30\u7b97\u6700\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u662f\u5411\u8fdc\u7a0b\u670d\u52a1\u5668\u8be2\u95ee\uff0c\u518d\u628a\u5f00\u9500\u52a0\u4e0a\u53bb\uff1b\u4f46\u5bf9\u4e8e\u7b80\u5355\u67e5\u8be2\uff0c\u4e3a\u4e86\u53d6\u5f97\u4ee3\u4ef7\u4f30\u7b97\u800c\u989d\u5916\u53d1\u9001\u4e00\u6b21\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ef\u80fd\u5e76\u4e0d\u5212\u7b97\u3002\u56e0\u6b64 <code class=\"filename\">postgres_fdw</code> \u63d0\u4f9b\u4ee5\u4e0b\u9009\u9879\u6765\u63a7\u5236\u4ee3\u4ef7\u4f30\u7b97\u7684\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">use_remote_estimate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b <code class=\"command\">EXPLAIN</code> \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_startup_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_tuple_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">0.2</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u771f\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4ece\u8fdc\u7a0b\u670d\u52a1\u5668\u83b7\u53d6\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u5047\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u5728\u672c\u5730\u6267\u884c\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u518d\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u9664\u975e\u6709\u8fdc\u7a0b\u8868\u7edf\u8ba1\u4fe1\u606f\u7684\u672c\u5730\u526f\u672c\u53ef\u7528\uff0c\u5426\u5219\u8fd9\u79cd\u672c\u5730\u4f30\u7b97\u4e0d\u592a\u53ef\u80fd\u975e\u5e38\u51c6\u786e\u3002\u66f4\u65b0\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c\u662f\u5728\u5916\u90e8\u8868\u4e0a\u8fd0\u884c<a class=\"xref\" href=\"/docs/devel/sql-analyze.html\" title=\"ANALYZE\"><span class=\"refentrytitle\">ANALYZE</span></a>\uff1b\u8fd9\u6837\u4f1a\u626b\u63cf\u8fdc\u7a0b\u8868\uff0c\u7136\u540e\u50cf\u5bf9\u5f85\u672c\u5730\u8868\u4e00\u6837\u8ba1\u7b97\u5e76\u5b58\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u4fdd\u7559\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u8fdc\u7a0b\u8868\u6bcf\u6b21\u67e5\u8be2\u7684\u89c4\u5212\u5f00\u9500\uff1b\u4f46\u5982\u679c\u8fdc\u7a0b\u8868\u7ecf\u5e38\u66f4\u65b0\uff0c\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u5f88\u5feb\u5c31\u4f1a\u8fc7\u65f6\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd <code class=\"command\">ANALYZE</code> \u64cd\u4f5c\u7684\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">analyze_sampling</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u51b3\u5b9a\u5916\u90e8\u8868 ANALYZE \u662f\u5728\u8fdc\u7a0b\u91c7\u6837\uff0c\u8fd8\u662f\u8bfb\u53d6\u5e76\u4f20\u8f93\u5168\u90e8\u6570\u636e\u540e\u5728\u672c\u5730\u91c7\u6837\u3002\u652f\u6301 off\u3001random\u3001system\u3001bernoulli \u548c auto\u3002off \u7981\u7528\u8fdc\u7a0b\u91c7\u6837\uff0c\u5168\u90e8\u6570\u636e\u4f1a\u4f20\u5230\u672c\u5730\u540e\u91c7\u6837\u3002random \u4f7f\u7528 random() \u51fd\u6570\u5728\u8fdc\u7a0b\u9009\u62e9\u8fd4\u56de\u884c\uff1bsystem \u548c bernoulli \u4f7f\u7528\u540c\u540d\u5185\u7f6e TABLESAMPLE \u65b9\u6cd5\u3002random \u9002\u7528\u4e8e\u6240\u6709\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\uff0cTABLESAMPLE \u4ec5\u4ece 9.5 \u8d77\u652f\u6301\u3002\u9ed8\u8ba4\u503c auto \u81ea\u52a8\u9009\u62e9\u63a8\u8350\u65b9\u6cd5\uff0c\u76ee\u524d\u6839\u636e\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\u9009\u62e9 bernoulli \u6216 random\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_stats</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u51b3\u5b9a\u5728\u5916\u90e8\u8868\u4e0a\u6267\u884c <code class=\"command\">ANALYZE</code> \u65f6\uff0c\u662f\u5426\u6539\u4e3a\u5c1d\u8bd5\u83b7\u53d6\u8fdc\u7a0b\u8868\u7684\u73b0\u6709\u7edf\u8ba1\u4fe1\u606f\uff0c\u5e76\u5c06\u8fd9\u4e9b\u7edf\u8ba1\u4fe1\u606f\u76f4\u63a5\u5bfc\u5165\u5230\u672c\u5730\u670d\u52a1\u5668\uff08\u4e0d\u5e94\u7528\u5916\u90e8\u8868\u5217\u7684<code class=\"literal\">n_distinct</code>\u9009\u9879\uff09\u3002\u5982\u679c\u5c1d\u8bd5\u5931\u8d25\uff0c\u5219\u4f1a\u901a\u8fc7\u5bf9\u5916\u90e8\u8868\u8fdb\u884c\u884c\u91c7\u6837\u6765\u6536\u96c6\u7edf\u8ba1\u4fe1\u606f\u3002\u8be5\u9009\u9879\u4ec5\u5728\u8fdc\u7a0b\u8868\u5c5e\u4e8e\u53ef\u4ee5\u62e5\u6709\u5e38\u89c4\u7edf\u8ba1\u4fe1\u606f\u7684\u5bf9\u8c61\u65f6\u624d\u6709\u7528\uff08\u5373\u975e\u7ee7\u627f\u7684\u8868\u548c\u7269\u5316\u89c6\u56fe\uff09\u3002\u4f7f\u7528\u8be5\u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u8fdc\u7a0b\u8868\u7684\u73b0\u6709\u7edf\u8ba1\u4fe1\u606f\u4fdd\u6301\u6700\u65b0\u662f\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n<p lang=\"zh\">\u5982\u679c\u5916\u90e8\u8868\u662f\u5206\u533a\u8868\u7684\u4e00\u4e2a\u5206\u533a\uff0c\u90a3\u4e48\u5373\u4fbf\u8bbe\u7f6e\u4e86\u8be5\u9009\u9879\uff0c\u5728\u5206\u6790\u6574\u4e2a\u5206\u533a\u8868\u65f6\uff0c\u4ecd\u7136\u4f1a\u5bf9\u8be5\u5916\u90e8\u8868\u6267\u884c\u884c\u91c7\u6837\uff1b\u4e0d\u8fc7\uff0c\u5982\u679c\u76f4\u63a5\u5206\u6790\u8be5\u5916\u90e8\u8868\uff0c\u5e76\u4e14\u542f\u7528\u4e86\u8be5\u9009\u9879\uff0c\u5c31\u4f1a\u4f18\u5148\u5c1d\u8bd5\u83b7\u53d6\u5e76\u5bfc\u5165\u8fdc\u7a0b\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u6b64\u9009\u9879\u76ee\u524d\u4e0d\u652f\u6301\u8fdc\u7a0b\u8868\u53c2\u4e0e\u7ee7\u627f\uff08\u6216\u66fe\u7ecf\u53c2\u4e0e\u7ee7\u627f\uff09\u7684\u60c5\u51b5\u3002\u8fd9\u662f\u4e00\u4e2a\u5b9e\u73b0\u4e0a\u7684\u9650\u5236\uff0c\u53ef\u80fd\u4f1a\u5728\u5c06\u6765\u7684\u7248\u672c\u4e2d\u4fee\u590d\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-REMOTE-EXECUTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.4.\u00a0\u8fdc\u7a0b\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709\u4f7f\u7528\u5185\u7f6e\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u624d\u4f1a\u88ab\u8003\u8651\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u3002\u6d89\u53ca\u975e\u5185\u7f6e\u51fd\u6570\u7684\u5b50\u53e5\u4f1a\u5728\u53d6\u56de\u884c\u4e4b\u540e\u5728\u672c\u5730\u68c0\u67e5\u3002\u5982\u679c\u8fd9\u4e9b\u51fd\u6570\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e5f\u53ef\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fe1\u5176\u7ed3\u679c\u4e0e\u672c\u5730\u76f8\u540c\uff0c\u5219\u5c06\u8fd9\u7c7b <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u7aef\u6267\u884c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u6b64\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">extensions</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 <span class=\"productname\">PostgreSQL</span> \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"literal\">extensions</code> \u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fetch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">batch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u4e2d\u5e94\u63d2\u5165\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">1</code>\u3002</p>\n<p lang=\"zh\">postgres_fdw \u6bcf\u6b21\u5b9e\u9645\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u4e0e\u6307\u5b9a\u7684 batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u5355\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7aef\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u91cf\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570 * batch_size \u8d85\u8fc7\u6b64\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u9519\u8bef\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u4e5f\u9002\u7528\u4e8e\u5411\u5916\u90e8\u8868\u590d\u5236\u6570\u636e\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u5b9e\u9645\u4e00\u6b21\u590d\u5236\u7684\u884c\u6570\u4f1a\u4ee5\u4e0e\u63d2\u5165\u573a\u666f\u7c7b\u4f3c\u7684\u65b9\u5f0f\u786e\u5b9a\uff0c\u4f46\u7531\u4e8e <code class=\"command\">COPY</code> \u547d\u4ee4\u7684\u5b9e\u73b0\u9650\u5236\uff0c\u6700\u591a\u53ea\u80fd\u4e3a 1000 \u884c\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-ASYNCHRONOUS-EXECUTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.5.\u00a0\u5f02\u6b65\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c <code class=\"structname\">Append</code> \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">async_capable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n<p lang=\"zh\">\u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c<code class=\"filename\">postgres_fdw</code> \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f <code class=\"structname\">Append</code> \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-TRANSACTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.6.\u00a0\u4e8b\u52a1\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0c\u5728 <code class=\"filename\">postgres_fdw</code> \u4e2d\uff0c\u4e8b\u52a1\u662f\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u6765\u7ba1\u7406\u7684\uff0c\u5b50\u4e8b\u52a1\u5219\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u6765\u7ba1\u7406\u3002\u5f53\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e5f\u4f1a\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u53ef\u4ee5\u6539\u5584\u6027\u80fd\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">parallel_commit</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">parallel_abort</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u4e2d\u6b62\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u4e2d\u6b62\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5982\u679c\u542f\u7528\u4e86\u8fd9\u4e9b\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002</p>\n<p lang=\"zh\">\u542f\u7528\u8fd9\u4e9b\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-UPDATABILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.7.\u00a0\u53ef\u66f4\u65b0\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u66f4\u65b0\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">updatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u548c <code class=\"command\">DELETE</code> \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c<code class=\"literal\">information_schema</code> \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-TRUNCATABILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.8.\u00a0\u53ef\u622a\u65ad\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u622a\u65ad\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">truncatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">TRUNCATE</code> \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-IMPORTING\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.9.\u00a0\u5bfc\u5165\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/devel/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u5bfc\u5165\u5916\u90e8\u8868\u5b9a\u4e49\u3002\u8be5\u547d\u4ee4\u4f1a\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4ee5\u5339\u914d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868\u6216\u89c6\u56fe\u3002\u5982\u679c\u8981\u5bfc\u5165\u7684\u8fdc\u7a0b\u8868\u5217\u4f7f\u7528\u7528\u6237\u5b9a\u4e49\u6570\u636e\u7c7b\u578b\uff0c\u5219\u672c\u5730\u670d\u52a1\u5668\u5fc5\u987b\u5b58\u5728\u540c\u540d\u4e14\u517c\u5bb9\u7684\u7c7b\u578b\u3002</p>\n<p lang=\"zh\">\u53ef\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\uff08\u5728 <code class=\"command\">IMPORT FOREIGN SCHEMA</code> \u547d\u4ee4\u4e2d\u7ed9\u51fa\uff09\u81ea\u5b9a\u4e49\u5bfc\u5165\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">import_collate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">COLLATE</code> \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a <code class=\"literal\">true</code>\uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 <code class=\"literal\">COLLATE \"default\"</code> \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_default</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">DEFAULT</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b<code class=\"function\">nextval()</code> \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_generated</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">GENERATED</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_not_null</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">NOT NULL</code> \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u9664 <code class=\"literal\">NOT NULL</code> \u4e4b\u5916\u7684\u7ea6\u675f\u6c38\u8fdc\u4e0d\u4f1a\u4ece\u8fdc\u7a0b\u8868\u5bfc\u5165\u3002\u867d\u7136 <span class=\"productname\">PostgreSQL</span> \u786e\u5b9e\u652f\u6301\u5728\u5916\u90e8\u8868\u4e0a\u5b9a\u4e49\u68c0\u67e5\u7ea6\u675f\uff0c\u4f46\u7531\u4e8e\u7ea6\u675f\u8868\u8fbe\u5f0f\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u6c42\u503c\u4e0d\u540c\uff0c\u7cfb\u7edf\u4e0d\u4f1a\u81ea\u52a8\u5bfc\u5165\u5b83\u4eec\u3002\u6b64\u7c7b\u884c\u4e3a\u4e0d\u4e00\u81f4\u7684\u68c0\u67e5\u7ea6\u675f\uff0c\u53ef\u80fd\u5bfc\u81f4\u67e5\u8be2\u4f18\u5316\u4e2d\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5e0c\u671b\u5bfc\u5165\u68c0\u67e5\u7ea6\u675f\uff0c\u5fc5\u987b\u624b\u5de5\u5b8c\u6210\uff0c\u5e76\u5e94\u4ed4\u7ec6\u6838\u5b9e\u6bcf\u4e00\u4e2a\u7ea6\u675f\u7684\u8bed\u4e49\u3002\u6709\u5173\u5916\u90e8\u8868\u4e0a\u68c0\u67e5\u7ea6\u675f\u5904\u7406\u65b9\u5f0f\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/devel/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u3002</p>\n<p lang=\"zh\">\u4f5c\u4e3a\u5176\u4ed6\u8868\u5206\u533a\u7684\u8868\u6216\u5916\u90e8\u8868\uff0c\u4ec5\u5728\u5b83\u4eec\u88ab\u660e\u786e\u5199\u5165 <code class=\"literal\">LIMIT TO</code> \u5b50\u53e5\u65f6\u624d\u4f1a\u5bfc\u5165\u3002\u5426\u5219\uff0c\u5b83\u4eec\u4f1a\u88ab\u81ea\u52a8\u6392\u9664\u5728<a class=\"xref\" href=\"/docs/devel/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u4e4b\u5916\u3002\u7531\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u901a\u8fc7\u4f5c\u4e3a\u5206\u533a\u5c42\u6b21\u6839\u7684\u5206\u533a\u8868\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ea\u5bfc\u5165\u5206\u533a\u8868\u5373\u53ef\u8bbf\u95ee\u5168\u90e8\u6570\u636e\uff0c\u800c\u65e0\u9700\u521b\u5efa\u989d\u5916\u5bf9\u8c61\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-CONNECTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.40.1.10.\u00a0\u8fde\u63a5\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u672c\u5730\u4f1a\u8bdd\u4e2d\u4fdd\u6301\u6253\u5f00\uff0c\u4ee5\u4fbf\u91cd\u590d\u4f7f\u7528\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt id=\"POSTGRES-FDW-OPTION-KEEP-CONNECTIONS\"><span class=\"term\"><code class=\"literal\">keep_connections</code> (<code class=\"type\">boolean</code>)</span> </dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">on</code>\u3002\u5982\u679c\u8bbe\u7f6e\u4e3a <code class=\"literal\">off</code>\uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002</p>\n</p>\n</dd>\n<dt id=\"POSTGRES-FDW-OPTION-USE-SCRAM-PASSTHROUGH\"><span class=\"term\"><code class=\"literal\">use_scram_passthrough</code> (<code class=\"type\">boolean</code>)</span> </dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u5728\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\u65f6\u662f\u5426\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u3002\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u6307\u5b9a\u3002\u7528\u6237\u6620\u5c04\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5916\u90e8\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\u3002\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4f7f\u7528\u7ecf SCRAM Hash \u5904\u7406\u7684\u51ed\u636e\uff0c\u800c\u4e0d\u662f\u660e\u6587\u7528\u6237\u5bc6\u7801\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5728 PostgreSQL \u7cfb\u7edf\u76ee\u5f55\u4e2d\u5b58\u50a8\u660e\u6587\u7528\u6237\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8981\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8bf7\u6c42 <code class=\"literal\">scram-sha-256</code> \u8ba4\u8bc1\u65b9\u6cd5\uff1b\u5426\u5219\u8fde\u63a5\u5c06\u5931\u8d25\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8fdc\u7a0b\u670d\u52a1\u5668\u53ef\u4ee5\u662f\u4efb\u4f55\u652f\u6301 SCRAM \u7684 PostgreSQL \u7248\u672c\u3002\u5bf9 <code class=\"literal\">use_scram_passthrough</code> \u7684\u652f\u6301\u53ea\u8981\u6c42\u5ba2\u6237\u7aef\u4e00\u4fa7\uff08FDW \u4fa7\uff09\u5177\u5907\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u7528\u6237\u6620\u5c04\u5bc6\u7801\u4e0d\u4f1a\u88ab\u4f7f\u7528\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8fd0\u884c <code class=\"filename\">postgres_fdw</code> \u7684\u670d\u52a1\u5668\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u5fc5\u987b\u9488\u5bf9\u7528\u4e8e\u5728 <code class=\"filename\">postgres_fdw</code> \u4e0a\u8ba4\u8bc1\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8be5\u7528\u6237\uff0c\u62e5\u6709\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\uff08\u52a0\u5bc6\u5bc6\u7801\uff09\uff08\u76d0\u503c\u548c\u8fed\u4ee3\u6b21\u6570\u90fd\u5fc5\u987b\u76f8\u540c\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5bc6\u7801\u76f8\u540c\uff09\u3002</p>\n<p>\u56e0\u800c\uff0c\u5982\u679c\u8981\u5efa\u7acb\u5230\u591a\u4e2a\u4e3b\u673a\u7684 FDW \u8fde\u63a5\uff0c\u4f8b\u5982\u7528\u4e8e\u5206\u533a\u5916\u90e8\u8868\u6216\u5206\u7247\uff0c\u5219\u6240\u6709\u4e3b\u673a\u90fd\u5fc5\u987b\u4e3a\u76f8\u5173\u7528\u6237\u4fdd\u5b58\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u53d1\u8d77\u5bf9\u5916 FDW \u8fde\u63a5\u7684 PostgreSQL \u5b9e\u4f8b\u4e2d\uff0c\u5f53\u524d\u4f1a\u8bdd\u7684\u4f20\u5165\u5ba2\u6237\u7aef\u8fde\u63a5\u4e5f\u5fc5\u987b\u4f7f\u7528 SCRAM \u8ba4\u8bc1\u3002\uff08\u56e0\u6b64\u79f0\u4e3a<span class=\"quote\">\u201c<span class=\"quote\">\u900f\u4f20</span>\u201d</span>\uff1aSCRAM \u5fc5\u987b\u5728\u8fdb\u5165\u548c\u79bb\u5f00\u65f6\u90fd\u88ab\u4f7f\u7528\u3002\uff09\u8fd9\u662f SCRAM \u534f\u8bae\u7684\u6280\u672f\u8981\u6c42\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0d\u5f97\u7528\u4e8e\u8ba2\u9605\u8fde\u63a5\uff08\u89c1<a class=\"xref\" href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-SERVER-SUBSCRIPTION\" title=\"F.40.4.\u00a0\u8ba2\u9605\u7ba1\u7406\">\u7b2c\u00a0F.40.4\u00a0\u8282</a>\uff09\u3002</p>\n</li>\n</ul>\n</div>\n</dd>\n</dl>\n</div>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-FUNCTIONS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-FUNCTIONS\">F.40.2. \u51fd\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_get_connections( IN check_conn boolean DEFAULT false, OUT server_name text, OUT user_name text, OUT valid boolean, OUT used_in_xact boolean, OUT closed boolean, OUT remote_backend_pid int4) returns setof record</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u8fd4\u56de postgres_fdw \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u6240\u6709\u6253\u5f00\u8fde\u63a5\u7684\u4fe1\u606f\u3002\u5982\u679c\u6ca1\u6709\u6253\u5f00\u7684\u8fde\u63a5\uff0c\u5219\u4e0d\u8fd4\u56de\u4efb\u4f55\u8bb0\u5f55\u3002</p>\n<p lang=\"zh\">check_conn \u4e3a true \u65f6\uff0c\u6b64\u51fd\u6570\u4f1a\u68c0\u67e5\u6bcf\u4e2a\u8fde\u63a5\u7684\u72b6\u6001\uff0c\u5e76\u5728 closed \u5217\u4e2d\u663e\u793a\u7ed3\u679c\u3002\u6b64\u529f\u80fd\u76ee\u524d\u4ec5\u9002\u7528\u4e8e\u652f\u6301 poll \u7cfb\u7edf\u8c03\u7528\u7684\u975e\u6807\u51c6 POLLRDHUP \u6269\u5c55\u7684\u7cfb\u7edf\uff0c\u5305\u62ec Linux\u3002\u5b83\u53ef\u7528\u4e8e\u68c0\u67e5\u4e8b\u52a1\u4e2d\u4f7f\u7528\u7684\u5168\u90e8\u8fde\u63a5\u662f\u5426\u4ecd\u7136\u6253\u5f00\u3002\u53ea\u8981\u6709\u8fde\u63a5\u5173\u95ed\uff0c\u4e8b\u52a1\u5c31\u65e0\u6cd5\u6210\u529f\u63d0\u4ea4\uff0c\u56e0\u6b64\u68c0\u6d4b\u5230\u8fde\u63a5\u5173\u95ed\u65f6\u5e94\u5c3d\u5feb\u56de\u6eda\uff0c\u800c\u975e\u7ee7\u7eed\u6267\u884c\u81f3\u7ed3\u675f\u3002\u5982\u679c\u51fd\u6570\u62a5\u544a\u67d0\u4e2a\u8fde\u63a5\u7684 used_in_xact \u548c closed \u5747\u4e3a true\uff0c\u7528\u6237\u53ef\u4ee5\u7acb\u5373\u56de\u6eda\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT * FROM postgres_fdw_get_connections(true);\n server_name | user_name | valid | used_in_xact | closed | remote_backend_pid\n-------------+-----------+-------+--------------+-----------------------------\n loopback1   | postgres  | t     | t            | f      |            1353340\n loopback2   | public    | t     | t            | f      |            1353120\n loopback3   |           | f     | t            | f      |            1353156\n</pre>\n<p lang=\"zh\">\u8f93\u51fa\u5217\u89c1<a class=\"xref\" href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-GET-CONNECTIONS-COLUMNS\" title=\"\u8868\u00a0F.29.\u00a0postgres_fdw_get_connections \u8f93\u51fa\u5217\">\u8868\u00a0F.29</a>\u3002</p>\n<div class=\"table\" id=\"POSTGRES-FDW-GET-CONNECTIONS-COLUMNS\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a0F.29.\u00a0<code class=\"function\">postgres_fdw_get_connections</code> \u8f93\u51fa\u5217</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5217</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"structfield\">server_name</code></td>\n<td lang=\"zh\">\u6587\u672c</td>\n<td lang=\"zh\">\u6b64\u8fde\u63a5\u7684\u5916\u90e8\u670d\u52a1\u5668\u540d\u79f0\u3002\u5982\u679c\u670d\u52a1\u5668\u5df2\u88ab\u5220\u9664\u4f46\u8fde\u63a5\u4ecd\u4fdd\u6301\u6253\u5f00\uff08\u5373\u88ab\u6807\u8bb0\u4e3a\u65e0\u6548\uff09\uff0c\u5219\u8be5\u503c\u4e3a <code class=\"literal\">NULL</code>\u3002</td>\n</tr>\n<tr>\n<td><code class=\"structfield\">user_name</code></td>\n<td lang=\"zh\">\u6587\u672c</td>\n<td lang=\"zh\">\u6620\u5c04\u5230\u6b64\u8fde\u63a5\u6240\u5c5e\u5916\u90e8\u670d\u52a1\u5668\u7684\u672c\u5730\u7528\u6237\u540d\u79f0\uff1b\u5982\u679c\u4f7f\u7528\u7684\u662f public \u6620\u5c04\uff0c\u5219\u4e3a <code class=\"literal\">public</code>\u3002\u5982\u679c\u7528\u6237\u6620\u5c04\u5df2\u88ab\u5220\u9664\u4f46\u8fde\u63a5\u4ecd\u4fdd\u6301\u6253\u5f00\uff08\u5373\u88ab\u6807\u8bb0\u4e3a\u65e0\u6548\uff09\uff0c\u5219\u8be5\u503c\u4e3a <code class=\"literal\">NULL</code>\u3002</td>\n</tr>\n<tr>\n<td lang=\"zh\">\u6709\u6548</td>\n<td><code class=\"type\">boolean</code></td>\n<td lang=\"zh\">\u5982\u679c\u6b64\u8fde\u63a5\u65e0\u6548\uff0c\u5219\u4e3a\u5047\uff1b\u65e0\u6548\u610f\u5473\u7740\u5b83\u5728\u5f53\u524d\u4e8b\u52a1\u4e2d\u88ab\u4f7f\u7528\uff0c\u4f46\u5176\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u5df2\u88ab\u66f4\u6539\u6216\u5220\u9664\u3002\u65e0\u6548\u8fde\u63a5\u5c06\u5728\u4e8b\u52a1\u7ed3\u675f\u65f6\u5173\u95ed\u3002\u5426\u5219\u8fd4\u56de\u771f\u3002</td>\n</tr>\n<tr>\n<td><code class=\"structfield\">used_in_xact</code></td>\n<td><code class=\"type\">boolean</code></td>\n<td lang=\"zh\">\u5982\u679c\u6b64\u8fde\u63a5\u5728\u5f53\u524d\u4e8b\u52a1\u4e2d\u88ab\u4f7f\u7528\uff0c\u5219\u4e3a\u771f\u3002</td>\n</tr>\n<tr>\n<td lang=\"zh\">\u5c01\u95ed</td>\n<td><code class=\"type\">boolean</code></td>\n<td lang=\"zh\">\u6b64\u8fde\u63a5\u5df2\u5173\u95ed\u65f6\u4e3a true\uff0c\u5426\u5219\u4e3a false\u3002\u5982\u679c check_conn \u8bbe\u4e3a false\uff0c\u6216\u5f53\u524d\u5e73\u53f0\u4e0d\u652f\u6301\u8fde\u63a5\u72b6\u6001\u68c0\u67e5\uff0c\u5219\u8fd4\u56de NULL\u3002</td>\n</tr>\n<tr>\n<td><code class=\"structfield\">remote_backend_pid</code></td>\n<td><code class=\"type\">int4</code></td>\n<td lang=\"zh\">\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u5904\u7406\u6b64\u8fde\u63a5\u7684\u8fdc\u7a0b\u540e\u7aef\u8fdb\u7a0b ID\u3002\u5982\u679c\u8fdc\u7a0b\u540e\u7aef\u5df2\u7ec8\u6b62\u4e14\u8fde\u63a5\u5df2\u5173\u95ed\uff08<code class=\"literal\">closed</code> \u4e3a <code class=\"literal\">true</code>\uff09\uff0c\u6b64\u5904\u4ecd\u4f1a\u663e\u793a\u8be5\u5df2\u7ec8\u6b62\u540e\u7aef\u7684\u8fdb\u7a0b ID\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect(server_name text) returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u8bf7\u6ce8\u610f\uff0c\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\u65f6\uff0c\u5bf9\u540c\u4e00\u670d\u52a1\u5668\u53ef\u80fd\u5b58\u5728\u591a\u4e2a\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u5982\u679c\u627e\u4e0d\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u62a5\u544a\u9519\u8bef\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect('loopback1');\n postgres_fdw_disconnect\n-------------------------\n t\n</pre>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect_all() returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5168\u90e8\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect_all();\n postgres_fdw_disconnect_all\n-----------------------------\n t\n</pre>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CONNECTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-CONNECTION-MANAGEMENT\">F.40.3. \u8fde\u63a5\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u5728\u9996\u6b21\u6267\u884c\u4f7f\u7528\u4e0e\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u5173\u8054\u7684\u5916\u90e8\u8868\u7684\u67e5\u8be2\u65f6\uff0c\u4f1a\u5efa\u7acb\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8be5\u8fde\u63a5\u4f1a\u5728\u540c\u4e00\u4f1a\u8bdd\u4e2d\u4fdd\u7559\u5e76\u4f9b\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u3002\u8fd9\u4e00\u884c\u4e3a\u53ef\u901a\u8fc7\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\u63a7\u5236\u3002\u5982\u679c\u4f7f\u7528\u591a\u4e2a\u7528\u6237\u6807\u8bc6\uff08\u7528\u6237\u6620\u5c04\uff09\u8bbf\u95ee\u8be5\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u4f1a\u4e3a\u6bcf\u4e2a\u7528\u6237\u6620\u5c04\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002</p>\n<p lang=\"zh\">\u5f53\u66f4\u6539\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u7684\u5b9a\u4e49\uff0c\u6216\u5c06\u5176\u5220\u9664\u65f6\uff0c\u76f8\u5173\u8fde\u63a5\u4f1a\u88ab\u5173\u95ed\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c\u5982\u679c\u4efb\u4f55\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u5728\u4f7f\u7528\uff0c\u5219\u4f1a\u4fdd\u7559\u5230\u4e8b\u52a1\u7ed3\u675f\u3002\u5173\u95ed\u7684\u8fde\u63a5\u4f1a\u5728\u540e\u7eed\u4f7f\u7528\u5916\u90e8\u8868\u7684\u67e5\u8be2\u9700\u8981\u5b83\u4eec\u65f6\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\">\u4e00\u65e6\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5b83\u4f1a\u4e00\u76f4\u4fdd\u7559\u5230\u672c\u5730\u4f1a\u8bdd\u6216\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u9000\u51fa\u3002\u8981\u663e\u5f0f\u65ad\u5f00\u8fde\u63a5\uff0c\u53ef\u4ee5\u7981\u7528\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\uff0c\u6216\u4f7f\u7528 <code class=\"function\">postgres_fdw_disconnect</code> \u548c <code class=\"function\">postgres_fdw_disconnect_all</code> \u51fd\u6570\u3002\u4f8b\u5982\uff0c\u8fd9\u4e9b\u51fd\u6570\u53ef\u7528\u4e8e\u5173\u95ed\u4e0d\u518d\u9700\u8981\u7684\u8fde\u63a5\uff0c\u4ece\u800c\u91ca\u653e\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u8fde\u63a5\u8d44\u6e90\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-SERVER-SUBSCRIPTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-SERVER-SUBSCRIPTION\">F.40.4. \u8ba2\u9605\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f7f\u7528\u4e0e<a class=\"xref\" href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-OPTIONS-CONNECTION\" title=\"F.40.1.1.\u00a0\u8fde\u63a5\u9009\u9879\">\u7b2c\u00a0F.40.1.1\u00a0\u8282</a>\u4e2d\u63cf\u8ff0\u76f8\u540c\u7684\u9009\u9879\u6765\u652f\u6301\u8ba2\u9605\u8fde\u63a5\u3002</p>\n<p lang=\"zh\">\u4f8b\u5982\uff0c\u5047\u8bbe\u8fdc\u7a0b\u670d\u52a1\u5668 <code class=\"literal\">foreign-host</code> \u4e0a\u6709\u4e00\u4e2a\u53d1\u5e03 <code class=\"literal\">testpub</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER subscription_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'foreign-host', dbname 'foreign_db');\nCREATE USER MAPPING FOR local_user SERVER subscription_server OPTIONS (user 'foreign_user', password 'password');\nCREATE SUBSCRIPTION my_subscription SERVER subscription_server PUBLICATION testpub;\n</pre>\n<p lang=\"zh\">\u8981\u521b\u5efa\u8ba2\u9605\uff0c\u7528\u6237\u5fc5\u987b\u662f<a class=\"xref\" href=\"/docs/devel/predefined-roles.html#PREDEFINED-ROLE-PG-CREATE-SUBSCRIPTION\">pg_create_subscription</a>\u89d2\u8272\u7684\u6210\u5458\uff0c\u5e76\u4e14\u5bf9\u8be5\u670d\u52a1\u5668\u5177\u6709 <code class=\"literal\">USAGE</code> \u6743\u9650\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-TRANSACTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-TRANSACTION-MANAGEMENT\">F.40.5. \u4e8b\u52a1\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c<code class=\"filename\">postgres_fdw</code> \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002</p>\n<p lang=\"zh\">\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a <code class=\"literal\">SERIALIZABLE</code> \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code>\uff1b\u5426\u5219\u4f7f\u7528 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code> \u6216 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e <code class=\"literal\">READ COMMITTED</code> \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 <span class=\"productname\">PostgreSQL</span> \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002</p>\n<p lang=\"zh\">\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u4ee5\u4e0e\u672c\u5730\u4e8b\u52a1\u76f8\u540c\u7684\u8bfb\u5199\u6a21\u5f0f\u6253\u5f00\uff1a\u5982\u679c\u672c\u5730\u4e8b\u52a1\u662f <code class=\"literal\">READ ONLY</code>\uff0c\u5219\u8fdc\u7a0b\u4e8b\u52a1\u4ee5 <code class=\"literal\">READ ONLY</code> \u6a21\u5f0f\u6253\u5f00\uff1b\u5426\u5219\u5b83\u4ee5 <code class=\"literal\">READ WRITE</code> \u6a21\u5f0f\u6253\u5f00\u3002\uff08\u8fd9\u4e00\u89c4\u5219\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\uff09\u8bf7\u6ce8\u610f\uff0c\u8fd9\u5e76\u4e0d\u4f1a\u963b\u6b62\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u767b\u5f55\u89e6\u53d1\u5668\u5199\u5165\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u4ee5\u4e0e\u672c\u5730\u4e8b\u52a1\u76f8\u540c\u7684\u53ef\u5ef6\u8fdf\u6a21\u5f0f\u6253\u5f00\uff1a\u5982\u679c\u672c\u5730\u4e8b\u52a1\u662f <code class=\"literal\">DEFERRABLE</code>\uff0c\u5219\u8fdc\u7a0b\u4e8b\u52a1\u4ee5 <code class=\"literal\">DEFERRABLE</code> \u6a21\u5f0f\u6253\u5f00\uff1b\u5426\u5219\u5b83\u4ee5 <code class=\"literal\">NOT DEFERRABLE</code> \u6a21\u5f0f\u6253\u5f00\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c<code class=\"filename\">postgres_fdw</code> \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">F.40.6. \u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 <code class=\"literal\">extensions</code> \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f <code class=\"literal\">IMMUTABLE</code>\u3002\u5bf9\u4e8e <code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u67e5\u8be2\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 <code class=\"literal\">BEFORE</code> \u6216 <code class=\"literal\">AFTER</code> \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 <code class=\"literal\">CHECK OPTION</code> \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 <code class=\"command\">UPDATE</code> \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001<code class=\"literal\">IMMUTABLE</code> \u64cd\u4f5c\u7b26\u6216 <code class=\"literal\">IMMUTABLE</code> \u51fd\u6570\u3002</p>\n<p lang=\"zh\">\u5f53 <code class=\"filename\">postgres_fdw</code> \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 <code class=\"literal\">JOIN</code> \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002</p>\n<p lang=\"zh\">\u5916\u90e8\u8868\u4e0e FROM \u5217\u8868\u4e2d\u96c6\u5408\u8fd4\u56de\u51fd\u6570\u4e4b\u95f4\u7684 INNER JOIN \u540c\u6837\u53ef\u4ee5\u4e0b\u63a8\uff1a\u51fd\u6570\u8c03\u7528\u4f1a\u5e76\u5165\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ea\u83b7\u53d6\u4e0e\u51fd\u6570\u8f93\u51fa\u5339\u914d\u7684\u884c\u3002\u53ea\u6709\u51fd\u6570\u4e3a IMMUTABLE\uff08\u4fdd\u8bc1\u8fdc\u7a0b\u8ba1\u7b97\u4e0e\u672c\u5730\u8ba1\u7b97\u7ed3\u679c\u76f8\u540c\uff09\u3001\u53c2\u6570\u53ca\u5176\u9650\u5236\u6761\u4ef6\u5747\u53ef\u4e0b\u63a8\uff0c\u4e14\u4e0d\u5b58\u5728\u4ee5\u4e0b\u6392\u9664\u6761\u4ef6\u65f6\u624d\u5c1d\u8bd5\uff1a\u8fde\u63a5\u7c7b\u578b\u4e0d\u662f INNER\uff1b\u51fd\u6570\u4f7f\u7528 WITH ORDINALITY\uff1b\u51fd\u6570\u8fd4\u56de record \u7c7b\u578b\u4f46\u6ca1\u6709\u9644\u5e26\u5217\u5b9a\u4e49\u5217\u8868\uff1b\u6216\u8005\u51fd\u6570\u6a2a\u5411\u5f15\u7528\u540c\u4e00\u67e5\u8be2\u5c42\u7ea7\u7684\u5176\u4ed6\u5173\u7cfb\u3002\u5141\u8bb8\u51fd\u6570\u53c2\u6570\u6765\u81ea\u5916\u5c42\u67e5\u8be2\uff0c\u8be5\u53c2\u6570\u4f1a\u4f5c\u4e3a\u67e5\u8be2\u53c2\u6570\u4f20\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">EXPLAIN VERBOSE</code> \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">F.40.7. \u8fdc\u7a0b\u67e5\u8be2\u6267\u884c\u73af\u5883</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728 <code class=\"filename\">postgres_fdw</code> \u6253\u5f00\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u4e2d\uff0c<a class=\"xref\" href=\"/docs/devel/runtime-config-client.html#GUC-SEARCH-PATH\">search_path</a>\u53c2\u6570\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u5305\u542b <code class=\"literal\">pg_catalog</code>\uff0c\u8fd9\u6837\u65e0\u9700\u6a21\u5f0f\u9650\u5b9a\u5c31\u53ea\u80fd\u770b\u5230\u5185\u7f6e\u5bf9\u8c61\u3002\u8fd9\u5bf9 <code class=\"filename\">postgres_fdw</code> \u81ea\u8eab\u751f\u6210\u7684\u67e5\u8be2\u4e0d\u662f\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u603b\u662f\u63d0\u4f9b\u8fd9\u79cd\u9650\u5b9a\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bf9\u90a3\u4e9b\u901a\u8fc7\u8fdc\u7a0b\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u6216\u89c4\u5219\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u51fd\u6570\u5e26\u6765\u98ce\u9669\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u89c6\u56fe\uff0c\u5219\u8be5\u89c6\u56fe\u4e2d\u4f7f\u7528\u7684\u4efb\u4f55\u51fd\u6570\u90fd\u4f1a\u5728\u53d7\u9650\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u6267\u884c\u3002\u5efa\u8bae\u5728\u8fd9\u7c7b\u51fd\u6570\u4e2d\u5bf9\u6240\u6709\u540d\u79f0\u90fd\u5199\u6210\u5e26\u6a21\u5f0f\u9650\u5b9a\u7684\u5f62\u5f0f\uff0c\u6216\u8005\u4e3a\u8fd9\u7c7b\u51fd\u6570\u9644\u52a0 <code class=\"literal\">SET search_path</code> \u9009\u9879\uff08\u89c1<a class=\"xref\" href=\"/docs/devel/sql-createfunction.html\" title=\"CREATE FUNCTION\"><span class=\"refentrytitle\">CREATE FUNCTION</span></a>\uff09\uff0c\u4ee5\u5efa\u7acb\u5176\u9884\u671f\u7684\u641c\u7d22\u8def\u5f84\u73af\u5883\u3002</p>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u8fd8\u4f1a\u4e3a\u8fdc\u7a0b\u4f1a\u8bdd\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/devel/runtime-config-client.html#GUC-TIMEZONE\">TimeZone</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">UTC</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/devel/runtime-config-client.html#GUC-DATESTYLE\">DateStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">ISO</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/devel/runtime-config-client.html#GUC-INTERVALSTYLE\">IntervalStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\u5bf9\u4e8e 9.0 \u53ca\u66f4\u65b0\u7248\u672c\u7684\u8fdc\u7aef\u670d\u52a1\u5668\uff0cextra_float_digits \u8bbe\u4e3a 3\uff1b\u66f4\u65e9\u7248\u672c\u5219\u8bbe\u4e3a 2\u3002</li>\n</ul>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u8bbe\u7f6e\u901a\u5e38\u4e0d\u50cf <code class=\"varname\">search_path</code> \u90a3\u6837\u5bb9\u6613\u51fa\u95ee\u9898\uff0c\u4f46\u5982\u679c\u6709\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684 <code class=\"literal\">SET</code> \u9009\u9879\u5904\u7406\u3002</p>\n<p lang=\"zh\"><span class=\"emphasis\"><em>\u4e0d</em></span>\u5efa\u8bae\u901a\u8fc7\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u7684\u4f1a\u8bdd\u7ea7\u8bbe\u7f6e\u6765\u8986\u76d6\u8fd9\u79cd\u884c\u4e3a\uff1b\u8fd9\u5f88\u53ef\u80fd\u5bfc\u81f4 <code class=\"filename\">postgres_fdw</code> \u5de5\u4f5c\u5f02\u5e38\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">F.40.8. \u8de8\u7248\u672c\u517c\u5bb9\u6027</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002</p>\n<p lang=\"zh\">\u4e00\u4e2a\u9650\u5236\u662f\uff0cpostgres_fdw \u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u6240\u7528\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u901a\u8fc7\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\uff0c\u4ee5\u6b64\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002</p>\n<p lang=\"zh\">\u53e6\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5728\u5916\u90e8\u8868\u4e0a\u6267\u884c <code class=\"command\">INSERT</code> \u8bed\u53e5\u5e76\u5e26\u6709 <code class=\"literal\">ON CONFLICT DO NOTHING</code> \u5b50\u53e5\u65f6\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8fd0\u884c <span class=\"productname\">PostgreSQL</span> 9.5 \u6216\u66f4\u9ad8\u7248\u672c\uff0c\u56e0\u4e3a\u66f4\u65e9\u7248\u672c\u4e0d\u652f\u6301\u6b64\u7279\u6027\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-WAIT-EVENTS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-WAIT-EVENTS\">F.40.9. \u7b49\u5f85\u4e8b\u4ef6</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u5728\u7b49\u5f85\u4e8b\u4ef6\u7c7b\u578b <code class=\"literal\">Extension</code> \u4e0b\u62a5\u544a\u4ee5\u4e0b\u7b49\u5f85\u4e8b\u4ef6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwCleanupResult</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u4e8b\u52a1\u4e2d\u6b62\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwConnect</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwGetResult</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u63a5\u6536\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u67e5\u8be2\u7ed3\u679c\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CONFIGURATION-PARAMETERS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-CONFIGURATION-PARAMETERS\">F.40.10. \u914d\u7f6e\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt id=\"GUC-PGFDW-APPLICATION-NAME\"><span class=\"term\"><code class=\"varname\">postgres_fdw.application_name</code> (<code class=\"type\">string</code>) </span> </dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a\u7528\u4e8e<a class=\"xref\" href=\"/docs/devel/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u914d\u7f6e\u53c2\u6570\u7684\u503c\uff0c\u8be5\u503c\u4f1a\u5728 <code class=\"filename\">postgres_fdw</code> \u5efa\u7acb\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u65f6\u4f7f\u7528\u3002\u8fd9\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u5bf9\u8c61\u7684 <code class=\"varname\">application_name</code> \u9009\u9879\u3002\u8bf7\u6ce8\u610f\uff0c\u4fee\u6539\u6b64\u53c2\u6570\u4e0d\u4f1a\u5f71\u54cd\u4efb\u4f55\u73b0\u6709\u8fde\u63a5\uff0c\u9664\u975e\u8fd9\u4e9b\u8fde\u63a5\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\"><code class=\"varname\">postgres_fdw.application_name</code> \u53ef\u4ee5\u662f\u4efb\u610f\u957f\u5ea6\u7684\u4efb\u610f\u5b57\u7b26\u4e32\uff0c\u751a\u81f3\u53ef\u4ee5\u5305\u542b\u975e ASCII \u5b57\u7b26\u3002\u4e0d\u8fc7\uff0c\u5f53\u5b83\u88ab\u4f20\u9012\u5e76\u4f5c\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u4e2d\u7684 <code class=\"varname\">application_name</code> \u4f7f\u7528\u65f6\uff0c\u8bf7\u6ce8\u610f\u5b83\u4f1a\u88ab\u622a\u65ad\u5230\u5c11\u4e8e <code class=\"symbol\">NAMEDATALEN</code> \u4e2a\u5b57\u7b26\u3002\u9664\u53ef\u6253\u5370 ASCII \u5b57\u7b26\u4ee5\u5916\u7684\u6240\u6709\u5b57\u7b26\u90fd\u4f1a\u88ab\u66ff\u6362\u4e3a<a class=\"link\" href=\"/docs/devel/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE\" title=\"4.1.2.2.\u00a0C\u98ce\u683c\u8f6c\u4e49\u7684\u5b57\u7b26\u4e32\u5e38\u91cf\">C \u98ce\u683c\u7684\u5341\u516d\u8fdb\u5236\u8f6c\u4e49</a>\u3002\u6709\u5173\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/devel/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u3002</p>\n<p lang=\"zh\"><code class=\"literal\">%</code> \u5b57\u7b26\u8868\u793a<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u7684\u5f00\u59cb\uff0c\u5e76\u4f1a\u6309\u4e0b\u8ff0\u65b9\u5f0f\u66ff\u6362\u4e3a\u72b6\u6001\u4fe1\u606f\u3002\u672a\u8bc6\u522b\u7684\u8f6c\u4e49\u4f1a\u88ab\u5ffd\u7565\u3002\u5176\u4ed6\u5b57\u7b26\u4f1a\u539f\u6837\u590d\u5236\u5230\u5e94\u7528\u540d\u4e2d\u3002\u8bf7\u6ce8\u610f\uff0c\u4e0d\u5141\u8bb8\u5728 <code class=\"literal\">%</code> \u4e0e\u9009\u9879\u5b57\u6bcd\u4e4b\u95f4\u6307\u5b9a\u6b63\u8d1f\u53f7\u6216\u6570\u5b57\u5b57\u9762\u91cf\u6765\u8fdb\u884c\u5bf9\u9f50\u548c\u586b\u5145\u3002</p>\n<div class=\"informaltable\">\n<table class=\"informaltable\">\n<thead>\n<tr>\n<th lang=\"zh\">\u8f6c\u4e49\u5e8f\u5217</th>\n<th lang=\"zh\">\u6548\u679c</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"literal\">%a</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u5e94\u7528\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%c</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u4f1a\u8bdd ID\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/devel/runtime-config-logging.html#GUC-LOG-LINE-PREFIX\">log_line_prefix</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%C</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u96c6\u7c07\u540d\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/devel/runtime-config-logging.html#GUC-CLUSTER-NAME\">cluster_name</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%u</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u7528\u6237\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%d</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u5e93\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%p</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u540e\u7aef\u7684\u8fdb\u7a0b ID</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%%</code></td>\n<td lang=\"zh\">\u5b57\u9762\u5b57\u7b26 %</td>\n</tr>\n</tbody>\n</table>\n</div>\n<p lang=\"zh\">\u4f8b\u5982\uff0c\u5047\u8bbe\u7528\u6237 local_user \u4ece\u6570\u636e\u5e93 local_db \u4ee5 foreign_user \u8eab\u4efd\u8fde\u63a5\u5230 foreign_db\uff0c\u5219\u8bbe\u7f6e 'db=%d, user=%u' \u4f1a\u66ff\u6362\u4e3a 'db=local_db, user=local_user'\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-EXAMPLES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-EXAMPLES\">F.40.11. \u793a\u4f8b</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4e0b\u9762\u662f\u4f7f\u7528 <code class=\"literal\">postgres_fdw</code> \u521b\u5efa\u5916\u90e8\u8868\u7684\u4e00\u4e2a\u793a\u4f8b\u3002\u9996\u5148\u5b89\u88c5\u6269\u5c55\uff1a</p>\n<pre class=\"programlisting\">CREATE EXTENSION postgres_fdw;\n</pre>\n<p lang=\"zh\">\u7136\u540e\u4f7f\u7528<a class=\"xref\" href=\"/docs/devel/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8fde\u63a5\u5230\u4e00\u53f0 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\uff0c\u5b83\u8fd0\u884c\u5728\u4e3b\u673a <code class=\"literal\">192.83.123.89</code> \u4e0a\u5e76\u76d1\u542c <code class=\"literal\">5432</code> \u7aef\u53e3\u3002\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"literal\">foreign_db</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER foreign_server\n        FOREIGN DATA WRAPPER postgres_fdw\n        OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');\n</pre>\n<p lang=\"zh\">\u8fd8\u9700\u8981\u7528<a class=\"xref\" href=\"/docs/devel/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u5b9a\u4e49\u4e00\u4e2a\u7528\u6237\u6620\u5c04\uff0c\u4ee5\u6807\u8bc6\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u54ea\u4e2a\u89d2\u8272\uff1a</p>\n<pre class=\"programlisting\">CREATE USER MAPPING FOR local_user\n        SERVER foreign_server\n        OPTIONS (user 'foreign_user', password 'password');\n</pre>\n<p lang=\"zh\">\u73b0\u5728\u5c31\u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/devel/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u521b\u5efa\u5916\u90e8\u8868\u4e86\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"structname\">some_schema.some_table</code> \u7684\u8868\u3002\u5b83\u5728\u672c\u5730\u7684\u540d\u79f0\u5c06\u662f <code class=\"structname\">foreign_table</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE FOREIGN TABLE foreign_table (\n        id integer NOT NULL,\n        data text\n)\n        SERVER foreign_server\n        OPTIONS (schema_name 'some_schema', table_name 'some_table');\n</pre>\n<p lang=\"zh\">\u5728 <code class=\"command\">CREATE FOREIGN TABLE</code> \u4e2d\u58f0\u660e\u7684\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u5176\u4ed6\u5c5e\u6027\uff0c\u5fc5\u987b\u4e0e\u5b9e\u9645\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u5217\u540d\u4e5f\u5fc5\u987b\u5339\u914d\uff0c\u9664\u975e\u4e3a\u5404\u4e2a\u5217\u9644\u52a0 <code class=\"literal\">column_name</code> \u9009\u9879\u6765\u6307\u660e\u5b83\u4eec\u5728\u8fdc\u7a0b\u8868\u4e2d\u7684\u540d\u79f0\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u76f8\u6bd4\u624b\u5de5\u6784\u9020\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4f7f\u7528 <a class=\"link\" href=\"/docs/devel/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><code class=\"command\">IMPORT FOREIGN SCHEMA</code></a> \u66f4\u53ef\u53d6\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-AUTHOR\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/devel/postgres-fdw.html#POSTGRES-FDW-AUTHOR\">F.40.12. \u4f5c\u8005</a></span></h3>\n</div>\n</div>\n</div>\n<p>Shigeru Hanada <code class=\"email\">&lt;<a class=\"email\" href=\"mailto:shigeru.hanada@gmail.com\">shigeru.hanada@gmail.com</a>&gt;</code></p>\n</div>\n</div>", "manual_path": "/docs/devel/postgres-fdw.html", "localization": {"status": "complete", "sources": [{"url": "/docs/devel/datatype-geometric.html", "method": "same-major semantic node", "sha256": "714520e006481cf0c03e5a9d0b01e78dcf3dc1974f2c4d4dc3158b7abea0cf68", "language": "zh", "matched_nodes": ["#DATATYPE-GEOMETRIC/div[11]/p[2]/em[1]"]}, {"url": "/docs/devel/postgres-fdw.html", "method": "same-major semantic node", "sha256": "b61b6983ba2c46b23d224c2bc6bb08d09d364189588ae166adcbbbaf4046eff5", "language": "zh", "matched_nodes": ["#POSTGRES-FDW/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[4]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[5]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/p[1]", "#POSTGRES-FDW/div[12]/div[10]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/div[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[4]", "#POSTGRES-FDW/div[12]/div[1]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/p[3]", "#POSTGRES-FDW/div[12]/div[1]/p[4]", "#POSTGRES-FDW/div[12]/div[1]/p[5]", "#POSTGRES-FDW/div[12]/div[1]/p[7]", "#POSTGRES-FDW/div[12]/div[2]/div[0]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[2]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/div[0]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[3]/div[5]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[3]/div[5]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[12]/div[3]/div[5]/dl[0]/dd[3]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/div[5]/dl[0]/dd[3]/p[2]", "#POSTGRES-FDW/div[12]/div[3]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/p[3]", "#POSTGRES-FDW/div[12]/div[3]/p[4]", "#POSTGRES-FDW/div[12]/div[4]/div[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[2]", "#POSTGRES-FDW/div[12]/div[4]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[12]/div[5]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/div[0]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[6]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/p[3]", "#POSTGRES-FDW/div[12]/div[6]/p[4]", "#POSTGRES-FDW/div[12]/div[7]/div[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[7]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/div[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[7]", "#POSTGRES-FDW/div[12]/div[9]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/p[2]", "#POSTGRES-FDW/div[12]/div[9]/p[4]", "#POSTGRES-FDW/div[12]/div[9]/p[5]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[0]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[1]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[2]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[3]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[5]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/thead[1]/tr[0]/th[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[4]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[14]/p[1]", "#POSTGRES-FDW/div[14]/p[2]", "#POSTGRES-FDW/div[14]/p[3]", "#POSTGRES-FDW/div[15]/p[1]", "#POSTGRES-FDW/div[15]/p[2]", "#POSTGRES-FDW/div[15]/p[4]", "#POSTGRES-FDW/div[16]/p[1]", "#POSTGRES-FDW/div[16]/p[2]", "#POSTGRES-FDW/div[16]/p[3]", "#POSTGRES-FDW/div[16]/p[4]", "#POSTGRES-FDW/div[16]/p[5]", "#POSTGRES-FDW/div[17]/p[1]", "#POSTGRES-FDW/div[17]/p[2]", "#POSTGRES-FDW/div[17]/p[4]", "#POSTGRES-FDW/div[18]/div[3]/ul[0]/li[0]", "#POSTGRES-FDW/div[18]/div[3]/ul[0]/li[1]", "#POSTGRES-FDW/div[18]/div[3]/ul[0]/li[2]", "#POSTGRES-FDW/div[18]/p[1]", "#POSTGRES-FDW/div[18]/p[2]", "#POSTGRES-FDW/div[18]/p[4]", "#POSTGRES-FDW/div[18]/p[5]", "#POSTGRES-FDW/div[19]/p[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[0]", "#POSTGRES-FDW/div[1]/dl[0]/dt[10]", "#POSTGRES-FDW/div[1]/dl[0]/dt[11]", "#POSTGRES-FDW/div[1]/dl[0]/dt[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[4]", "#POSTGRES-FDW/div[1]/dl[0]/dt[5]", "#POSTGRES-FDW/div[1]/dl[0]/dt[6]", "#POSTGRES-FDW/div[1]/dl[0]/dt[7]", "#POSTGRES-FDW/div[1]/dl[0]/dt[8]", "#POSTGRES-FDW/div[1]/dl[0]/dt[9]", "#POSTGRES-FDW/div[20]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[20]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[20]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[20]/p[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[0]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[1]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[2]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[3]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[4]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[5]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[6]/td[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[0]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[21]/div[1]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[22]/p[1]", "#POSTGRES-FDW/div[22]/p[3]", "#POSTGRES-FDW/div[22]/p[5]", "#POSTGRES-FDW/div[22]/p[7]", "#POSTGRES-FDW/div[22]/p[9]", "#POSTGRES-FDW/div[6]/ol[0]/li[0]", "#POSTGRES-FDW/div[6]/ol[0]/li[1]", "#POSTGRES-FDW/div[6]/ol[0]/li[2]", "#POSTGRES-FDW/div[6]/ol[0]/li[3]", "#POSTGRES-FDW/p[10]", "#POSTGRES-FDW/p[11]", "#POSTGRES-FDW/p[3]", "#POSTGRES-FDW/p[4]", "#POSTGRES-FDW/p[5]", "#POSTGRES-FDW/p[7]", "#POSTGRES-FDW/p[8]"]}, {"url": "/docs/devel/protocol-overview.html", "method": "same-major semantic node", "sha256": "fe7aff6a941aef6be4870c7704bca095984a81fd5019f420b67c9917f3831028", "language": "zh", "matched_nodes": ["#PROTOCOL-OVERVIEW/div[9]/p[1]/span[2]/span[0]"]}, {"url": "/docs/devel/sql-createindex.html", "method": "same-major semantic node", "sha256": "e44d0d6f4012477a680f69e6186a5df879d6598e260df1206c0156fd23d67f0c", "language": "zh", "matched_nodes": ["#SQL-CREATEINDEX/div[5]/div[3]/p[4]/span[2]/span[0]"]}], "language": "zh", "original_text": {"/summary": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/category": "Remote PostgreSQL", "/versions/20/description/0": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/versions/20/facts/0/label": "Interface family", "/versions/20/facts/0/value": "Foreign-data wrapper", "/versions/20/facts/1/label": "Handler or routine", "/versions/20/facts/2/label": "Recorded callbacks", "/versions/20/facts/3/label": "Data source", "/versions/20/facts/3/value": "Remote PostgreSQL servers", "/versions/20/tables/0/title": "Registered interface handlers", "/versions/20/tables/1/title": "Documented options", "/versions/20/related/0/label": "Foreign-data wrapper catalog", "/versions/20/related/1/label": "Existing extension catalogue identity", "/versions/20/related/2/label": "Foreign Scan plan node", "/versions/20/sections/0/title": "Interface and capability boundaries", "/versions/20/sections/1/title": "Asynchronous Execution Options", "/versions/20/sections/2/title": "Transaction Management Options", "/versions/20/sections/3/title": "Transaction Management", "/versions/20/sections/4/title": "Remote Query Optimization", "/versions/20/sections/5/title": "Cross-Version Compatibility", "/versions/20/sections/6/title": "Registered implementation in core source", "/versions/20/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/20/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/20/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/20/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/20/sections/1/paragraphs/0": "postgres_fdw supports asynchronous execution, which runs multiple parts of an Append node concurrently rather than serially to improve performance. This execution can be controlled using the following option:", "/versions/20/sections/2/paragraphs/0": "As described in the Transaction Management section, in postgres_fdw transactions are managed by creating corresponding remote transactions, and subtransactions are managed by creating corresponding remote subtransactions. When multiple remote transactions are involved in the current local transaction, by default postgres_fdw commits or aborts those remote transactions serially when the local transaction is committed or aborted. When multiple remote subtransactions are involved in the current local subtransaction, by default postgres_fdw commits or aborts those remote subtransactions serially when the local subtransaction is committed or aborted. Performance can be improved with the following options:", "/versions/20/sections/2/paragraphs/1": "If multiple foreign servers with these options enabled are involved in a local transaction, multiple remote transactions on those foreign servers are committed or aborted in parallel across those foreign servers when the local transaction is committed or aborted.", "/versions/20/sections/2/paragraphs/2": "When these options are enabled, a foreign server with many remote transactions may see a negative performance impact when the local transaction is committed or aborted.", "/versions/20/sections/3/paragraphs/0": "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints.", "/versions/20/sections/3/paragraphs/1": "The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local transaction uses SERIALIZABLE or REPEATABLE READ isolation level, but it might be surprising for a READ COMMITTED local transaction. A future PostgreSQL release might modify these rules.", "/versions/20/sections/3/paragraphs/2": "The remote transaction is opened in the same read/write mode as the local transaction: if the local transaction is READ ONLY , the remote transaction is opened in READ ONLY mode, otherwise it is opened in READ WRITE mode. (This rule is also applied to remote and local subtransactions.) Note that this does not prevent login triggers executed on the remote server from writing.", "/versions/20/sections/3/paragraphs/3": "The remote transaction is also opened in the same deferrable mode as the local transaction: if the local transaction is DEFERRABLE , the remote transaction is opened in DEFERRABLE mode, otherwise it is opened in NOT DEFERRABLE mode.", "/versions/20/sections/3/paragraphs/4": "Note that it is currently not supported by postgres_fdw to prepare the remote transaction for two-phase commit.", "/versions/20/sections/4/paragraphs/0": "postgres_fdw attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by sending query WHERE clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, WHERE clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an extension that's listed in the foreign server's extensions option. Operators and functions in such clauses must be IMMUTABLE as well. For an UPDATE or DELETE query, postgres_fdw attempts to optimize the query execution by sending the whole query to the remote server if there are no query WHERE clauses that cannot be sent to the remote server, no local joins for the query, no row-level local BEFORE or AFTER triggers or stored generated columns on the target table, and no CHECK OPTION constraints from parent views. In UPDATE , expressions to assign to target columns must use only built-in data types, IMMUTABLE operators, or IMMUTABLE functions, to reduce the risk of misexecution of the query.", "/versions/20/sections/4/paragraphs/1": "When postgres_fdw encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved are subject to different user mappings. While sending the JOIN clauses, it takes the same precautions as mentioned above for the WHERE clauses.", "/versions/20/sections/4/paragraphs/2": "An INNER JOIN between a foreign table and a set-returning function appearing as a FROM -list item can likewise be pushed down: the function call is absorbed into the remote query so that only rows matching the function's output are fetched. This is attempted only when the function is IMMUTABLE (so evaluating it on the remote server is guaranteed to produce the same result as evaluating it locally), its arguments and any restriction clauses on it are shippable, and none of the following disqualifying conditions applies: the join type is not INNER ; the function is used with WITH ORDINALITY ; the function returns a record type without an accompanying column definition list; or the function laterally references another relation at the same query level. A function argument that is a parameter from an enclosing query level is allowed and is transmitted to the remote server as a query parameter.", "/versions/20/sections/4/paragraphs/3": "The query that is actually sent to the remote server for execution can be examined using EXPLAIN VERBOSE .", "/versions/20/sections/5/paragraphs/0": "postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1.", "/versions/20/sections/5/paragraphs/1": "A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent to it for execution, resulting in \u201c function does not exist \u201d or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table reference in a sub- SELECT with OFFSET 0 as an optimization fence, and placing the problematic function or operator outside the sub- SELECT .", "/versions/20/sections/5/paragraphs/2": "Another limitation is that when executing INSERT statements with an ON CONFLICT DO NOTHING clause on a foreign table, the remote server must be running PostgreSQL 9.5 or later, as earlier versions do not support this feature.", "/versions/20/tables/0/rows/0/feature": "Scan rows", "/versions/20/tables/0/rows/5/feature": "Join path pushdown", "/versions/20/tables/0/rows/6/feature": "Upper paths, including aggregation", "/versions/20/tables/0/rows/7/feature": "Batch insert", "/versions/20/tables/0/rows/8/feature": "Asynchronous append execution", "/versions/20/tables/0/rows/9/feature": "Import schema", "/versions/20/tables/0/columns/0/label": "Interface operation", "/versions/20/tables/0/columns/1/label": "Source observation", "/versions/20/tables/0/columns/2/label": "Callback", "/versions/20/tables/0/columns/3/label": "Implementation", "/versions/20/tables/1/columns/0/label": "Option", "/versions/20/tables/1/columns/1/label": "Same-version definition", "/versions/20/collection_tables/0/title": "FDW-category catalogue", "/versions/20/collection_tables/1/title": "Primary-source capability observations", "/versions/20/tables/1/rows/0/definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used.", "/versions/20/tables/1/rows/1/definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used.", "/versions/20/tables/1/rows/2/definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used.", "/versions/20/tables/1/rows/3/definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false .", "/versions/20/tables/1/rows/4/definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 .", "/versions/20/tables/1/rows/5/definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.2 .", "/versions/20/tables/1/rows/6/definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table samples the data on the remote side, or reads and transfers all data and performs the sampling locally. The supported values are off , random , system , bernoulli and auto . off disables remote sampling, so all data are transferred and sampled locally. random performs remote sampling using the random() function to choose returned rows, while system and bernoulli rely on the built-in TABLESAMPLE methods of those names. random works on all remote server versions, while TABLESAMPLE is supported only since 9.5. auto (the default) picks the recommended sampling method automatically; currently it means either bernoulli or random depending on the remote server version.", "/versions/20/tables/1/rows/7/definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table will instead attempt to fetch the existing statistics for the remote table, and import those statistics directly to the local server (without applying the foreign table columns' n_distinct option). If the attempt failed, statistics are collected by row sampling on the foreign table. This option is only useful if the remote table is one that can have regular statistics (tables, not inherited, and materialized views). When using this option, it is the user's responsibility to ensure that the existing statistics for the remote table are up-to-date. The default is false . If the foreign table is a partition of a partitioned table, analyzing the partitioned table will still result in row sampling on the foreign table regardless of this setting, though direct analysis of the foreign table would have attempted to fetch and import the remote statistics first if this option was enabled. Note that this option doesn't currently support the case where the remote table is (or was once) inherited. This is an implementation restriction that might be fixed in a future release.", "/versions/20/tables/1/rows/8/definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.", "/versions/20/tables/1/rows/9/definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 .", "/versions/20/collection_tables/0/caption": "Current catalogue observation 2026-09-29 from pgext.universe. Extension versions, source metadata dates and declared PostgreSQL compatibility are independent of the selected core version. Catalogue classification does not establish capabilities or maintenance support.", "/versions/20/collection_tables/1/caption": "Each statement applies to its named extension version and immutable source revision. Unlisted capabilities remain unknown. These are documentation observations, not runtime tests or current maintenance guarantees.", "/versions/20/tables/1/rows/10/definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error. This option also applies when copying into foreign tables. In that case the actual number of rows postgres_fdw copies at once is determined in a similar way to the insert case, but it is limited to at most 1000 due to implementation restrictions of the COPY command.", "/versions/20/tables/1/rows/11/definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release.", "/versions/20/tables/1/rows/12/definition": "This option controls whether postgres_fdw commits, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false .", "/versions/20/tables/1/rows/13/definition": "This option controls whether postgres_fdw aborts, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is aborted. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false .", "/versions/20/tables/1/rows/14/definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server.", "/versions/20/tables/1/rows/15/definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server.", "/versions/20/tables/1/rows/16/definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different.", "/versions/20/tables/1/rows/17/definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally.", "/versions/20/tables/1/rows/18/definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally.", "/versions/20/tables/1/rows/19/definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true .", "/versions/20/tables/1/rows/20/definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction.", "/versions/20/tables/1/rows/21/definition": "This option controls whether postgres_fdw will use the SCRAM pass-through authentication to connect to the foreign server. It can be specified for a foreign server or a user mapping. A user mapping setting overrides the foreign server setting. With SCRAM pass-through authentication, postgres_fdw uses SCRAM-hashed secrets instead of plain-text user passwords to connect to the remote server. This avoids storing plain-text user passwords in PostgreSQL system catalogs. To use SCRAM pass-through authentication: The remote server must request the scram-sha-256 authentication method; otherwise, the connection will fail. The remote server can be of any PostgreSQL version that supports SCRAM. Support for use_scram_passthrough is only required on the client side (FDW side). The user mapping password is not used. The server running postgres_fdw and the remote server must have identical SCRAM secrets (encrypted passwords) for the user being used on postgres_fdw to authenticate on the foreign server (same salt and iterations, not merely the same password). As a corollary, if FDW connections to multiple hosts are to be made, for example for partitioned foreign tables/sharding, then all hosts must have identical SCRAM secrets for the users involved. The current session on the PostgreSQL instance that makes the outgoing FDW connections also must also use SCRAM authentication for its incoming client connection. (Hence \u201c pass-through \u201d : SCRAM must be used going in and out.) This is a technical requirement of the SCRAM protocol. The foreign server must not be used for subscription connections (see Section F.40.4 ).", "/versions/20/collection_tables/0/rows/0/scope": "Wrapper framework", "/versions/20/collection_tables/0/rows/1/scope": "Wrapper framework", "/versions/20/collection_tables/0/rows/2/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/3/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/4/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/5/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/6/scope": "Primary documentation reviewed separately below", "/versions/20/collection_tables/0/rows/7/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/8/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/9/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/1/rows/0/state": "Conditional", "/versions/20/collection_tables/1/rows/1/state": "Conditional", "/versions/20/collection_tables/1/rows/2/state": "Conditional", "/versions/20/collection_tables/1/rows/3/state": "Conditional", "/versions/20/collection_tables/1/rows/4/state": "Unknown", "/versions/20/collection_tables/0/rows/10/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/11/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/12/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/13/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/14/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/15/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/16/scope": "Related messaging interface", "/versions/20/collection_tables/0/rows/17/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/18/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/19/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/20/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/21/scope": "Related import/export interface", "/versions/20/collection_tables/0/rows/22/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/23/scope": "Related remote-query interface", "/versions/20/collection_tables/0/rows/24/scope": "Core interface; see versioned entry", "/versions/20/collection_tables/0/rows/25/scope": "Core interface; see versioned entry", "/versions/20/collection_tables/0/rows/26/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/27/scope": "Wrapper framework", "/versions/20/collection_tables/0/rows/28/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/29/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/30/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/31/scope": "Related remote-query interface", "/versions/20/collection_tables/0/rows/32/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/33/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/34/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/35/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/36/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/37/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/38/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/39/scope": "Wrapper development framework", "/versions/20/collection_tables/0/rows/40/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/41/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/42/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/43/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/44/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/45/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/46/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/47/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/48/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/49/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/50/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/51/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/52/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/53/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/54/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/55/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/56/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/57/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/58/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/59/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/60/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/61/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/62/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/63/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/64/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/65/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/66/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/67/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/68/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/69/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/70/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/71/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/72/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/73/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/74/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/75/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/76/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/77/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/78/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/79/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/80/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/81/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/82/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/83/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/84/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/85/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/86/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/87/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/88/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/89/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/90/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/91/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/92/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/93/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/94/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/95/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/96/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/97/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/98/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/99/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/1/rows/0/detail": "Translatable conditions can run in Oracle; EXPLAIN exposes the remote query.", "/versions/20/collection_tables/1/rows/1/detail": "Two tables on one server, in SELECT, with shippable predicates; cross joins and three-table joins are excluded. A pushed join prevents ORDER BY pushdown.", "/versions/20/collection_tables/1/rows/2/detail": "INSERT, UPDATE and DELETE are supported unless readonly is set. UPDATE and DELETE require every Oracle primary-key column to have key enabled.", "/versions/20/collection_tables/1/rows/3/detail": "Transaction commands and savepoints reach Oracle. Oracle commits before PostgreSQL, so distributed commit is not atomic.", "/versions/20/collection_tables/1/rows/4/detail": "This review has not established aggregate pushdown.", "/versions/20/collection_tables/0/rows/100/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/101/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/102/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/103/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/104/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/105/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/106/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/107/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/108/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/109/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/110/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/111/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/112/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/113/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/114/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/115/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/116/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/117/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/118/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/119/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/120/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/121/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/122/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/123/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/124/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/125/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/126/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/127/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/128/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/129/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/130/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/131/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/132/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/133/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/134/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/135/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/136/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/137/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/138/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/139/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/140/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/141/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/142/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/143/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/144/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/145/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/146/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/rows/147/scope": "Catalogue candidate; interface unverified", "/versions/20/collection_tables/0/columns/0/label": "Existing extension", "/versions/20/collection_tables/0/columns/1/label": "Catalogued version", "/versions/20/collection_tables/0/columns/2/label": "Declared PG majors", "/versions/20/collection_tables/0/columns/3/label": "Metadata checked", "/versions/20/collection_tables/0/columns/4/label": "Evidence scope", "/versions/20/collection_tables/0/columns/5/label": "Catalogued purpose", "/versions/20/collection_tables/0/rows/23/checked": "Not recorded", "/versions/20/collection_tables/0/rows/24/checked": "Not recorded", "/versions/20/collection_tables/0/rows/25/checked": "Not recorded", "/versions/20/collection_tables/0/rows/96/version": "Not recorded", "/versions/20/collection_tables/0/rows/98/version": "Not recorded", "/versions/20/collection_tables/1/columns/0/label": "Extension", "/versions/20/collection_tables/1/columns/1/label": "Reviewed version", "/versions/20/collection_tables/1/columns/2/label": "Capability", "/versions/20/collection_tables/1/columns/3/label": "Evidence state", "/versions/20/collection_tables/1/columns/4/label": "Conditions", "/versions/20/collection_tables/1/columns/5/label": "Evidence date and source", "/versions/20/collection_tables/0/rows/28/postgres": "Unknown", "/versions/20/collection_tables/0/rows/30/postgres": "Unknown", "/versions/20/collection_tables/0/rows/31/postgres": "Unknown", "/versions/20/collection_tables/0/rows/34/postgres": "Unknown", "/versions/20/collection_tables/0/rows/35/postgres": "Unknown", "/versions/20/collection_tables/0/rows/36/postgres": "Unknown", "/versions/20/collection_tables/0/rows/37/postgres": "Unknown", "/versions/20/collection_tables/0/rows/39/postgres": "Unknown", "/versions/20/collection_tables/0/rows/42/postgres": "Unknown", "/versions/20/collection_tables/0/rows/44/postgres": "Unknown", "/versions/20/collection_tables/0/rows/45/postgres": "Unknown", "/versions/20/collection_tables/0/rows/46/postgres": "Unknown", "/versions/20/collection_tables/0/rows/49/postgres": "Unknown", "/versions/20/collection_tables/0/rows/50/postgres": "Unknown", "/versions/20/collection_tables/0/rows/51/postgres": "Unknown", "/versions/20/collection_tables/0/rows/52/postgres": "Unknown", "/versions/20/collection_tables/0/rows/54/postgres": "Unknown", "/versions/20/collection_tables/0/rows/55/postgres": "Unknown", "/versions/20/collection_tables/0/rows/57/postgres": "Unknown", "/versions/20/collection_tables/0/rows/58/postgres": "Unknown", "/versions/20/collection_tables/0/rows/62/postgres": "Unknown", "/versions/20/collection_tables/0/rows/66/postgres": "Unknown", "/versions/20/collection_tables/0/rows/67/postgres": "Unknown", "/versions/20/collection_tables/0/rows/70/postgres": "Unknown", "/versions/20/collection_tables/0/rows/71/postgres": "Unknown", "/versions/20/collection_tables/0/rows/72/postgres": "Unknown", "/versions/20/collection_tables/0/rows/73/postgres": "Unknown", "/versions/20/collection_tables/0/rows/74/postgres": "Unknown", "/versions/20/collection_tables/0/rows/75/postgres": "Unknown", "/versions/20/collection_tables/0/rows/76/postgres": "Unknown", "/versions/20/collection_tables/0/rows/78/postgres": "Unknown", "/versions/20/collection_tables/0/rows/80/postgres": "Unknown", "/versions/20/collection_tables/0/rows/81/postgres": "Unknown", "/versions/20/collection_tables/0/rows/83/postgres": "Unknown", "/versions/20/collection_tables/0/rows/106/postgres": "Unknown", "/versions/20/collection_tables/0/rows/109/postgres": "Unknown", "/versions/20/collection_tables/0/rows/110/postgres": "Unknown", "/versions/20/collection_tables/0/rows/111/postgres": "Unknown", "/versions/20/collection_tables/0/rows/112/postgres": "Unknown", "/versions/20/collection_tables/0/rows/113/postgres": "Unknown", "/versions/20/collection_tables/0/rows/114/postgres": "Unknown", "/versions/20/collection_tables/0/rows/115/postgres": "Unknown", "/versions/20/collection_tables/0/rows/116/postgres": "Unknown", "/versions/20/collection_tables/0/rows/117/postgres": "Unknown", "/versions/20/collection_tables/0/rows/118/postgres": "Unknown", "/versions/20/collection_tables/0/rows/119/postgres": "Unknown", "/versions/20/collection_tables/0/rows/120/postgres": "Unknown", "/versions/20/collection_tables/0/rows/121/postgres": "Unknown", "/versions/20/collection_tables/0/rows/122/postgres": "Unknown", "/versions/20/collection_tables/0/rows/123/postgres": "Unknown", "/versions/20/collection_tables/0/rows/124/postgres": "Unknown", "/versions/20/collection_tables/0/rows/125/postgres": "Unknown", "/versions/20/collection_tables/0/rows/126/postgres": "Unknown", "/versions/20/collection_tables/0/rows/127/postgres": "Unknown", "/versions/20/collection_tables/0/rows/128/postgres": "Unknown", "/versions/20/collection_tables/0/rows/132/postgres": "Unknown", "/versions/20/collection_tables/0/rows/134/postgres": "Unknown", "/versions/20/collection_tables/0/rows/135/postgres": "Unknown", "/versions/20/collection_tables/0/rows/137/postgres": "Unknown", "/versions/20/collection_tables/0/rows/139/postgres": "Unknown", "/versions/20/collection_tables/0/rows/140/postgres": "Unknown", "/versions/20/collection_tables/0/rows/143/postgres": "Unknown", "/versions/20/collection_tables/0/rows/145/postgres": "Unknown", "/versions/20/collection_tables/0/rows/146/postgres": "Unknown", "/versions/20/collection_tables/0/rows/147/postgres": "Unknown", "/versions/20/collection_tables/1/rows/0/capability": "Predicate pushdown", "/versions/20/collection_tables/1/rows/1/capability": "Join pushdown", "/versions/20/collection_tables/1/rows/4/capability": "Aggregate pushdown", "/versions/20/collection_tables/0/rows/0/description": "Foreign data wrappers developed by Supabase", "/versions/20/collection_tables/0/rows/1/description": "Fetch foreign data in Python in your PostgreSQL server.", "/versions/20/collection_tables/0/rows/2/description": "Foreign data wrapper for accessing remote databases using ODBC", "/versions/20/collection_tables/0/rows/3/description": "foreign-data wrapper for remote servers available over JDBC", "/versions/20/collection_tables/0/rows/4/description": "foreign-data wrapper for remote PGSpider servers", "/versions/20/collection_tables/0/rows/5/description": "Foreign data wrapper for querying a MySQL server", "/versions/20/collection_tables/0/rows/6/description": "foreign data wrapper for Oracle access", "/versions/20/collection_tables/0/rows/7/description": "Foreign data wrapper for querying a TDS database (Sybase or Microsoft SQL Server)", "/versions/20/collection_tables/0/rows/8/description": "foreign data wrapper for DB2 access", "/versions/20/collection_tables/0/rows/9/description": "SQLite Foreign Data Wrapper", "/versions/20/collection_tables/0/rows/10/description": "Extension for querying PgBouncer stats from normal SQL views & running pgbouncer commands from normal SQL functions", "/versions/20/collection_tables/0/rows/11/description": "Foreign data wrapper for etcd", "/versions/20/collection_tables/0/rows/12/description": "Foreign data wrapper for Informix access", "/versions/20/collection_tables/0/rows/13/description": "Nominatim Foreign Data Wrapper for PostgreSQL", "/versions/20/collection_tables/0/rows/14/description": "foreign data wrapper for MongoDB access", "/versions/20/collection_tables/0/rows/15/description": "Foreign data wrapper for querying a Redis server", "/versions/20/collection_tables/0/rows/16/description": "Send redis pub/sub messages to Redis from PostgreSQL Directly", "/versions/20/collection_tables/0/rows/17/description": "kafka Foreign Data Wrapper for CSV formatted messages", "/versions/20/collection_tables/0/rows/18/description": "foreign-data wrapper for remote hdfs servers", "/versions/20/collection_tables/0/rows/19/description": "Foreign data wrapper for Firebird", "/versions/20/collection_tables/0/rows/20/description": "Foreign data wrapper for RDF triplestores over SPARQL endpoints", "/versions/20/collection_tables/0/rows/21/description": "aws_s3 postgres extension to import/export data from/to s3", "/versions/20/collection_tables/0/rows/22/description": "foreign-data wrapper for Postgres log file access", "/versions/20/collection_tables/0/rows/23/description": "connect to other PostgreSQL databases from within a database", "/versions/20/collection_tables/0/rows/24/description": "foreign-data wrapper for flat file access", "/versions/20/collection_tables/0/rows/25/description": "foreign-data wrapper for remote PostgreSQL servers", "/versions/20/collection_tables/0/rows/26/description": "ClickHouse foreign data wrapper with SELECT/INSERT support plus aggregate and join pushdown.", "/versions/20/collection_tables/0/rows/27/description": "Ruby foreign data wrapper provider", "/versions/20/collection_tables/0/rows/28/description": "Foreign data wrapper for local and remote JSON document access.", "/versions/20/collection_tables/0/rows/29/description": "Read-only foreign data wrapper for Apache Parquet files", "/versions/20/collection_tables/0/rows/30/description": "Foreign data wrapper for accessing web services from PostgreSQL.", "/versions/20/collection_tables/0/rows/31/description": "Run SQL against external PostgreSQL, Oracle, MySQL, and SQLite databases from PostgreSQL.", "/versions/20/collection_tables/0/rows/32/description": "Foreign data wrapper for querying Cassandra 2.x and newer from PostgreSQL.", "/versions/20/collection_tables/0/rows/33/description": "Foreign data wrapper for federated access from PostgreSQL to ClickHouse.", "/versions/20/collection_tables/0/rows/34/description": "Foreign data wrapper for querying CouchDB from PostgreSQL.", "/versions/20/collection_tables/0/rows/35/description": "Foreign data wrapper for querying rows directly from PostgreSQL custom-format dump files", "/versions/20/collection_tables/0/rows/36/description": "Foreign data wrapper for files with fixed-length fields.", "/versions/20/collection_tables/0/rows/37/description": "Foreign data wrapper returning each text-file row as a text array.", "/versions/20/collection_tables/0/rows/38/description": "PostgreSQL Git Foreign Data Wrapper", "/versions/20/collection_tables/0/rows/39/description": "Experimental Go/cgo project template for building PostgreSQL foreign data wrappers.", "/versions/20/collection_tables/0/rows/40/description": "Rust PostgreSQL FDW for Google Bigtable", "/versions/20/collection_tables/0/rows/41/description": "GridDB Foreign Data Wrapper for PostgreSQL", "/versions/20/collection_tables/0/rows/42/description": "foreign-data wrapper for hello world", "/versions/20/collection_tables/0/rows/43/description": "Foreign data wrapper for querying InfluxDB from PostgreSQL.", "/versions/20/collection_tables/0/rows/44/description": "Experimental foreign data wrapper for JDBC-accessible databases with remote filter pushdown.", "/versions/20/collection_tables/0/rows/45/description": "Foreign data wrapper for reading and writing Kyoto Tycoon key-value stores.", "/versions/20/collection_tables/0/rows/46/description": "Foreign data wrapper for querying LDAP servers", "/versions/20/collection_tables/0/rows/47/description": "Foreign data wrapper for reading OpenStreetMap PBF files", "/versions/20/collection_tables/0/rows/48/description": "Foreign data wrapper for key-value storage backed by RocksDB/VidarDB.", "/versions/20/collection_tables/0/rows/49/description": "quasar_fdw: push PostgreSQL queries down to Quasar-supported data backends", "/versions/20/collection_tables/0/rows/50/description": "Foreign data wrapper for reading Amazon S3 files through PostgreSQL COPY format.", "/versions/20/collection_tables/0/rows/51/description": "Legacy foreign data wrapper for the retired unauthenticated Twitter Search API.", "/versions/20/collection_tables/0/rows/52/description": "MonetDB foreign data wrapper", "/versions/20/collection_tables/0/rows/53/description": "Multicorn-based foreign data wrapper and Cypher functions for Neo4j.", "/versions/20/collection_tables/0/rows/54/description": "C foreign data wrapper for Neo4j Cypher query results.", "/versions/20/collection_tables/0/rows/55/description": "Foreign data wrapper for reading ORC formatted files", "/versions/20/collection_tables/0/rows/56/description": "RocksDB foreign data wrapper for PostgreSQL", "/versions/20/collection_tables/0/rows/57/description": "Oblivious foreign data wrapper for table access backed by trusted hardware and ORAM", "/versions/20/collection_tables/0/rows/58/description": "Transactional Kafka foreign data wrapper for Arenadata DB and Greenplum", "/versions/20/collection_tables/0/rows/59/description": "foreign-data wrapper for querying Cassandra 3+", "/versions/20/collection_tables/0/rows/60/description": "Foreign data wrapper for accessing IBM Db2 through an ODBC data source", "/versions/20/collection_tables/0/rows/61/description": "Foreign data wrapper for querying Apache Hive from PostgreSQL.", "/versions/20/collection_tables/0/rows/62/description": "Lua Foreign Data Wrapper", "/versions/20/collection_tables/0/rows/63/description": "Foreign data wrapper for the OpenCageData API", "/versions/20/collection_tables/0/rows/64/description": "Foreign data wrapper for querying Douban public movie-ranking APIs", "/versions/20/collection_tables/0/rows/65/description": "Foreign data wrapper for Unix/Linux passwd and group databases.", "/versions/20/collection_tables/0/rows/66/description": "Foreign Data Wrapper for Aerospike.", "/versions/20/collection_tables/0/rows/67/description": "Backport of file_fdw PROGRAM support, exposing a file_fdw-like foreign data wrapper that reads from external commands.", "/versions/20/collection_tables/0/rows/68/description": "Foreign data wrapper for querying Greenplum from PostgreSQL using SERIALIZABLE remote transactions.", "/versions/20/collection_tables/0/rows/69/description": "C foreign data wrapper backed by a Rust td-client bridge for querying and inserting Treasure Data datasets.", "/versions/20/collection_tables/0/rows/70/description": "Golden Helix C foreign data wrapper for reading one or more TSF genomic data files as PostgreSQL foreign tables.", "/versions/20/collection_tables/0/rows/71/description": "Proof-of-concept C foreign data wrapper for append-only, LZ4-compressed binary tuple files used as cold storage.", "/versions/20/collection_tables/0/rows/72/description": "WhiteDB Foreign Data Wrapper", "/versions/20/collection_tables/0/rows/73/description": "Global tables across FDW API", "/versions/20/collection_tables/0/rows/74/description": "Shared-memory hash-table foreign data wrapper for storing and querying rows by a configured key.", "/versions/20/collection_tables/0/rows/75/description": "Work-in-progress foreign data wrapper scaffold intended to expose pg_hba.conf through SQL.", "/versions/20/collection_tables/0/rows/76/description": "Foreign data wrapper for querying HBase from PostgreSQL.", "/versions/20/collection_tables/0/rows/77/description": "Access remote PostgreSQL tables through a postgres_fdw-derived wrapper with a FoundationDB-backed query cache", "/versions/20/collection_tables/0/rows/78/description": "PostgreSQL log via SQL", "/versions/20/collection_tables/0/rows/79/description": "Fork postgres_fdw to coordinate remote PostgreSQL transactions with optional two-phase commit and recovery helpers", "/versions/20/collection_tables/0/rows/80/description": "rasterdb: filesystem-backed PostGIS raster foreign data wrapper", "/versions/20/collection_tables/0/rows/81/description": "C foreign data wrapper for accessing Sybase databases from PostgreSQL.", "/versions/20/collection_tables/0/rows/82/description": "Foreign data wrapper for template tables that intentionally rejects SELECT and DML operations.", "/versions/20/collection_tables/0/rows/83/description": "Archived, unfinished C prototype for querying Heroku Dataclips through a function and planned FDW.", "/versions/20/collection_tables/0/rows/84/description": "Read-write PostgreSQL foreign data wrapper for Redis strings, hashes, and sets, with basic Redis Cluster support", "/versions/20/collection_tables/0/rows/85/description": "Foreign data wrapper for querying the Clerk user-management API from PostgreSQL.", "/versions/20/collection_tables/0/rows/86/description": "A Rust/pgrx foreign data wrapper that queries Prometheus metrics through PostgreSQL foreign tables.", "/versions/20/collection_tables/0/rows/87/description": "PostgreSQL FDW extension for reading and querying Lance format tables", "/versions/20/collection_tables/0/rows/88/description": "KalamDB PostgreSQL extension and FDW callback layer for SQL access to KalamDB.", "/versions/20/collection_tables/0/rows/89/description": "A foreign data wrapper for Orb", "/versions/20/collection_tables/0/rows/90/description": "Rust/pgrx foreign data wrapper for db721 files, developed for CMU 15-721 project data.", "/versions/20/collection_tables/0/rows/91/description": "Queries Prometheus instant-vector data through a PostgreSQL foreign data wrapper.", "/versions/20/collection_tables/0/rows/92/description": "Rust/pgrx foreign data wrapper for listing AWS EBS volumes through PostgreSQL.", "/versions/20/collection_tables/0/rows/93/description": "ClickHouse foreign data wrapper for PostgreSQL", "/versions/20/collection_tables/0/rows/94/description": "TencentDB PostgreSQL foreign data wrapper for reading CSV data from Tencent Cloud Object Storage (COS).", "/versions/20/collection_tables/0/rows/95/description": "Foreign data wrapper for querying and modifying Amazon DynamoDB tables from PostgreSQL.", "/versions/20/collection_tables/0/rows/96/description": "AlloyDB extension that provides a read-only foreign data wrapper for querying Elasticsearch data from PostgreSQL.", "/versions/20/collection_tables/0/rows/97/description": "Huawei Cloud OBS foreign data wrapper extension listed for RDS PostgreSQL.", "/versions/20/collection_tables/0/rows/98/description": "Alibaba Cloud OSS foreign data wrapper for reading and writing OSS objects from PostgreSQL-compatible managed services.", "/versions/20/collection_tables/0/rows/99/description": "Foreign data wrapper for accessing Parquet files on local filesystems and Amazon S3 from PostgreSQL.", "/versions/20/collection_tables/0/rows/100/description": "Foreign data wrapper for querying and modifying ScyllaDB tables from PostgreSQL over CQL.", "/versions/20/collection_tables/0/rows/101/description": "TencentDB for PostgreSQL foreign data wrapper for querying StarRocks tables through a MySQL-compatible interface.", "/versions/20/collection_tables/0/rows/102/description": "Steampipe AWS native PostgreSQL FDW for querying live AWS APIs as foreign tables.", "/versions/20/collection_tables/0/rows/103/description": "Foreign data wrapper for querying a Valkey server", "/versions/20/collection_tables/0/rows/104/description": "Foreign data wrapper for reading vmagent scrape-target status through its HTTP API.", "/versions/20/collection_tables/0/rows/105/description": "This extension allows PostgreSQL to directly query and manipulate Redis data as if it were regular PostgreSQL tables.", "/versions/20/collection_tables/0/rows/106/description": "Manage separate PostgreSQL database connections from SQL code", "/versions/20/collection_tables/0/rows/107/description": "Read local Excel XLSX worksheets as PostgreSQL foreign tables", "/versions/20/collection_tables/0/rows/108/description": "OAI-PMH foreign data wrapper for PostgreSQL", "/versions/20/collection_tables/0/rows/109/description": "Foreign data wrapper for reading call-detail-record file streams as external SQL tables.", "/versions/20/collection_tables/0/rows/110/description": "A Postgres interface into any database", "/versions/20/collection_tables/0/rows/111/description": "MQTT Foreign Data Wrapper", "/versions/20/collection_tables/0/rows/112/description": "foreign-data wrapper for readdir", "/versions/20/collection_tables/0/rows/113/description": "Readable, Null Foreign Data Wrapper for Postgresql 9.3+", "/versions/20/collection_tables/0/rows/114/description": "filesystem foreign data wrapper", "/versions/20/collection_tables/0/rows/115/description": "Postgres FDW in go experiments", "/versions/20/collection_tables/0/rows/116/description": "External Table Foreign Data Wrapper for Greenplum-family databases.", "/versions/20/collection_tables/0/rows/117/description": "Foreign data wrapper that delegates table operations to services over gRPC.", "/versions/20/collection_tables/0/rows/118/description": "LevelDB FDW with support for pivoting and key templating", "/versions/20/collection_tables/0/rows/119/description": "Kafka foreign data wrapper for PostgreSQL.", "/versions/20/collection_tables/0/rows/120/description": "MonetDB foreign-data wrapper with stronger analytical pushdown", "/versions/20/collection_tables/0/rows/121/description": "PostgreSQL to kdb+ Extension", "/versions/20/collection_tables/0/rows/122/description": "Historical Greenplum extension for accessing unmanaged data through PXF.", "/versions/20/collection_tables/0/rows/123/description": "PXF Framework for Greengage", "/versions/20/collection_tables/0/rows/124/description": "r53db, the PostgreSQL Foreign Data Wrapper for the AWS Route53 Database service", "/versions/20/collection_tables/0/rows/125/description": "Zero-ETL foreign data wrapper that maps PostgreSQL foreign tables to cloud-service and API calls.", "/versions/20/collection_tables/0/rows/126/description": "PostgreSQL foreign data wrapper source code for Tibero", "/versions/20/collection_tables/0/rows/127/description": "Tsurugi Foreign Data Wrapper for PostgreSQL.", "/versions/20/collection_tables/0/rows/128/description": "Prototype foreign data wrapper scaffold for ZIP-file access.", "/versions/20/collection_tables/0/rows/129/description": "Historical foreign data wrapper for document collections stored on local disk.", "/versions/20/collection_tables/0/rows/130/description": "Read/write foreign data wrapper for OpenAPI and JSON HTTP services.", "/versions/20/collection_tables/0/rows/131/description": "PostgreSQL foreign data wrapper with transaction setting propagation and replica routing", "/versions/20/collection_tables/0/rows/132/description": "Foreign data wrapper for querying and modifying Gaia Platform databases", "/versions/20/collection_tables/0/rows/133/description": "Foreign data wrapper for SequoiaDB collections", "/versions/20/collection_tables/0/rows/134/description": "openGauss foreign data wrapper for bulk loading external files", "/versions/20/collection_tables/0/rows/135/description": "openGauss memory-optimized table engine FDW adapter", "/versions/20/collection_tables/0/rows/136/description": "yesnodb foreign data, index and table access methods for PostgreSQL", "/versions/20/collection_tables/0/rows/137/description": "Foreign data wrapper for local Git repositories", "/versions/20/collection_tables/0/rows/138/description": "Foreign data wrapper for clustered Redis data", "/versions/20/collection_tables/0/rows/139/description": "Minimal local-table foreign data wrapper for teaching", "/versions/20/collection_tables/0/rows/140/description": "Foreign data wrapper for Pixels columnar files", "/versions/20/collection_tables/0/rows/141/description": "Rust foreign data wrapper for Firebird databases", "/versions/20/collection_tables/0/rows/142/description": "Foreign data wrapper for TDengine time-series databases", "/versions/20/collection_tables/0/rows/143/description": "Foreign data wrapper for remote Kite servers", "/versions/20/collection_tables/0/rows/144/description": "Foreign data wrapper for XDBC data transfer", "/versions/20/collection_tables/0/rows/145/description": "PGSpider multi-source foreign-table query coordinator", "/versions/20/collection_tables/0/rows/146/description": "Foreign data wrapper for remote PGSpider nodes", "/versions/20/collection_tables/0/rows/147/description": "Black-hole foreign tables that discard writes and return no rows"}, "fallback_fields": [], "source_language": "en", "extension_sources": [{"method": "existing extension catalogue", "sha256": "3ffc22cc58e981a891d3d050e153ef8888251a3ba812e021a9106a31ab7ad076", "extension": "wrappers"}, {"method": "existing extension catalogue", "sha256": "66fc5fe3c1bce26f314afde8b403ba87988b6f847ff27150bafb03e5adce0caf", "extension": "multicorn"}, {"method": "existing extension catalogue", "sha256": "d5159bd792d83e06a6cb97f09af1fd79f1657a7645998decdeb2d5867498e799", "extension": "odbc_fdw"}, {"method": "existing extension catalogue", "sha256": "c38dd6e6e877c6dcc0716579417a72e3899f03584ede5fb0edb94eb81ce45479", "extension": "jdbc_fdw"}, {"method": "existing extension catalogue", "sha256": "0919bdf0758eb35b5e0940629db357855cd9da969ae7b7f31ae5602271da294a", "extension": "pgspider_ext"}, {"method": "existing extension catalogue", "sha256": "998e10b6cd94e33ea1fc01619127d2af5224c4e39997aff4ca8552ea4e28d9dd", "extension": "mysql_fdw"}, {"method": "existing extension catalogue", "sha256": "1add4cdc55246d084186fac0b53c763c16e047da5cf03151050b3b3e839df9d3", "extension": "oracle_fdw"}, {"method": "existing extension catalogue", "sha256": "9dedcfb7f984a68c5aa37cfacb5cdd46084f1d3fda2af6c409fdb0d97a2159a0", "extension": "tds_fdw"}, {"method": "existing extension catalogue", "sha256": "977f847999bdc630617a336f25b816535dc91fce9a640242b24196d82e524ba9", "extension": "db2_fdw"}, {"method": "existing extension catalogue", "sha256": "7b9f6263b9c2a6491efb491c1d906f834a180b1a63355fd802e99a1dd6784dba", "extension": "sqlite_fdw"}, {"method": "existing extension catalogue", "sha256": "df4a6928c06aa3265a395aab0c06b417af298153f448446845e522aa7400cdd5", "extension": "pgbouncer_fdw"}, {"method": "existing extension catalogue", "sha256": "cb9d187f4e9400fe24d44fbefd750c266803602eab1284017478ab1782543768", "extension": "etcd_fdw"}, {"method": "existing extension catalogue", "sha256": "f3ac6404bfba572985485b8a01c2aa06e168e89db1cd79ca8a4394f5610a99a4", "extension": "informix_fdw"}, {"method": "existing extension catalogue", "sha256": "3123beaa5800341b49372f639f33bda7a5b1596ada6eff8666afb6131e9a2fbd", "extension": "nominatim_fdw"}, {"method": "existing extension catalogue", "sha256": "a47b389311805c4492cfa254f9f96a9a82d87e6705711cf1afd805fd35fba80c", "extension": "mongo_fdw"}, {"method": "existing extension catalogue", "sha256": "977e9f6aa10d97e7829ee2563c2907871d3bf8dad3d01931704b5630bc9c9449", "extension": "redis_fdw"}, {"method": "existing extension catalogue", "sha256": "da59fed069c09ff77292ac72038cce3ef8a682539302ae9ff89d4fc7617fb352", "extension": "redis"}, {"method": "existing extension catalogue", "sha256": "358348c6aafd42a98f08cb1d52f66521539b1b4ceb9ab9a3bfada89256fba7e5", "extension": "kafka_fdw"}, {"method": "existing extension catalogue", "sha256": "4a890ecc0c1b177b15c56c2e648d7c2dfabe08963a9b7aeeea233cb735567c45", "extension": "hdfs_fdw"}, {"method": "existing extension catalogue", "sha256": "511116eeaa527775e8e79af0a3e7ed31c6667f12d58d7480daca79d5e4663b20", "extension": "firebird_fdw"}, {"method": "existing extension catalogue", "sha256": "8b688aabe9eaffa9cd008ed45d72e44c609d8f9a4ebe2570670d896e3b83aff8", "extension": "rdf_fdw"}, {"method": "existing extension catalogue", "sha256": "262bb1c1dbc05f44c5aab1c9f249ca88eb6187c905953fe6e6bb764738dccda3", "extension": "aws_s3"}, {"method": "existing extension catalogue", "sha256": "854ba2ddc0c219c3afdadd40e7715e83282810c75269fb41f4b86419147754ed", "extension": "log_fdw"}, {"method": "existing extension catalogue", "sha256": "250d67a09126057cde85d4045dc982d3ed3c30866236b5f35cd54e239c021b3d", "extension": "dblink"}, {"method": "existing extension catalogue", "sha256": "d786bfeed08bcdc91b011e797214745518cdc4fdd4a5eb7a0ba5b110804bfb29", "extension": "file_fdw"}, {"method": "existing extension catalogue", "sha256": "9cfd9284d0185a5fa22fc031772514e45b5753dc53ec46d15ebeade77cf4a90b", "extension": "postgres_fdw"}, {"method": "existing extension catalogue", "sha256": "11a37d4f240db359a9b926ef26ab1d7004658c2fbd08fceab755f2729ccd1c46", "extension": "clickhousedb_fdw"}, {"method": "existing extension catalogue", "sha256": "0c00747ee868ebde2fa9132ceacb1881a91a6672993de754221844478684b10b", "extension": "holycorn"}, {"method": "existing extension catalogue", "sha256": "50e5b413526f3a2a45f099de414ab9a0c55d30734cb8791cd68755f9cfbfee4c", "extension": "json_fdw"}, {"method": "existing extension catalogue", "sha256": "5aac26cb15caa2bcc10037c4e46379cc4fe1371e6aab677217d1e13a62c183b7", "extension": "parquet_fdw"}, {"method": "existing extension catalogue", "sha256": "31a5645f31ef8c1c8a47bf9d5c7246a100575df5276583885f1bf0b378f9d347", "extension": "www_fdw"}, {"method": "existing extension catalogue", "sha256": "9f55c5776868c4741f46398708c256e1ad0f0ae3331e741a71ec7379264cdc15", "extension": "dblink_plus"}, {"method": "existing extension catalogue", "sha256": "5f1d5b37a702ae4ecccb271bf5f4ccfd4ae4924aee1f5213a02902163138b317", "extension": "cassandra2_fdw"}, {"method": "existing extension catalogue", "sha256": "610f0e7cbea278a300a218c887ea85fd3b11bad18e20519a70407374f1cdd976", "extension": "ch_fdw"}, {"method": "existing extension catalogue", "sha256": "8278d15988a4378cee9403aacddf1193ee016aa68b2076449a91196d39adf341", "extension": "couchdb_fdw"}, {"method": "existing extension catalogue", "sha256": "c6deb033bfe992082823df06e1f72cb5a846f3349a3a8c69316dd46d07629aa9", "extension": "dump_fdw"}, {"method": "existing extension catalogue", "sha256": "21c7aea228b0ba454720665d91f8294b95c96716f6e2ccde2a4216c12d00cecb", "extension": "file_fixed_length_fdw"}, {"method": "existing extension catalogue", "sha256": "e6f1fa6ef59ad98fac0323b256b16566df366c8a71307e78046496b42cede356", "extension": "file_textarray_fdw"}, {"method": "existing extension catalogue", "sha256": "994ec5dfda82cd1c84fadd2894273c888714502121fa797fdd98b93cf2a35955", "extension": "git_fdw"}, {"method": "existing extension catalogue", "sha256": "240f9fc0673ed662df1530525e21a9bd56112582d962b53a2d2e580bb7a94113", "extension": "go_fdw"}, {"method": "existing extension catalogue", "sha256": "52ed572739beb4f6dc95542693c5ca79d4cb0bf7ea36922ff9cedf4cd8e6e67a", "extension": "bigtable"}, {"method": "existing extension catalogue", "sha256": "56d9ef93886d9e9d46a0e5ffd68dbd5cb129a69ab607a214e8fdf85a2b12863e", "extension": "griddb_fdw"}, {"method": "existing extension catalogue", "sha256": "bc8f0f145c29d2fc1a0e80700a0f0bfa1943dc090d52a9827d1a8f4ed6050d5b", "extension": "hello_fdw"}, {"method": "existing extension catalogue", "sha256": "b1a47315c05f8a5fc0427503d7c16139a18057a91f5f4a1063200f264a34c4fa", "extension": "influxdb_fdw"}, {"method": "existing extension catalogue", "sha256": "20a5fdb590208cb7c30d10d66ca7cc3550def4597b4724100eea52983e7ebb9d", "extension": "jdbc2_fdw"}, {"method": "existing extension catalogue", "sha256": "1a76f67d8db3dc6a29ab7556286b5630d695e1e1975304050fe91f4ca266e302", "extension": "kt_fdw"}, {"method": "existing extension catalogue", "sha256": "ab0716cde6e0dd76ec31a4edef82f16b8d65b42265410ac3e1bd586a7fbdaead", "extension": "ldap_fdw"}, {"method": "existing extension catalogue", "sha256": "d62b205b46e36f9d3bcaa61248b408d5c7458cbb4ed5d7b0efa4fe5ba4671547", "extension": "osm_fdw"}, {"method": "existing extension catalogue", "sha256": "b234abacb20f03dd242657cae6fcb485501fdaed315c0fbcbf4d7222b6b276dc", "extension": "kv_fdw"}, {"method": "existing extension catalogue", "sha256": "57eb71646760ed62df1157ea64266b80243a214c32d77bd2059d9f3df1ca9f87", "extension": "quasar_fdw"}, {"method": "existing extension catalogue", "sha256": "2161e0282e5c7a493117161d1bfdcc707e3be25d26d34ff48f3a76c1cf7c0bc2", "extension": "s3_fdw"}, {"method": "existing extension catalogue", "sha256": "2a7ab23f285c72e1ffd22d4e11d040898078ce1cdb6721502e0fafbf4b02b7c5", "extension": "twitter_fdw"}, {"method": "existing extension catalogue", "sha256": "40230b67f8586ab8e6cde269061c6ad05092ed049797ffc131fd4edb66eb98a8", "extension": "monetdb_fdw"}, {"method": "existing extension catalogue", "sha256": "4a4c550b1b46111a5fba815c84af694626a88791437cfd84ea9932e0cb22cb32", "extension": "neo4j-fdw"}, {"method": "existing extension catalogue", "sha256": "6132f77fc17cfc9d8e3093e2da20e7f897ba52a8ee97b6fd91953917a7a27d68", "extension": "neo4j_fdw"}, {"method": "existing extension catalogue", "sha256": "17631326db28e019349160e1a9e1998c268372d616cbc559c921aed5d2128593", "extension": "orc_fdw"}, {"method": "existing extension catalogue", "sha256": "2805a2abe34defd383923339bb025a6d2cc4df6252271586eba76333da42bf19", "extension": "lsm"}, {"method": "existing extension catalogue", "sha256": "a55f9358b3cf0d783e23749ed4b3f6bd9c7ee952a84c99eff6c2d7c83d20be53", "extension": "oblivpg_fdw"}, {"method": "existing extension catalogue", "sha256": "030d7a3f4587c7a1b264020aaaaa552df4ad89da058a676b5b07fa860a07b759", "extension": "kadb_fdw"}, {"method": "existing extension catalogue", "sha256": "7146d7563a658a07bfbd86f5b963d8f0016f8424e4078120234dc48cd7dc8236", "extension": "cassandra_fdw"}, {"method": "existing extension catalogue", "sha256": "ab1a1631f40d0205f4703b6dfd8c8c36fc290a3620ac4c3a8afb7e540276a90e", "extension": "db2odbc_fdw"}, {"method": "existing extension catalogue", "sha256": "684088771555adf56f7ca96f6ca42cef4c80ff4c8531cdce45770a792e39188f", "extension": "hive_fdw"}, {"method": "existing extension catalogue", "sha256": "05b6dafe96939c3206bd2969d8884e0c4dc325b9ad5ae5c80aa5235ce06986a5", "extension": "lua_fdw"}, {"method": "existing extension catalogue", "sha256": "3f40265846c7fb819d2e9099a5891fcebe45d7426e88cd2a27339ca9f8bda3db", "extension": "ocgeo_fdw"}, {"method": "existing extension catalogue", "sha256": "43355dbb37a93b4bd338dada33a918c4c5c792599802008af7b3157341449da0", "extension": "douban_fdw"}, {"method": "existing extension catalogue", "sha256": "920c7a02fca0320a272667bd62ed63cfbe2b8e93b20852165b69c5a01541194c", "extension": "passwd-fdw"}, {"method": "existing extension catalogue", "sha256": "1a2604f17a3d5d6e596eac976925b857e16d4df0c870fc8cac7ef78317db3c4a", "extension": "aerospike_fdw"}, {"method": "existing extension catalogue", "sha256": "76b6a10c7d51d2c2ad7d1f4468f0563b78d3ee4e96205c843230c0468ee51b34", "extension": "file_fdw_program"}, {"method": "existing extension catalogue", "sha256": "fc1388c5fbb422d5b63d712d4751d59214147db74c196201a6ed14477ebf9687", "extension": "greenplum_fdw"}, {"method": "existing extension catalogue", "sha256": "8adc95cb493fc7d9dab3b646ffce644115b2c81ad79594b7422ef509657d6631", "extension": "treasuredata_fdw"}, {"method": "existing extension catalogue", "sha256": "92efa98cff8d4dd687db13cc99b1f0b456dba76e2427f10ef2d72ee3e1392a0d", "extension": "tsf_fdw"}, {"method": "existing extension catalogue", "sha256": "e1b90e0c1b056fce9e277518f3e42c7d1221d5c444a0701cd97bc6da17bb0bbc", "extension": "tuple_fdw"}, {"method": "existing extension catalogue", "sha256": "5346599bf369eb121017f8920ae7e3078dba924d57b6abef26b3bdf73c9aed14", "extension": "wdb_fdw"}, {"method": "existing extension catalogue", "sha256": "8eae42eff4bed1030ba27391613296fce254b2e3cc0b98720479120e36ccf512", "extension": "gtables_fdw"}, {"method": "existing extension catalogue", "sha256": "3ca0ab078bdc8e50ff97c31a318c186ab8801052dd95dcfe93a79a70e6d286a9", "extension": "hash_fdw"}, {"method": "existing extension catalogue", "sha256": "5b475944702834bd2140cc7e6b3a1f54ca49323880f17d0968c9531a5c727b66", "extension": "hba_fdw"}, {"method": "existing extension catalogue", "sha256": "e704ad4b39bb0b0cc885186f05297f9c1b34935f69c8176f278b6b72b0868db4", "extension": "hbase_fdw"}, {"method": "existing extension catalogue", "sha256": "52aaca600fd2367c55b85b6717f60149fd912ebaf40550f4b8506a6985b8b3de", "extension": "pgc_fdw"}, {"method": "existing extension catalogue", "sha256": "5f53ac316243895d7f5fa2ad07d2bfcdb4bdcbae8efb43a30abd716c8eab6f00", "extension": "pglog"}, {"method": "existing extension catalogue", "sha256": "385379846e4a93fdfc2967b3de2179d1920648deb0d1c911b8a9d3267bc9671b", "extension": "postgres_fdw_plus"}, {"method": "existing extension catalogue", "sha256": "7279ff727ec360a28b2456c864ede1ccd9cf89ad0674b0933b70c189c88b18c6", "extension": "rasterdb"}, {"method": "existing extension catalogue", "sha256": "5a1f92a460c87c631dc40616b275d6c9c98ba384d36e728ae4edabb52b62b809", "extension": "sybase_fdw"}, {"method": "existing extension catalogue", "sha256": "84181a55f1833b19e4f28d4feaa8b4877a5be1ac6d4d72bc3158e9d2bf0f4a88", "extension": "template_fdw"}, {"method": "existing extension catalogue", "sha256": "8d5442818265a6c0f04146bda1f4bb200e850d97edd089fe86da9394abe506f4", "extension": "dataclips"}, {"method": "existing extension catalogue", "sha256": "64653d493e11a603ea9663d3e46c9bd86987e623199e7c190a9706180dbe2c20", "extension": "redis_link"}, {"method": "existing extension catalogue", "sha256": "45abe2e53c7a29813d744738b2d6b9e205f6ce193dd386035b46f3c8ea434c2c", "extension": "clerk_fdw"}, {"method": "existing extension catalogue", "sha256": "34d85657149647b85594de8706fd4d21441f677bcc304d3bc14a4aeebbb89a16", "extension": "prometheus_fdw"}, {"method": "existing extension catalogue", "sha256": "9f7245d3affb4c9207db08dcf8e16bc1828f4d7f3e38da92364035288d895835", "extension": "lance"}, {"method": "existing extension catalogue", "sha256": "68c67aada9712f03371c1d4103e8fd1856cfaa9cb7909c04dd92223d3c7c5ee5", "extension": "pg_kalam"}, {"method": "existing extension catalogue", "sha256": "fef0022ff31fa339184af3e0065c897b6b0742059a6be1578b40259488e8c715", "extension": "orb_fdw"}, {"method": "existing extension catalogue", "sha256": "306b86a1d700adc1349f5482acdcb73626f545202d2b7ec3db1283bb3780bfba", "extension": "db721_fdw"}, {"method": "existing extension catalogue", "sha256": "4a61e73a338a07548b39f4f368a6d2973db348b6e95d6ce82add6d66d36ef279", "extension": "prometheusfdw"}, {"method": "existing extension catalogue", "sha256": "692b68582bbea7b7a407d930cd409cb80e36550a553a1fe64ef70973c4031b8d", "extension": "ebs_fdw"}, {"method": "existing extension catalogue", "sha256": "d3288da439473998cfd4a86a00ff4d07c7684bcde778077b49bd3ab64dccf7e9", "extension": "clickhouse_fdw"}, {"method": "existing extension catalogue", "sha256": "b3879ff741f71667aa8f75dea5ae973098ac0b1e69b0125bc373b44bb46bacc6", "extension": "cos_fdw"}, {"method": "existing extension catalogue", "sha256": "66067970032f48fd2abc67dd9a57b64d7345bc5a3e5e9acddc019c26b2a9b058", "extension": "dynamodb_fdw"}, {"method": "existing extension catalogue", "sha256": "b6b0f78fb5c8eb63cea6ee55927a0b54054fa0cfd4925d2d6acac2ae84daa8f5", "extension": "external_search_fdw"}, {"method": "existing extension catalogue", "sha256": "e5b90d35d57c73afd69926fe59ba41d25e10a46b6db77904d493f2ee8d1a2425", "extension": "obs_fdw"}, {"method": "existing extension catalogue", "sha256": "4f167224c4bbac10986fbe3732cb9450e88a379f2cf09f14ac5f4506fb87021c", "extension": "oss_fdw"}, {"method": "existing extension catalogue", "sha256": "3d444d9d30777a2e16711deaa591f00914efbc2155f5cc1dea3e2b5555048e99", "extension": "parquet_s3_fdw"}, {"method": "existing extension catalogue", "sha256": "9713f9164bf7060b1d8199ca429a0ec6d6b4fcecd05fc2d2679c1aa8786f90be", "extension": "scylla_fdw"}, {"method": "existing extension catalogue", "sha256": "60ada82b6871fcd52e30575c9c9d9a080c43e325e31896c011be15528318fcc6", "extension": "starrocks_fdw"}, {"method": "existing extension catalogue", "sha256": "daadb86a5d39a1ec91b1d69a194d90b5d9eda0688f2dc062000d7147f19bfe5b", "extension": "steampipe_postgres_aws"}, {"method": "existing extension catalogue", "sha256": "c5cf3ec95d7ec7d067c046fe1aee6edbda073a3ccf6d483f9e8a295ab6bfbc56", "extension": "vmagentfdw"}, {"method": "existing extension catalogue", "sha256": "efd49e587339a10f8fd5c6f14e11da9b79be32e0887a4395aca5c0ccc98c831b", "extension": "redis_fdw_rs"}, {"method": "existing extension catalogue", "sha256": "92a231b7e8f193ca84b8c7301a3b39158006403d78162710882e367cf92ab8a8", "extension": "pg_conn2"}, {"method": "existing extension catalogue", "sha256": "32941e1debd27b62467dfacb067b9d90ee44aaa189bdd7fcdb59338aa3895b6c", "extension": "pg_sheet_fdw"}, {"method": "existing extension catalogue", "sha256": "4e28cb137954a647cf17e365e281e7bdfe808e40c56094ffe2586695ab3cc05d", "extension": "oai_fdw"}, {"method": "existing extension catalogue", "sha256": "509c1bf7f37fd2c32c8c83f7e51bbc5720166e3534bc48926b1d90916c38b2fd", "extension": "multicdr_fdw"}, {"method": "existing extension catalogue", "sha256": "fc65e485accb83d99b53c49c3dc95f961c19cf8c931279e2bf3f9df13eb8859f", "extension": "ansilo_pgx"}, {"method": "existing extension catalogue", "sha256": "d35efe180005d7b2453d49b3fb10da681984baaaed9f299f3366a158b9ae96a7", "extension": "busybee_fdw"}, {"method": "existing extension catalogue", "sha256": "0f934cb74883547ce71757ddc0802de074db91506ee28120fd761d01843a53ab", "extension": "dir_fdw"}, {"method": "existing extension catalogue", "sha256": "594075f6d5536319766444d28b4149a952c8de68604f011779f4023be33cc9ee", "extension": "dummy_data"}, {"method": "existing extension catalogue", "sha256": "2c61aa70c383f56d13ab3bc624fe328f366ce27d174f70ceccaa43bb018fe139", "extension": "filesystem"}, {"method": "existing extension catalogue", "sha256": "b1c4784fabbaf84389f5815fd4c41f08b9750efd59b5407ec47ebb55dbff3f49", "extension": "gofdw"}, {"method": "existing extension catalogue", "sha256": "a7ccf47ab5b3d356ad50f6e2985ccea633825905db5fb4062a08f17f8371549d", "extension": "gp_exttable_fdw"}, {"method": "existing extension catalogue", "sha256": "594d9edb640020c6d1c2e64c742f7c8996b1881234986e8a79a764979c7cfefe", "extension": "grpc_fdw"}, {"method": "existing extension catalogue", "sha256": "adac0306c8c5ded4651e852860722dc7530d815d28331a3d007b7add99411e98", "extension": "level_pivot"}, {"method": "existing extension catalogue", "sha256": "eba5b5ca29825256725442452b66d5775f7ab15be436a0a27e707990775209c3", "extension": "pg_kafka"}, {"method": "existing extension catalogue", "sha256": "615ccc02c0b4cc79a2797d3058937653a7d0b00256a46629ef288610f87a19f1", "extension": "pg_monetdb"}, {"method": "existing extension catalogue", "sha256": "38c01da777e64cafb37fe116241dc6e6b86c373ee928d319426e4cd23937a46b", "extension": "pgtokdb"}, {"method": "existing extension catalogue", "sha256": "10387f5498d09d2d2395b5b98fb96864b4d3cb3e2df85496df7b29f3fc90db70", "extension": "pxf"}, {"method": "existing extension catalogue", "sha256": "185c83fdc58451c0d3f05d1b2dd3c3860a467bff27f93e48c027558caf0f5eda", "extension": "pxf_fdw"}, {"method": "existing extension catalogue", "sha256": "96d309019844e7cf5a7774bb6591f61460f5db3dc8e631d3a6d3e3722d2e5127", "extension": "r53db"}, {"method": "existing extension catalogue", "sha256": "02576450941ca69de3597153baf060163c51a553bd6413641fc07669a26accd6", "extension": "steampipe_postgres_fdw"}, {"method": "existing extension catalogue", "sha256": "e7a4f1b90f503ebfbfda9e4ee0a3a8b9dab0d6e8032555a95843a8f715de9913", "extension": "tibero_fdw"}, {"method": "existing extension catalogue", "sha256": "026e355a9dcfcff3406c5c44a700a06ef0d160e8b34d002aaf1f1adce811493c", "extension": "tsurugi_fdw"}, {"method": "existing extension catalogue", "sha256": "b4a96d94f4cea680a20eb780eefc14742696295a3adb6ed3b2f7c1ab672eee13", "extension": "zipfile-fdw"}, {"method": "existing extension catalogue", "sha256": "2da3a28445934e19b733bb954d123a0e4774d0e5cf51bc16c9a89e4abd4d89dd", "extension": "dc_fdw"}, {"method": "existing extension catalogue", "sha256": "2542d37383afad7e0a0db8f9cce3e96d8cdf6bcd36fcc4daeccec33b7ebcd228", "extension": "openapi_fdw"}, {"method": "existing extension catalogue", "sha256": "6c98ce7210716e99850564c0824dcd40279092c9ff0e0ab8512efe297c78c1a7", "extension": "pgwrh_fdw"}, {"method": "existing extension catalogue", "sha256": "7b47c545bcedd5c9aa90a8e750cb4ac4f3d4fea1c9a24ddc6c6c393d23a162c4", "extension": "gaia_fdw"}, {"method": "existing extension catalogue", "sha256": "b9bb0925235a0d0e14b1fdd47c6fb37a721af7ccee4521e962c973eccdd18e47", "extension": "sdb_fdw"}, {"method": "existing extension catalogue", "sha256": "2d4f216927ef8ddaf558c4758cda8c9cf2ee650fa4c74dd0b90b33fc08927330", "extension": "dist_fdw"}, {"method": "existing extension catalogue", "sha256": "db39532789afc47ec632af7dc6cc0a3bd3bec370e643687e09c8199efc036b0b", "extension": "mot_fdw"}, {"method": "existing extension catalogue", "sha256": "8b08d87d45cad4f113530dd7db278e65d29b96e2b0a55564c5f8dafd21bafc24", "extension": "yesno_pg"}, {"method": "existing extension catalogue", "sha256": "559962304726c2966a3a4fd4c2e08cce443ff313504564153fafe8f71fef9dac", "extension": "ekorre"}, {"method": "existing extension catalogue", "sha256": "6afbc9a9e33f9bb4913f65b8ed281bdc38a03da837d38daade2364940f7f2f1c", "extension": "redis_cluster_fdw"}, {"method": "existing extension catalogue", "sha256": "ea99a3e8c4522ea08dfa316bf5af52eb7f7dcba6f35d33f8973b847e43a7d624", "extension": "mufdw"}, {"method": "existing extension catalogue", "sha256": "4254abae34b805afe86d23b1c3d9ac0cde12220c18b60cc8de189b2f231705be", "extension": "pixels_fdw"}, {"method": "existing extension catalogue", "sha256": "94b07011f37076090df4a3c5969347f7c4e727d1b92f78f66d4937c27fdcb1ef", "extension": "firebirdsql_fdw"}, {"method": "existing extension catalogue", "sha256": "8dbb2adc32abc08d603758bab8b57520de86445eafa96d71d9f02324e251affc", "extension": "tdengine_fdw"}, {"method": "existing extension catalogue", "sha256": "e20151da8590037994984aaee0e5cc72d8d110950da1809da7172db07b5592e7", "extension": "kite_fdw"}, {"method": "existing extension catalogue", "sha256": "a383fdcdf9da449636ea45f45d520a05352e1233f14e6aea6824ff47dc7fb1ca", "extension": "pg_xdbc_fdw"}, {"method": "existing extension catalogue", "sha256": "715656fc020ab8ffff30fd5216410cb7e6f840d63b5dedd6ac0babef1316e72b", "extension": "pgspider_core_fdw"}, {"method": "existing extension catalogue", "sha256": "95bf28d608f357e0072959625f8f90fed48c17e235a65d5943b72c82c6c7bb1f", "extension": "pgspider_fdw"}, {"method": "existing extension catalogue", "sha256": "a4db5dc2a4a6fd790040073ed074a868fd96f4305ccafe0eda167b7c6277078d", "extension": "blackhole_fdw"}], "original_snapshot_sha256": "07c627f2aea339ab99a279830f2de0019d16b08b1fa82b271d613d8ecbd219ee"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "schema_name", "definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used."}, {"name": "table_name", "definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used."}, {"name": "column_name", "definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used."}, {"name": "use_remote_estimate", "definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false ."}, {"name": "fdw_startup_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 ."}, {"name": "fdw_tuple_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.2 ."}, {"name": "analyze_sampling", "definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table samples the data on the remote side, or reads and transfers all data and performs the sampling locally. The supported values are off , random , system , bernoulli and auto . off disables remote sampling, so all data are transferred and sampled locally. random performs remote sampling using the random() function to choose returned rows, while system and bernoulli rely on the built-in TABLESAMPLE methods of those names. random works on all remote server versions, while TABLESAMPLE is supported only since 9.5. auto (the default) picks the recommended sampling method automatically; currently it means either bernoulli or random depending on the remote server version."}, {"name": "import_stats", "definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table will instead attempt to fetch the existing statistics for the remote table, and import those statistics directly to the local server (without applying the foreign table columns' n_distinct option). If the attempt failed, statistics are collected by row sampling on the foreign table. This option is only useful if the remote table is one that can have regular statistics (tables, not inherited, and materialized views). When using this option, it is the user's responsibility to ensure that the existing statistics for the remote table are up-to-date. The default is false . If the foreign table is a partition of a partitioned table, analyzing the partitioned table will still result in row sampling on the foreign table regardless of this setting, though direct analysis of the foreign table would have attempted to fetch and import the remote statistics first if this option was enabled. Note that this option doesn't currently support the case where the remote table is (or was once) inherited. This is an implementation restriction that might be fixed in a future release."}, {"name": "extensions", "definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly."}, {"name": "fetch_size", "definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 ."}, {"name": "batch_size", "definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error. This option also applies when copying into foreign tables. In that case the actual number of rows postgres_fdw copies at once is determined in a similar way to the insert case, but it is limited to at most 1000 due to implementation restrictions of the COPY command."}, {"name": "async_capable", "definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release."}, {"name": "parallel_commit", "definition": "This option controls whether postgres_fdw commits, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false ."}, {"name": "parallel_abort", "definition": "This option controls whether postgres_fdw aborts, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is aborted. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false ."}, {"name": "updatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server."}, {"name": "truncatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server."}, {"name": "import_collate", "definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different."}, {"name": "import_default", "definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally."}, {"name": "import_generated", "definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally."}, {"name": "import_not_null", "definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true ."}, {"name": "keep_connections", "definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction."}, {"name": "use_scram_passthrough", "definition": "This option controls whether postgres_fdw will use the SCRAM pass-through authentication to connect to the foreign server. It can be specified for a foreign server or a user mapping. A user mapping setting overrides the foreign server setting. With SCRAM pass-through authentication, postgres_fdw uses SCRAM-hashed secrets instead of plain-text user passwords to connect to the remote server. This avoids storing plain-text user passwords in PostgreSQL system catalogs. To use SCRAM pass-through authentication: The remote server must request the scram-sha-256 authentication method; otherwise, the connection will fail. The remote server can be of any PostgreSQL version that supports SCRAM. Support for use_scram_passthrough is only required on the client side (FDW side). The user mapping password is not used. The server running postgres_fdw and the remote server must have identical SCRAM secrets (encrypted passwords) for the user being used on postgres_fdw to authenticate on the foreign server (same salt and iterations, not merely the same password). As a corollary, if FDW connections to multiple hosts are to be made, for example for partitioned foreign tables/sharding, then all hosts must have identical SCRAM secrets for the users involved. The current session on the PostgreSQL instance that makes the outgoing FDW connections also must also use SCRAM authentication for its incoming client connection. (Hence \u201c pass-through \u201d : SCRAM must be used going in and out.) This is a technical requirement of the SCRAM protocol. The foreign server must not be used for subscription connections (see Section F.40.4 )."}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ImportForeignStatistics": "postgresImportForeignStatistics", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "source_options": [], "protocol_versions": {}}, "comparison_hash": "979d5d561aadcb43a7175cdac42b9b3460c97a4ad5d7464e730ecb6404e60bbf", "manual_language": "zh", "runtime_verified": false, "collection_tables": [{"key": "fdw-catalogue", "rows": [{"scope": "\u5305\u88c5\u5668\u6846\u67b6", "checked": "2026-08-30", "version": "0.6.3", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/wrappers/", "text": "wrappers"}, "description": "Supabase\u63d0\u4f9b\u7684\u5916\u90e8\u6570\u636e\u6e90\u5305\u88c5\u5668\u6346\u7ed1\u5305"}, {"scope": "\u5305\u88c5\u5668\u6846\u67b6", "checked": "2026-08-30", "version": "3.2", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/multicorn/", "text": "multicorn"}, "description": "\u7528Python\u7f16\u5199\u81ea\u5b9a\u4e49\u7684\u5916\u90e8\u6570\u636e\u6e90\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.5.2", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/odbc_fdw/", "text": "odbc_fdw"}, "description": "\u8bbf\u95eeODBC\u53ef\u8bbf\u95ee\u7684\u4efb\u4f55\u5916\u90e8\u6570\u636e\u6e90"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.2", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/jdbc_fdw/", "text": "jdbc_fdw"}, "description": "\u8bbf\u95eeJDBC\u53ef\u8bbf\u95ee\u7684\u4efb\u4f55\u5916\u90e8\u6570\u636e\u6e90"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.3.0", "postgres": "15, 16, 17, 18", "extension": {"url": "/e/pgspider_ext/", "text": "pgspider_ext"}, "description": "\u4f7f\u7528\u591a\u79cdFDW\u8bbf\u95ee\u8fdc\u7a0b\u6570\u636e\u5e93\u670d\u52a1\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "2.9.3", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/mysql_fdw/", "text": "mysql_fdw"}, "description": "MySQL\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u4e0b\u65b9\u5355\u72ec\u6838\u9a8c\u4e00\u624b\u6587\u6863", "checked": "2026-08-30", "version": "2.9.0", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/oracle_fdw/", "text": "oracle_fdw"}, "description": "\u63d0\u4f9b\u5bf9Oracle\u7684\u5916\u90e8\u6570\u636e\u6e90\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "2.0.5", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/tds_fdw/", "text": "tds_fdw"}, "description": "TDS \u6570\u636e\u5e93\uff08Sybase/SQL Server\uff09\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "18.2.0", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/db2_fdw/", "text": "db2_fdw"}, "description": "\u63d0\u4f9b\u5bf9DB2\u7684\u5916\u90e8\u6570\u636e\u6e90\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "2.5.0", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/sqlite_fdw/", "text": "sqlite_fdw"}, "description": "SQLite \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.4.0", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/pgbouncer_fdw/", "text": "pgbouncer_fdw"}, "description": "\u7528SQL\u67e5\u8be2pgbouncer\u7edf\u8ba1\u4fe1\u606f\uff0c\u5e76\u6267\u884cpgbouncer\u547d\u4ee4"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.1", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/etcd_fdw/", "text": "etcd_fdw"}, "description": "etcd\u5206\u5e03\u5f0f\u952e\u503c\u5b58\u50a8\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.6.3", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/informix_fdw/", "text": "informix_fdw"}, "description": "Informix \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "2.3", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/nominatim_fdw/", "text": "nominatim_fdw"}, "description": "Nominatim \u5730\u7406\u7f16\u7801\u63a5\u53e3\u7684 FDW \u6269\u5c55"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "5.5.3", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/mongo_fdw/", "text": "mongo_fdw"}, "description": "MongoDB \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/redis_fdw/", "text": "redis_fdw"}, "description": "\u67e5\u8be2\u5916\u90e8Redis\u6570\u636e\u6e90"}, {"scope": "\u76f8\u5173\u6d88\u606f\u63a5\u53e3", "checked": "2026-08-30", "version": "0.0.1", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/redis/", "text": "redis"}, "description": "\u4ecePG\u5411Redis\u53d1\u9001Pub/Sub\u6d88\u606f"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.3", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/kafka_fdw/", "text": "kafka_fdw"}, "description": "Kafka\u5916\u90e8\u6570\u636e\u6e90\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "2.0.5", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/hdfs_fdw/", "text": "hdfs_fdw"}, "description": "hdfs \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.4.2", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/firebird_fdw/", "text": "firebird_fdw"}, "description": "Firebird\u5916\u90e8\u6570\u636e\u6e90\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-27", "version": "3.0", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/rdf_fdw/", "text": "rdf_fdw"}, "description": "\u901a\u8fc7 SPARQL \u7aef\u70b9\u8bbf\u95ee RDF \u4e09\u5143\u7ec4\u5b58\u50a8\u7684 FDW"}, {"scope": "\u76f8\u5173\u5bfc\u5165\uff0f\u5bfc\u51fa\u63a5\u53e3", "checked": "2026-08-30", "version": "0.0.1", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/aws_s3/", "text": "aws_s3"}, "description": "\u4eceS3\u5bfc\u5165\u5bfc\u51fa\u6570\u636e\u7684\u5916\u90e8\u6570\u636e\u6e90\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.5", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/log_fdw/", "text": "log_fdw"}, "description": "\u8bbf\u95eePostgreSQL\u65e5\u5fd7\u6587\u4ef6\u7684FDW"}, {"scope": "\u76f8\u5173\u8fdc\u7a0b\u67e5\u8be2\u63a5\u53e3", "checked": "\u672a\u8bb0\u5f55", "version": "1.2", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/dblink/", "text": "dblink"}, "description": "\u4ece\u6570\u636e\u5e93\u5185\u8fde\u63a5\u5230\u5176\u4ed6 PostgreSQL \u6570\u636e\u5e93"}, {"scope": "\u6838\u5fc3\u63a5\u53e3\uff1b\u8be6\u89c1\u5bf9\u5e94\u7248\u672c\u6761\u76ee", "checked": "\u672a\u8bb0\u5f55", "version": "1.0", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/file_fdw/", "text": "file_fdw"}, "description": "\u8bbf\u95ee\u5916\u90e8\u6587\u4ef6\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u6838\u5fc3\u63a5\u53e3\uff1b\u8be6\u89c1\u5bf9\u5e94\u7248\u672c\u6761\u76ee", "checked": "\u672a\u8bb0\u5f55", "version": "1.1", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/postgres_fdw/", "text": "postgres_fdw"}, "description": "\u7528\u4e8e\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1", "postgres": "11, 12, 13", "extension": {"url": "/e/clickhousedb_fdw/", "text": "clickhousedb_fdw"}, "description": "ClickHouse \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u652f\u6301 SELECT/INSERT\uff0c\u4ee5\u53ca\u805a\u5408\u4e0e\u8fde\u63a5\u4e0b\u63a8\u3002"}, {"scope": "\u5305\u88c5\u5668\u6846\u67b6", "checked": "2026-08-30", "version": "1.0", "postgres": "10, 11, 12, 13, 14, 15, 16, 17, 18", "extension": {"url": "/e/holycorn/", "text": "holycorn"}, "description": "holycorn\uff1a\u57fa\u4e8e Ruby \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u63d0\u4f9b\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/json_fdw/", "text": "json_fdw"}, "description": "\u7528\u4e8e\u8bbf\u95ee\u672c\u5730\u53ca\u8fdc\u7a0b JSON \u6587\u6863\u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.2", "postgres": "10, 11, 12, 13, 14, 15, 16", "extension": {"url": "/e/parquet_fdw/", "text": "parquet_fdw"}, "description": "parquet_fdw\uff1a\u7528\u4e8e\u8bfb\u53d6 Apache Parquet \u6587\u4ef6\u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1.9", "postgres": "\u672a\u77e5", "extension": {"url": "/e/www_fdw/", "text": "www_fdw"}, "description": "\u4ece PostgreSQL \u8bbf\u95ee Web \u670d\u52a1\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76f8\u5173\u8fdc\u7a0b\u67e5\u8be2\u63a5\u53e3", "checked": "2026-08-30", "version": "1.0.11", "postgres": "\u672a\u77e5", "extension": {"url": "/e/dblink_plus/", "text": "dblink_plus"}, "description": "dblink_plus\uff1a\u5728 PostgreSQL \u5185\u8fde\u63a5 PostgreSQL\u3001Oracle\u3001MySQL\u3001SQLite \u7b49\u5916\u90e8\u6570\u636e\u5e93\u5e76\u6267\u884c SQL\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "2.0", "postgres": "11, 12, 13, 14, 15", "extension": {"url": "/e/cassandra2_fdw/", "text": "cassandra2_fdw"}, "description": "cassandra2_fdw\uff1a\u7528\u4e8e\u4ece PostgreSQL \u67e5\u8be2 Cassandra 2.x \u53ca\u66f4\u65b0\u7248\u672c\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "13", "extension": {"url": "/e/ch_fdw/", "text": "ch_fdw"}, "description": "ch_fdw\uff1a\u7528\u4e8e\u8bbf\u95ee\u6216\u96c6\u6210 federated access from PostgreSQL to ClickHouse \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/couchdb_fdw/", "text": "couchdb_fdw"}, "description": "couchdb_fdw\uff1a\u7528\u4e8e\u4ece PostgreSQL \u67e5\u8be2 CouchDB \u6587\u6863\u6570\u636e\u5e93\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/dump_fdw/", "text": "dump_fdw"}, "description": "\u76f4\u63a5\u67e5\u8be2 PostgreSQL \u81ea\u5b9a\u4e49\u683c\u5f0f\u8f6c\u50a8\u6587\u4ef6\u4e2d\u6570\u636e\u884c\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/file_fixed_length_fdw/", "text": "file_fixed_length_fdw"}, "description": "file_fixed_length_fdw\uff1a\u8bfb\u53d6\u56fa\u5b9a\u957f\u5ea6\u5b57\u6bb5\u6587\u4ef6\u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/file_textarray_fdw/", "text": "file_textarray_fdw"}, "description": "file_textarray_fdw\uff1a\u5c06\u6587\u672c\u6587\u4ef6\u7684\u6bcf\u884c\u89e3\u6790\u4e3a text[] \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.1.0", "postgres": "10, 11, 12, 13, 14, 15, 16, 17, 18", "extension": {"url": "/e/git_fdw/", "text": "git_fdw"}, "description": "git_fdw\uff1a\u7528\u4e8e\u8bbf\u95ee\u6216\u96c6\u6210 \u5916\u90e8\u6570\u636e\u6e90 \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u5305\u88c5\u5668\u5f00\u53d1\u6846\u67b6", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/go_fdw/", "text": "go_fdw"}, "description": "\u7528\u4e8e\u6784\u5efa PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5b9e\u9a8c\u6027 Go/cgo \u9879\u76ee\u6a21\u677f\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1.0", "postgres": "10, 11, 12, 13, 14, 15, 16, 17, 18", "extension": {"url": "/e/bigtable/", "text": "bigtable"}, "description": "bigtable\uff1a\u5916\u90e8\u6570\u636e\u8bbf\u95ee\u7c7b PostgreSQL \u6269\u5c55\uff1b\u4e0a\u6e38\u8bf4\u660e\u4e3a\u201cRust PostgreSQL FDW for Google Bigtable\u201d\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.2", "postgres": "13, 14, 15, 16, 17", "extension": {"url": "/e/griddb_fdw/", "text": "griddb_fdw"}, "description": "griddb_fdw\uff1a\u7528\u4e8e\u8bbf\u95ee\u6216\u96c6\u6210 PostgreSQL \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/hello_fdw/", "text": "hello_fdw"}, "description": "hello_fdw\uff1a\u7528\u4e8e\u8bbf\u95ee\u6216\u96c6\u6210 hello world \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.3", "postgres": "13, 14, 15, 16, 17", "extension": {"url": "/e/influxdb_fdw/", "text": "influxdb_fdw"}, "description": "\u7528\u4e8e\u4ece PostgreSQL \u67e5\u8be2 InfluxDB \u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/jdbc2_fdw/", "text": "jdbc2_fdw"}, "description": "\u9762\u5411\u53ef\u901a\u8fc7 JDBC \u8bbf\u95ee\u7684\u6570\u636e\u5e93\u7684\u5b9e\u9a8c\u6027\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u652f\u6301\u8fdc\u7a0b\u8fc7\u6ee4\u6761\u4ef6\u4e0b\u63a8\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/kt_fdw/", "text": "kt_fdw"}, "description": "\u8bbf\u95ee Kyoto Tycoon \u952e\u503c\u5b58\u50a8\u5e76\u652f\u6301\u8bfb\u5199\u64cd\u4f5c\u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/ldap_fdw/", "text": "ldap_fdw"}, "description": "\u7528\u4e8e\u67e5\u8be2 LDAP \u670d\u52a1\u5668\u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "4.1.2", "postgres": "10, 11, 12, 13, 14, 15, 16, 17, 18", "extension": {"url": "/e/osm_fdw/", "text": "osm_fdw"}, "description": "osm_fdw\uff1a\u7528\u4e8e\u8bfb\u53d6 OpenStreetMap PBF \u6587\u4ef6\u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.1", "postgres": "13", "extension": {"url": "/e/kv_fdw/", "text": "kv_fdw"}, "description": "kv_fdw\uff1a\u7528\u4e8e\u8bbf\u95ee\u6216\u96c6\u6210 key-value storage backed by RocksDB/VidarDB \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.4.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/quasar_fdw/", "text": "quasar_fdw"}, "description": "quasar_fdw\uff1a\u5c06 PostgreSQL \u67e5\u8be2\u4e0b\u63a8\u5230 Quasar \u652f\u6301\u7684\u6570\u636e\u540e\u7aef"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/s3_fdw/", "text": "s3_fdw"}, "description": "\u901a\u8fc7 PostgreSQL COPY \u683c\u5f0f\u8bfb\u53d6 Amazon S3 \u6587\u4ef6\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/twitter_fdw/", "text": "twitter_fdw"}, "description": "\u9762\u5411\u5df2\u9000\u5f79\u7684\u514d\u8ba4\u8bc1 Twitter Search API \u7684\u65e7\u7248\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/monetdb_fdw/", "text": "monetdb_fdw"}, "description": "monetdb_fdw\uff1a\u7528\u4e8e\u8bbf\u95ee MonetDB \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "4.3.2-dev", "postgres": "10, 11, 12", "extension": {"url": "/e/neo4j-fdw/", "text": "neo4j-fdw"}, "description": "\u57fa\u4e8e Multicorn\u3001\u7528\u4e8e\u8bbf\u95ee Neo4j \u5e76\u6267\u884c Cypher \u67e5\u8be2\u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/neo4j_fdw/", "text": "neo4j_fdw"}, "description": "neo4j_fdw\uff1a\u7528\u4e8e\u8bbf\u95ee\u6216\u96c6\u6210 Neo4j Cypher query results \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/orc_fdw/", "text": "orc_fdw"}, "description": "orc_fdw\uff1a\u7528\u4e8e\u8bbf\u95ee\u6216\u96c6\u6210 ORC \u683c\u5f0f\u6587\u4ef6\u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1", "postgres": "11, 12, 13", "extension": {"url": "/e/lsm/", "text": "lsm"}, "description": "lsm\uff1a\u7528\u4e8e\u8bbf\u95ee RocksDB \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/oblivpg_fdw/", "text": "oblivpg_fdw"}, "description": "oblivpg_fdw\uff1a\u57fa\u4e8e\u53ef\u4fe1\u786c\u4ef6\u4e0e ORAM \u7684\u9690\u79c1\u4fdd\u62a4\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.10.2", "postgres": "\u672a\u77e5", "extension": {"url": "/e/kadb_fdw/", "text": "kadb_fdw"}, "description": "\u9762\u5411 Arenadata DB \u548c Greenplum \u7684\u4e8b\u52a1\u578b Kafka \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "3.1", "postgres": "11, 12, 13, 14, 15, 16, 17, 18", "extension": {"url": "/e/cassandra_fdw/", "text": "cassandra_fdw"}, "description": "\u7528\u4e8e\u4ece PostgreSQL 11+ \u8bfb\u5199 Cassandra 3+ \u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "12", "extension": {"url": "/e/db2odbc_fdw/", "text": "db2odbc_fdw"}, "description": "\u901a\u8fc7 ODBC \u6570\u636e\u6e90\u8bbf\u95ee IBM Db2 \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "4.0", "postgres": "13", "extension": {"url": "/e/hive_fdw/", "text": "hive_fdw"}, "description": "\u7528\u4e8e\u4ece PostgreSQL \u67e5\u8be2 Apache Hive \u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/lua_fdw/", "text": "lua_fdw"}, "description": "\u901a\u8fc7 Lua \u811a\u672c\u5b9e\u73b0\u53ea\u8bfb\u6570\u636e\u6e90\u8bbf\u95ee\u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "10, 11, 12, 13, 14", "extension": {"url": "/e/ocgeo_fdw/", "text": "ocgeo_fdw"}, "description": "ocgeo_fdw\uff1a\u7528\u4e8e\u8bbf\u95ee OpenCageData API \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "10, 11, 12, 13, 14, 15, 16, 17, 18", "extension": {"url": "/e/douban_fdw/", "text": "douban_fdw"}, "description": "\u7528\u4e8e\u67e5\u8be2\u8c46\u74e3\u516c\u5f00\u7535\u5f71\u6392\u884c\u699c API \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.4.0", "postgres": "10, 11, 12, 13, 14, 15, 16, 17, 18", "extension": {"url": "/e/passwd-fdw/", "text": "passwd-fdw"}, "description": "passwd-fdw\uff1a\u5916\u90e8\u6570\u636e\u8bbf\u95ee\u7c7b PostgreSQL \u6269\u5c55\uff1b\u7528\u4e8e\u4ee5 FDW \u65b9\u5f0f\u8bbf\u95ee Unix/Linux \u7528\u6237\u4e0e\u7528\u6237\u7ec4\u6570\u636e\u5e93\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/aerospike_fdw/", "text": "aerospike_fdw"}, "description": "\u7528\u4e8e\u8bbf\u95ee Aerospike \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/file_fdw_program/", "text": "file_fdw_program"}, "description": "file_fdw_program\uff1a\u56de\u79fb\u690d file_fdw \u7684 PROGRAM \u9009\u9879\uff0c\u63d0\u4f9b\u53ef\u4ece\u5916\u90e8\u547d\u4ee4\u8bfb\u53d6\u6570\u636e\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "12, 13", "extension": {"url": "/e/greenplum_fdw/", "text": "greenplum_fdw"}, "description": "\u4ece PostgreSQL \u67e5\u8be2 Greenplum \u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \u9694\u79bb\u7ea7\u522b\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.2", "postgres": "10, 11, 12, 13, 14, 15, 16, 17, 18", "extension": {"url": "/e/treasuredata_fdw/", "text": "treasuredata_fdw"}, "description": "\u901a\u8fc7 Rust td-client \u6865\u63a5\u5b9e\u73b0\u7684 C \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u7528\u4e8e\u67e5\u8be2\u548c\u5199\u5165 Treasure Data \u6570\u636e\u96c6\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/tsf_fdw/", "text": "tsf_fdw"}, "description": "Golden Helix \u63d0\u4f9b\u7684 C \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u7528\u4e8e\u628a\u4e00\u4e2a\u6216\u591a\u4e2a TSF \u57fa\u56e0\u7ec4\u6570\u636e\u6587\u4ef6\u4f5c\u4e3a PostgreSQL \u5916\u8868\u8bfb\u53d6\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/tuple_fdw/", "text": "tuple_fdw"}, "description": "\u7528\u4e8e\u8ffd\u52a0\u5199\u3001LZ4 \u538b\u7f29\u4e8c\u8fdb\u5236\u5143\u7ec4\u6587\u4ef6\u51b7\u5b58\u50a8\u7684\u6982\u5ff5\u9a8c\u8bc1\u578b C \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/wdb_fdw/", "text": "wdb_fdw"}, "description": "wdb_fdw\uff1aWhiteDB \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/gtables_fdw/", "text": "gtables_fdw"}, "description": "gtables_fdw\uff1a\u7528\u4e8e\u8bbf\u95ee\u6216\u96c6\u6210 Global tables across FDW API \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/hash_fdw/", "text": "hash_fdw"}, "description": "\u57fa\u4e8e\u5171\u4eab\u5185\u5b58\u54c8\u5e0c\u8868\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u53ef\u6309\u914d\u7f6e\u7684\u952e\u5b58\u50a8\u548c\u67e5\u8be2\u884c\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/hba_fdw/", "text": "hba_fdw"}, "description": "\u7528\u4e8e\u901a\u8fc7 SQL \u8bbf\u95ee pg_hba.conf \u7684\u672a\u5b8c\u5de5\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u811a\u624b\u67b6\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/hbase_fdw/", "text": "hbase_fdw"}, "description": "\u7528\u4e8e\u4ece PostgreSQL \u67e5\u8be2 HBase \u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "12", "extension": {"url": "/e/pgc_fdw/", "text": "pgc_fdw"}, "description": "\u901a\u8fc7\u6d3e\u751f\u81ea postgres_fdw\u3001\u7531 FoundationDB \u63d0\u4f9b\u67e5\u8be2\u7f13\u5b58\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u8868"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/pglog/", "text": "pglog"}, "description": "pglog\uff1a\u5916\u90e8\u6570\u636e\u8bbf\u95ee\u7c7b PostgreSQL \u6269\u5c55\uff1b\u4e0a\u6e38\u8bf4\u660e\u4e3a\u201cPostgreSQL log via SQL\u201d\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "16, 17, 18", "extension": {"url": "/e/postgres_fdw_plus/", "text": "postgres_fdw_plus"}, "description": "\u5728 postgres_fdw \u5206\u652f\u4e2d\u4e3a\u8fdc\u7a0b PostgreSQL \u4e8b\u52a1\u589e\u52a0\u53ef\u9009\u4e24\u9636\u6bb5\u63d0\u4ea4\u4e0e\u6062\u590d\u8f85\u52a9\u529f\u80fd"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/rasterdb/", "text": "rasterdb"}, "description": "rasterdb\uff1a\u9762\u5411\u6587\u4ef6\u7cfb\u7edf PostGIS \u6805\u683c\u6570\u636e\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/sybase_fdw/", "text": "sybase_fdw"}, "description": "\u7528\u4e8e\u4ece PostgreSQL \u8bbf\u95ee Sybase \u6570\u636e\u5e93\u7684 C \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0", "postgres": "10, 11, 12, 13, 14, 15, 16, 17, 18", "extension": {"url": "/e/template_fdw/", "text": "template_fdw"}, "description": "\u7528\u4e8e\u6a21\u677f\u8868\u5e76\u6709\u610f\u62d2\u7edd SELECT \u4e0e DML \u64cd\u4f5c\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/dataclips/", "text": "dataclips"}, "description": "\u5df2\u5f52\u6863\u4e14\u672a\u5b8c\u6210\u7684 C \u6269\u5c55\u539f\u578b\uff0c\u8ba1\u5212\u901a\u8fc7\u51fd\u6570\u548c FDW \u67e5\u8be2 Heroku Dataclips\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "16", "extension": {"url": "/e/redis_link/", "text": "redis_link"}, "description": "\u9762\u5411 Redis \u5b57\u7b26\u4e32\u3001\u54c8\u5e0c\u548c\u96c6\u5408\u7684 PostgreSQL \u8bfb\u5199\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u63d0\u4f9b\u57fa\u7840 Redis Cluster \u652f\u6301"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.3.3", "postgres": "14, 15, 16, 17", "extension": {"url": "/e/clerk_fdw/", "text": "clerk_fdw"}, "description": "\u7528\u4e8e\u4ece PostgreSQL \u67e5\u8be2 Clerk \u7528\u6237\u7ba1\u7406 API \u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.2.1", "postgres": "14, 15, 16, 17", "extension": {"url": "/e/prometheus_fdw/", "text": "prometheus_fdw"}, "description": "prometheus_fdw \u662f\u4e00\u4e2a Rust/pgrx \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u53ef\u901a\u8fc7 PostgreSQL \u5916\u90e8\u8868\u67e5\u8be2 Prometheus \u6307\u6807\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.0", "postgres": "13, 14, 15, 16, 17", "extension": {"url": "/e/lance/", "text": "lance"}, "description": "\u7528\u4e8e\u8bfb\u53d6\u548c\u67e5\u8be2 Lance \u683c\u5f0f\u8868\u7684 PostgreSQL FDW \u6269\u5c55\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.5.5-rc.1", "postgres": "13, 14, 15, 16, 17, 18", "extension": {"url": "/e/pg_kalam/", "text": "pg_kalam"}, "description": "KalamDB PostgreSQL \u6269\u5c55\uff0c\u63d0\u4f9b\u9762\u5411 KalamDB \u7684 FDW/SQL \u63a5\u5165\u5c42\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.13.3", "postgres": "14, 15, 16, 17", "extension": {"url": "/e/orb_fdw/", "text": "orb_fdw"}, "description": "orb_fdw\uff1a\u7528\u4e8e\u8bbf\u95ee\u6216\u96c6\u6210 Orb \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.0", "postgres": "11, 12, 13, 14, 15", "extension": {"url": "/e/db721_fdw/", "text": "db721_fdw"}, "description": "\u57fa\u4e8e Rust/pgrx \u7684 db721 \u6587\u4ef6\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u7528\u4e8e CMU 15-721 \u9879\u76ee\u6570\u636e\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.2", "postgres": "14, 15, 16", "extension": {"url": "/e/prometheusfdw/", "text": "prometheusfdw"}, "description": "\u901a\u8fc7 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u67e5\u8be2 Prometheus \u5373\u65f6\u5411\u91cf\u6570\u636e\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.0", "postgres": "11, 12, 13, 14, 15", "extension": {"url": "/e/ebs_fdw/", "text": "ebs_fdw"}, "description": "\u57fa\u4e8e Rust/pgrx \u7684 AWS EBS \u5377\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u53ef\u5728 PostgreSQL \u4e2d\u67e5\u8be2 EBS \u5377\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.4", "postgres": "11, 12, 13, 14, 15, 16, 17", "extension": {"url": "/e/clickhouse_fdw/", "text": "clickhouse_fdw"}, "description": "\u7528\u4e8e\u5728 PostgreSQL \u4e2d\u8bbf\u95ee ClickHouse \u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-07-11", "version": "1.0", "postgres": "10, 11, 12, 13, 14, 15, 16, 17, 18", "extension": {"url": "/e/cos_fdw/", "text": "cos_fdw"}, "description": "\u817e\u8baf\u4e91\u6570\u636e\u5e93 PostgreSQL \u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u7528\u4e8e\u4ece\u817e\u8baf\u4e91\u5bf9\u8c61\u5b58\u50a8 COS \u8bfb\u53d6 CSV \u6570\u636e\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.1", "postgres": "13, 14, 15, 16, 17", "extension": {"url": "/e/dynamodb_fdw/", "text": "dynamodb_fdw"}, "description": "\u7528\u4e8e\u5728 PostgreSQL \u4e2d\u67e5\u8be2\u548c\u4fee\u6539 Amazon DynamoDB \u8868\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-07-11", "version": "\u672a\u8bb0\u5f55", "postgres": "17, 18", "extension": {"url": "/e/external_search_fdw/", "text": "external_search_fdw"}, "description": "AlloyDB \u6269\u5c55\uff0c\u7528\u4e8e\u901a\u8fc7\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u4ece PostgreSQL \u53ea\u8bfb\u67e5\u8be2 Elasticsearch \u6570\u636e\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-07-12", "version": "1.0.0", "postgres": "13, 14, 15, 16, 17", "extension": {"url": "/e/obs_fdw/", "text": "obs_fdw"}, "description": "\u534e\u4e3a\u4e91 RDS for PostgreSQL \u63d0\u4f9b\u7684 OBS \u5bf9\u8c61\u5b58\u50a8\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-07-12", "version": "\u672a\u8bb0\u5f55", "postgres": "11, 14, 16", "extension": {"url": "/e/oss_fdw/", "text": "oss_fdw"}, "description": "\u7528\u4e8e\u5728\u963f\u91cc\u4e91 PostgreSQL \u517c\u5bb9\u6258\u7ba1\u670d\u52a1\u4e2d\u8bfb\u5199 OSS \u5bf9\u8c61\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u6269\u5c55\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.3", "postgres": "13, 14, 15, 16, 17", "extension": {"url": "/e/parquet_s3_fdw/", "text": "parquet_s3_fdw"}, "description": "\u7528\u4e8e\u4ece PostgreSQL \u8bbf\u95ee\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\u548c Amazon S3 \u4e0a Parquet \u6587\u4ef6\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/scylla_fdw/", "text": "scylla_fdw"}, "description": "\u901a\u8fc7 CQL \u4ece PostgreSQL \u67e5\u8be2\u4e0e\u4fee\u6539 ScyllaDB \u8868\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-07-13", "version": "1.2", "postgres": "13, 14, 15, 16, 17, 18", "extension": {"url": "/e/starrocks_fdw/", "text": "starrocks_fdw"}, "description": "\u817e\u8baf\u4e91\u6570\u636e\u5e93 PostgreSQL \u81ea\u7814\u7684 StarRocks \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u901a\u8fc7 MySQL \u517c\u5bb9\u63a5\u53e3\u67e5\u8be2 StarRocks \u8868\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.125.0", "postgres": "14, 15", "extension": {"url": "/e/steampipe_postgres_aws/", "text": "steampipe_postgres_aws"}, "description": "\u5c06\u5b9e\u65f6 AWS API \u6620\u5c04\u4e3a PostgreSQL \u5916\u90e8\u8868\u7684 Steampipe AWS \u539f\u751f FDW\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "17, 18", "extension": {"url": "/e/valkey_fdw/", "text": "valkey_fdw"}, "description": "\u7528\u4e8e\u67e5\u8be2 Valkey \u670d\u52a1\u5668\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.2", "postgres": "14, 15, 16", "extension": {"url": "/e/vmagentfdw/", "text": "vmagentfdw"}, "description": "\u901a\u8fc7 vmagent HTTP API \u8bfb\u53d6\u6d3b\u8dc3\u548c\u5df2\u79fb\u9664\u6293\u53d6\u76ee\u6807\u72b6\u6001\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.6.0", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/redis_fdw_rs/", "text": "redis_fdw_rs"}, "description": "\u8ba9 PostgreSQL \u53ef\u4ee5\u50cf\u67e5\u8be2\u548c\u64cd\u4f5c\u666e\u901a\u8868\u4e00\u6837\u76f4\u63a5\u67e5\u8be2\u4e0e\u64cd\u4f5c Redis \u6570\u636e\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/pg_conn2/", "text": "pg_conn2"}, "description": "\u4ece SQL \u4e2d\u521b\u5efa\u5e76\u7ba1\u7406\u72ec\u7acb\u7684\u672c\u5730 PostgreSQL \u6570\u636e\u5e93\u8fde\u63a5\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1.2", "postgres": "13, 14, 15, 16, 17, 18", "extension": {"url": "/e/pg_sheet_fdw/", "text": "pg_sheet_fdw"}, "description": "\u5c06\u672c\u5730 Excel XLSX \u5de5\u4f5c\u8868\u4f5c\u4e3a PostgreSQL \u5916\u90e8\u8868\u8bfb\u53d6"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.13", "postgres": "11, 12, 13, 14, 15, 16, 17, 18", "extension": {"url": "/e/oai_fdw/", "text": "oai_fdw"}, "description": "\u7528\u4e8e\u8bbf\u95ee OAI-PMH \u5143\u6570\u636e\u4ed3\u5e93\u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.2.2", "postgres": "\u672a\u77e5", "extension": {"url": "/e/multicdr_fdw/", "text": "multicdr_fdw"}, "description": "\u7528\u4e8e\u5c06\u901a\u8bdd\u8be6\u5355\uff08CDR\uff09\u6587\u4ef6\u6d41\u4f5c\u4e3a\u5916\u90e8 SQL \u8868\u8bfb\u53d6\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/ansilo_pgx/", "text": "ansilo_pgx"}, "description": "PostgreSQL\u5230\u4efb\u4f55\u6570\u636e\u5e93\u7684\u63a5\u53e3"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-07-27", "version": "0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/busybee_fdw/", "text": "busybee_fdw"}, "description": "MQTT\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/dir_fdw/", "text": "dir_fdw"}, "description": "\u8bfb\u76ee\u5f55\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-07-27", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/dummy_data/", "text": "dummy_data"}, "description": "PostgreSQL 9.3+\u7684\u53ef\u8bfb\u6027\u5916\u952e\u6570\u636e\u5305\u88c5\u5668\u793a\u4f8b"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.4.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/filesystem/", "text": "filesystem"}, "description": "\u6587\u4ef6\u7cfb\u7edf\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/gofdw/", "text": "gofdw"}, "description": "\u7528Go\u5b9e\u73b0\u7684Postgres\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u5b9e\u9a8c"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/gp_exttable_fdw/", "text": "gp_exttable_fdw"}, "description": "\u9762\u5411 Greenplum \u7cfb\u6570\u636e\u5e93\u7684\u5916\u90e8\u8868\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/grpc_fdw/", "text": "grpc_fdw"}, "description": "\u901a\u8fc7gRPC\u59d4\u6258\u8868\u64cd\u4f5c\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/level_pivot/", "text": "level_pivot"}, "description": "\u652f\u6301\u8f6c\u7f6e\u548c\u952e\u6a21\u677f\u7684LevelDB\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/pg_kafka/", "text": "pg_kafka"}, "description": "\u9762\u5411 Kafka \u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.4", "postgres": "\u672a\u77e5", "extension": {"url": "/e/pg_monetdb/", "text": "pg_monetdb"}, "description": "MonetDB\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u589e\u5f3a\u5206\u6790\u6027\u4e0b\u63a8"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/pgtokdb/", "text": "pgtokdb"}, "description": "PostgreSQL\u5230kdb+\u6269\u5c55"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/pxf/", "text": "pxf"}, "description": "Greenplum\u5386\u53f2\u6269\u5c55\uff0c\u901a\u8fc7PXF\u8bbf\u95ee\u975e\u7ba1\u7406\u6570\u636e"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/pxf_fdw/", "text": "pxf_fdw"}, "description": "Greengage\u7684PXF\u6846\u67b6"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/r53db/", "text": "r53db"}, "description": "AWS Route53\u6570\u636e\u5e93\u670d\u52a1\u7684PostgreSQL\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/steampipe_postgres_fdw/", "text": "steampipe_postgres_fdw"}, "description": "\u96f6ETL\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\uff0c\u5c06\u4e91\u670d\u52a1\u548cAPI\u8c03\u7528\u6620\u5c04\u5230PostgreSQL\u5916\u90e8\u8868"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/tibero_fdw/", "text": "tibero_fdw"}, "description": "Tibero\u7684PostgreSQL\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u6e90\u4ee3\u7801"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "1.5.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/tsurugi_fdw/", "text": "tsurugi_fdw"}, "description": "\u7528\u4e8ePostgreSQL\u7684Tsurugi\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-30", "version": "0.0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/zipfile-fdw/", "text": "zipfile-fdw"}, "description": "ZIP\u6587\u4ef6\u8bbf\u95ee\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u539f\u578b"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-31", "version": "1.0", "postgres": "9.1, 9.2, 9.3", "extension": {"url": "/e/dc_fdw/", "text": "dc_fdw"}, "description": "\u7528\u4e8e\u8bbf\u95ee\u672c\u5730\u78c1\u76d8\u6587\u6863\u96c6\u5408\u7684\u5386\u53f2\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-08-31", "version": "0.4.1", "postgres": "14, 15, 16, 17, 18", "extension": {"url": "/e/openapi_fdw/", "text": "openapi_fdw"}, "description": "\u9762\u5411 OpenAPI \u4e0e JSON HTTP \u670d\u52a1\u7684\u53ef\u8bfb\u5199\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u3002"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-21", "version": "1.0.0-alpha1", "postgres": "18", "extension": {"url": "/e/pgwrh_fdw/", "text": "pgwrh_fdw"}, "description": "\u652f\u6301\u4e8b\u52a1\u8bbe\u7f6e\u4f20\u9012\u4e0e\u526f\u672c\u8def\u7531\u7684 PostgreSQL \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-26", "version": "0.6", "postgres": "\u672a\u77e5", "extension": {"url": "/e/gaia_fdw/", "text": "gaia_fdw"}, "description": "\u7528\u4e8e\u67e5\u8be2\u4e0e\u4fee\u6539 Gaia Platform \u6570\u636e\u5e93\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "1.0", "postgres": "9.3", "extension": {"url": "/e/sdb_fdw/", "text": "sdb_fdw"}, "description": "\u8bbf\u95ee SequoiaDB \u96c6\u5408\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/dist_fdw/", "text": "dist_fdw"}, "description": "openGauss \u6279\u91cf\u5bfc\u5165\u5916\u90e8\u6587\u4ef6\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/mot_fdw/", "text": "mot_fdw"}, "description": "openGauss \u5185\u5b58\u4f18\u5316\u8868\u5f15\u64ce\u7684 FDW \u9002\u914d\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "0.1.0", "postgres": "17, 18", "extension": {"url": "/e/yesno_pg/", "text": "yesno_pg"}, "description": "\u5c06 yesnodb \u7684\u5916\u90e8\u6570\u636e\u3001\u7d22\u5f15\u548c\u8868\u8bbf\u95ee\u65b9\u6cd5\u5f15\u5165 PostgreSQL"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "1.0.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/ekorre/", "text": "ekorre"}, "description": "\u8bfb\u53d6\u672c\u5730 Git \u4ed3\u5e93\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "1.0", "postgres": "13", "extension": {"url": "/e/redis_cluster_fdw/", "text": "redis_cluster_fdw"}, "description": "\u8bbf\u95ee Redis \u96c6\u7fa4\u6570\u636e\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/mufdw/", "text": "mufdw"}, "description": "\u7528\u4e8e\u6559\u5b66\u7684\u672c\u5730\u8868\u6700\u5c0f\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/pixels_fdw/", "text": "pixels_fdw"}, "description": "\u8bfb\u53d6 Pixels \u5217\u5f0f\u6587\u4ef6\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "0.1.0", "postgres": "13, 14, 15, 16, 17, 18", "extension": {"url": "/e/firebirdsql_fdw/", "text": "firebirdsql_fdw"}, "description": "\u4ee5 Rust \u5b9e\u73b0\u7684 Firebird \u6570\u636e\u5e93\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "1.0", "postgres": "15, 16", "extension": {"url": "/e/tdengine_fdw/", "text": "tdengine_fdw"}, "description": "\u8bbf\u95ee TDengine \u65f6\u5e8f\u6570\u636e\u5e93\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "1.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/kite_fdw/", "text": "kite_fdw"}, "description": "\u8bbf\u95ee\u8fdc\u7aef Kite \u670d\u52a1\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "0.1", "postgres": "13", "extension": {"url": "/e/pg_xdbc_fdw/", "text": "pg_xdbc_fdw"}, "description": "\u901a\u8fc7 XDBC \u4f20\u8f93\u6570\u636e\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "1.0", "postgres": "\u672a\u77e5", "extension": {"url": "/e/pgspider_core_fdw/", "text": "pgspider_core_fdw"}, "description": "PGSpider \u591a\u6570\u636e\u6e90\u5916\u90e8\u8868\u67e5\u8be2\u534f\u8c03\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "1.4", "postgres": "\u672a\u77e5", "extension": {"url": "/e/pgspider_fdw/", "text": "pgspider_fdw"}, "description": "\u8bbf\u95ee\u8fdc\u7aef PGSpider \u8282\u70b9\u7684\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"scope": "\u76ee\u5f55\u5019\u9009\u9879\uff1b\u63a5\u53e3\u5c1a\u672a\u6838\u9a8c", "checked": "2026-09-29", "version": "0.0.1", "postgres": "\u672a\u77e5", "extension": {"url": "/e/blackhole_fdw/", "text": "blackhole_fdw"}, "description": "\u4e22\u5f03\u5199\u5165\u4e14\u4e0d\u8fd4\u56de\u6570\u636e\u7684\u9ed1\u6d1e\u5916\u90e8\u8868"}], "title": "FDW \u5206\u7c7b\u76ee\u5f55", "caption": "\u6765\u81ea pgext.universe \u7684\u76ee\u5f55\u89c2\u5bdf\uff0c\u65e5\u671f\u4e3a 2026-09-29\u3002\u6269\u5c55\u7248\u672c\u3001\u6765\u6e90\u5143\u6570\u636e\u65e5\u671f\u548c\u58f0\u660e\u7684 PostgreSQL \u517c\u5bb9\u8303\u56f4\u5747\u72ec\u7acb\u4e8e\u6240\u9009\u6838\u5fc3\u7248\u672c\u3002\u76ee\u5f55\u5206\u7c7b\u4e0d\u80fd\u8bc1\u660e\u5177\u4f53\u80fd\u529b\u6216\u7ef4\u62a4\u652f\u6301\u3002", "columns": [{"key": "extension", "label": "\u73b0\u6709\u6269\u5c55"}, {"key": "version", "label": "\u76ee\u5f55\u8bb0\u8f7d\u7684\u7248\u672c"}, {"key": "postgres", "label": "\u58f0\u660e\u517c\u5bb9\u7684 PG \u5927\u7248\u672c"}, {"key": "checked", "label": "\u5143\u6570\u636e\u6838\u9a8c\u65f6\u95f4"}, {"key": "scope", "label": "\u8bc1\u636e\u8303\u56f4"}, {"key": "description", "label": "\u76ee\u5f55\u8bb0\u8f7d\u7684\u7528\u9014"}]}, {"key": "fdw-reviewed-capabilities", "rows": [{"state": "\u6709\u6761\u4ef6", "detail": "\u53ef\u8f6c\u6362\u7684\u6761\u4ef6\u80fd\u591f\u5728 Oracle \u6267\u884c\uff1bEXPLAIN \u4f1a\u5c55\u793a\u8fdc\u7a0b\u67e5\u8be2\u3002", "version": "2.9.0", "evidence": {"url": "https://github.com/laurenz/oracle_fdw/blob/3ea9a4522c445c15c741d4f2bc89bccde740d283/README.oracle_fdw", "text": "2026-09-29 \u00b7 3ea9a4522c44 \u00b7 README.oracle_fdw"}, "extension": {"url": "/e/oracle_fdw/", "text": "oracle_fdw"}, "capability": "\u6761\u4ef6\u4e0b\u63a8"}, {"state": "\u6709\u6761\u4ef6", "detail": "\u4ec5\u9650\u540c\u4e00\u670d\u52a1\u5668\u4e0a\u7684\u4e24\u4e2a\u8868\u3001SELECT \u67e5\u8be2\u548c\u53ef\u4e0b\u63a8\u7684\u6761\u4ef6\uff1b\u4e0d\u652f\u6301\u4ea4\u53c9\u8fde\u63a5\u53ca\u4e09\u8868\u8fde\u63a5\u3002\u8fde\u63a5\u4e0b\u63a8\u540e\u65e0\u6cd5\u518d\u4e0b\u63a8 ORDER BY\u3002", "version": "2.9.0", "evidence": {"url": "https://github.com/laurenz/oracle_fdw/blob/3ea9a4522c445c15c741d4f2bc89bccde740d283/README.oracle_fdw", "text": "2026-09-29 \u00b7 3ea9a4522c44 \u00b7 README.oracle_fdw"}, "extension": {"url": "/e/oracle_fdw/", "text": "oracle_fdw"}, "capability": "\u8fde\u63a5\u4e0b\u63a8"}, {"state": "\u6709\u6761\u4ef6", "detail": "\u672a\u8bbe\u7f6e readonly \u65f6\u652f\u6301 INSERT\u3001UPDATE \u548c DELETE\u3002UPDATE \u548c DELETE \u8981\u6c42\u4e3a\u6bcf\u4e2a Oracle \u4e3b\u952e\u5217\u542f\u7528 key\u3002", "version": "2.9.0", "evidence": {"url": "https://github.com/laurenz/oracle_fdw/blob/3ea9a4522c445c15c741d4f2bc89bccde740d283/README.oracle_fdw", "text": "2026-09-29 \u00b7 3ea9a4522c44 \u00b7 README.oracle_fdw"}, "extension": {"url": "/e/oracle_fdw/", "text": "oracle_fdw"}, "capability": "Writes"}, {"state": "\u6709\u6761\u4ef6", "detail": "\u4e8b\u52a1\u547d\u4ee4\u548c\u4fdd\u5b58\u70b9\u4f1a\u4f20\u9012\u7ed9 Oracle\u3002Oracle \u5148\u4e8e PostgreSQL \u63d0\u4ea4\uff0c\u56e0\u6b64\u5206\u5e03\u5f0f\u63d0\u4ea4\u4e0d\u5177\u5907\u539f\u5b50\u6027\u3002", "version": "2.9.0", "evidence": {"url": "https://github.com/laurenz/oracle_fdw/blob/3ea9a4522c445c15c741d4f2bc89bccde740d283/README.oracle_fdw", "text": "2026-09-29 \u00b7 3ea9a4522c44 \u00b7 README.oracle_fdw"}, "extension": {"url": "/e/oracle_fdw/", "text": "oracle_fdw"}, "capability": "Transactions"}, {"state": "\u672a\u77e5", "detail": "\u672c\u6b21\u6838\u9a8c\u672a\u786e\u8ba4\u805a\u5408\u4e0b\u63a8\u80fd\u529b\u3002", "version": "2.9.0", "evidence": {"url": "https://github.com/laurenz/oracle_fdw/blob/3ea9a4522c445c15c741d4f2bc89bccde740d283/README.oracle_fdw", "text": "2026-09-29 \u00b7 3ea9a4522c44 \u00b7 README.oracle_fdw"}, "extension": {"url": "/e/oracle_fdw/", "text": "oracle_fdw"}, "capability": "\u805a\u5408\u4e0b\u63a8"}], "title": "\u4e00\u624b\u6765\u6e90\u8bb0\u8f7d\u7684\u80fd\u529b", "caption": "\u6bcf\u9879\u58f0\u660e\u4ec5\u9002\u7528\u4e8e\u5176\u4e2d\u6307\u660e\u7684\u6269\u5c55\u7248\u672c\u548c\u56fa\u5b9a\u6765\u6e90\u4fee\u8ba2\u3002\u672a\u5217\u51fa\u7684\u80fd\u529b\u4ecd\u4e3a\u672a\u77e5\u3002\u8fd9\u4e9b\u662f\u6587\u6863\u89c2\u5bdf\uff0c\u4e0d\u662f\u8fd0\u884c\u65f6\u6d4b\u8bd5\u6216\u5f53\u524d\u7ef4\u62a4\u4fdd\u8bc1\u3002", "columns": [{"key": "extension", "label": "\u6269\u5c55"}, {"key": "version", "label": "\u5df2\u6838\u9a8c\u7248\u672c"}, {"key": "capability", "label": "\u80fd\u529b"}, {"key": "state", "label": "\u8bc1\u636e\u72b6\u6001"}, {"key": "detail", "label": "\u9002\u7528\u6761\u4ef6"}, {"key": "evidence", "label": "\u8bc1\u636e\u65e5\u671f\u4e0e\u6765\u6e90"}]}], "extension_reviews": [{"kind": "fdw", "name": "oracle_fdw", "claims": [{"text": "Translatable conditions can run in Oracle; EXPLAIN exposes the remote query.", "label": "Predicate pushdown", "state": "Conditional"}, {"text": "Two tables on one server, in SELECT, with shippable predicates; cross joins and three-table joins are excluded. A pushed join prevents ORDER BY pushdown.", "label": "Join pushdown", "state": "Conditional"}, {"text": "INSERT, UPDATE and DELETE are supported unless readonly is set. UPDATE and DELETE require every Oracle primary-key column to have key enabled.", "label": "Writes", "state": "Conditional"}, {"text": "Transaction commands and savepoints reach Oracle. Oracle commits before PostgreSQL, so distributed commit is not atomic.", "label": "Transactions", "state": "Conditional"}, {"text": "This review has not established aggregate pushdown.", "label": "Aggregate pushdown", "state": "Unknown"}], "sources": [{"url": "https://github.com/laurenz/oracle_fdw/blob/3ea9a4522c445c15c741d4f2bc89bccde740d283/README.oracle_fdw", "path": "README.oracle_fdw", "sha256": "0df770409c3896c887b0c4821457782cc887b7178bd52edef452026bd82d4ede", "local_name": "oracle_fdw-readme.txt"}], "version": "2.9.0", "revision": "3ea9a4522c445c15c741d4f2bc89bccde740d283", "checked_at": "2026-09-29"}], "catalog_observation": {"sha256": "a8f35f83709025575037ce50331f20fc27727e478464e35b48bb501e687cc121", "source": "data.pgext.universe", "identities": [{"id": 8500, "name": "wrappers"}, {"id": 8510, "name": "multicorn"}, {"id": 8520, "name": "odbc_fdw"}, {"id": 8530, "name": "jdbc_fdw"}, {"id": 8540, "name": "pgspider_ext"}, {"id": 8600, "name": "mysql_fdw"}, {"id": 8610, "name": "oracle_fdw"}, {"id": 8620, "name": "tds_fdw"}, {"id": 8630, "name": "db2_fdw"}, {"id": 8640, "name": "sqlite_fdw"}, {"id": 8650, "name": "pgbouncer_fdw"}, {"id": 8660, "name": "etcd_fdw"}, {"id": 8670, "name": "informix_fdw"}, {"id": 8680, "name": "nominatim_fdw"}, {"id": 8700, "name": "mongo_fdw"}, {"id": 8710, "name": "redis_fdw"}, {"id": 8720, "name": "redis"}, {"id": 8730, "name": "kafka_fdw"}, {"id": 8740, "name": "hdfs_fdw"}, {"id": 8750, "name": "firebird_fdw"}, {"id": 8760, "name": "rdf_fdw"}, {"id": 8800, "name": "aws_s3"}, {"id": 8810, "name": "log_fdw"}, {"id": 8970, "name": "dblink"}, {"id": 8980, "name": "file_fdw"}, {"id": 8990, "name": "postgres_fdw"}, {"id": 100017, "name": "clickhousedb_fdw"}, {"id": 100018, "name": "holycorn"}, {"id": 100019, "name": "json_fdw"}, {"id": 100020, "name": "parquet_fdw"}, {"id": 100021, "name": "www_fdw"}, {"id": 100072, "name": "dblink_plus"}, {"id": 100082, "name": "cassandra2_fdw"}, {"id": 100083, "name": "ch_fdw"}, {"id": 100084, "name": "couchdb_fdw"}, {"id": 100085, "name": "dump_fdw"}, {"id": 100086, "name": "file_fixed_length_fdw"}, {"id": 100092, "name": "file_textarray_fdw"}, {"id": 100093, "name": "git_fdw"}, {"id": 100094, "name": "go_fdw"}, {"id": 100095, "name": "bigtable"}, {"id": 100096, "name": "griddb_fdw"}, {"id": 100097, "name": "hello_fdw"}, {"id": 100098, "name": "influxdb_fdw"}, {"id": 100099, "name": "jdbc2_fdw"}, {"id": 100100, "name": "kt_fdw"}, {"id": 100101, "name": "ldap_fdw"}, {"id": 100102, "name": "osm_fdw"}, {"id": 100103, "name": "kv_fdw"}, {"id": 100104, "name": "quasar_fdw"}, {"id": 100105, "name": "s3_fdw"}, {"id": 100106, "name": "twitter_fdw"}, {"id": 100114, "name": "monetdb_fdw"}, {"id": 100115, "name": "neo4j-fdw"}, {"id": 100116, "name": "neo4j_fdw"}, {"id": 100117, "name": "orc_fdw"}, {"id": 100154, "name": "lsm"}, {"id": 100167, "name": "oblivpg_fdw"}, {"id": 100334, "name": "kadb_fdw"}, {"id": 100358, "name": "cassandra_fdw"}, {"id": 100359, "name": "db2odbc_fdw"}, {"id": 100368, "name": "hive_fdw"}, {"id": 100369, "name": "lua_fdw"}, {"id": 100370, "name": "ocgeo_fdw"}, {"id": 100371, "name": "douban_fdw"}, {"id": 100372, "name": "passwd-fdw"}, {"id": 100375, "name": "aerospike_fdw"}, {"id": 100376, "name": "file_fdw_program"}, {"id": 100377, "name": "greenplum_fdw"}, {"id": 100379, "name": "treasuredata_fdw"}, {"id": 100380, "name": "tsf_fdw"}, {"id": 100381, "name": "tuple_fdw"}, {"id": 100382, "name": "wdb_fdw"}, {"id": 100385, "name": "gtables_fdw"}, {"id": 100386, "name": "hash_fdw"}, {"id": 100387, "name": "hba_fdw"}, {"id": 100388, "name": "hbase_fdw"}, {"id": 100457, "name": "pgc_fdw"}, {"id": 100458, "name": "pglog"}, {"id": 100459, "name": "postgres_fdw_plus"}, {"id": 100540, "name": "rasterdb"}, {"id": 100566, "name": "sybase_fdw"}, {"id": 100568, "name": "template_fdw"}, {"id": 100598, "name": "dataclips"}, {"id": 100680, "name": "redis_link"}, {"id": 100709, "name": "clerk_fdw"}, {"id": 100718, "name": "prometheus_fdw"}, {"id": 100726, "name": "lance"}, {"id": 100728, "name": "pg_kalam"}, {"id": 100802, "name": "orb_fdw"}, {"id": 100858, "name": "db721_fdw"}, {"id": 100897, "name": "prometheusfdw"}, {"id": 100920, "name": "ebs_fdw"}, {"id": 100970, "name": "clickhouse_fdw"}, {"id": 100971, "name": "cos_fdw"}, {"id": 100978, "name": "dynamodb_fdw"}, {"id": 100986, "name": "external_search_fdw"}, {"id": 101033, "name": "obs_fdw"}, {"id": 101037, "name": "oss_fdw"}, {"id": 101038, "name": "parquet_s3_fdw"}, {"id": 101159, "name": "scylla_fdw"}, {"id": 101164, "name": "starrocks_fdw"}, {"id": 101166, "name": "steampipe_postgres_aws"}, {"id": 101196, "name": "valkey_fdw"}, {"id": 101198, "name": "vmagentfdw"}, {"id": 101221, "name": "redis_fdw_rs"}, {"id": 101226, "name": "pg_conn2"}, {"id": 101227, "name": "pg_sheet_fdw"}, {"id": 101228, "name": "oai_fdw"}, {"id": 101229, "name": "multicdr_fdw"}, {"id": 101277, "name": "ansilo_pgx"}, {"id": 101302, "name": "busybee_fdw"}, {"id": 101337, "name": "dir_fdw"}, {"id": 101341, "name": "dummy_data"}, {"id": 101364, "name": "filesystem"}, {"id": 101381, "name": "gofdw"}, {"id": 101384, "name": "gp_exttable_fdw"}, {"id": 101391, "name": "grpc_fdw"}, {"id": 101438, "name": "level_pivot"}, {"id": 101567, "name": "pg_kafka"}, {"id": 101583, "name": "pg_monetdb"}, {"id": 101693, "name": "pgtokdb"}, {"id": 101735, "name": "pxf"}, {"id": 101736, "name": "pxf_fdw"}, {"id": 101740, "name": "r53db"}, {"id": 101788, "name": "steampipe_postgres_fdw"}, {"id": 101811, "name": "tibero_fdw"}, {"id": 101820, "name": "tsurugi_fdw"}, {"id": 101844, "name": "zipfile-fdw"}, {"id": 101875, "name": "dc_fdw"}, {"id": 101895, "name": "openapi_fdw"}, {"id": 101990, "name": "pgwrh_fdw"}, {"id": 102028, "name": "gaia_fdw"}, {"id": 102038, "name": "sdb_fdw"}, {"id": 102039, "name": "dist_fdw"}, {"id": 102040, "name": "mot_fdw"}, {"id": 102041, "name": "yesno_pg"}, {"id": 102042, "name": "ekorre"}, {"id": 102043, "name": "redis_cluster_fdw"}, {"id": 102044, "name": "mufdw"}, {"id": 102045, "name": "pixels_fdw"}, {"id": 102046, "name": "firebirdsql_fdw"}, {"id": 102047, "name": "tdengine_fdw"}, {"id": 102048, "name": "kite_fdw"}, {"id": 102049, "name": "pg_xdbc_fdw"}, {"id": 102051, "name": "pgspider_core_fdw"}, {"id": 102052, "name": "pgspider_fdw"}, {"id": 102053, "name": "blackhole_fdw"}], "observed_at": "2026-09-29T15:02:21.407129+00:00", "catalogue_rows": 2452, "candidate_count": 148}}}}, "snapshot": {"facts": [{"label": "\u63a5\u53e3\u7c7b\u522b", "value": "\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668"}, {"label": "\u5904\u7406\u51fd\u6570\u6216\u4f8b\u7a0b", "value": "postgres_fdw_handler"}, {"label": "\u8bb0\u5f55\u7684\u56de\u8c03", "value": "36"}, {"label": "\u6570\u636e\u6e90", "value": "\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668"}], "tables": [{"key": "callbacks", "rows": [{"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u626b\u63cf\u6570\u636e\u884c", "callback": "IterateForeignScan", "implementation": "postgresIterateForeignScan"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "INSERT", "callback": "ExecForeignInsert", "implementation": "postgresExecForeignInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "UPDATE", "callback": "ExecForeignUpdate", "implementation": "postgresExecForeignUpdate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "DELETE", "callback": "ExecForeignDelete", "implementation": "postgresExecForeignDelete"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "TRUNCATE", "callback": "ExecForeignTruncate", "implementation": "postgresExecForeignTruncate"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u8fde\u63a5\u8def\u5f84\u4e0b\u63a8", "callback": "GetForeignJoinPaths", "implementation": "postgresGetForeignJoinPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u4e0a\u5c42\u8def\u5f84\uff0c\u5305\u62ec\u805a\u5408", "callback": "GetForeignUpperPaths", "implementation": "postgresGetForeignUpperPaths"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u6279\u91cf\u63d2\u5165", "callback": "ExecForeignBatchInsert", "implementation": "postgresExecForeignBatchInsert"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5f02\u6b65\u8ffd\u52a0\u6267\u884c", "callback": "ForeignAsyncRequest", "implementation": "postgresForeignAsyncRequest"}, {"state": "\u5df2\u6ce8\u518c\u5904\u7406\u51fd\u6570\uff1b\u9002\u7528\u6761\u4ef6\u9650\u5236", "feature": "\u5bfc\u5165\u6a21\u5f0f", "callback": "ImportForeignSchema", "implementation": "postgresImportForeignSchema"}], "title": "\u6ce8\u518c\u7684\u63a5\u53e3\u5904\u7406\u51fd\u6570", "columns": [{"key": "feature", "label": "\u63a5\u53e3\u64cd\u4f5c"}, {"key": "state", "label": "\u6e90\u7801\u89c2\u5bdf"}, {"key": "callback", "label": "\u56de\u8c03"}, {"key": "implementation", "label": "\u5b9e\u73b0"}]}, {"key": "options", "rows": [{"name": "schema_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002"}, {"name": "table_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "column_name", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002"}, {"name": "use_remote_estimate", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 postgres_fdw \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b EXPLAIN \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "fdw_startup_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "fdw_tuple_cost", "definition": "\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a 0.2 \u3002"}, {"name": "analyze_sampling", "definition": "\u6b64\u9009\u9879\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u51b3\u5b9a\u5916\u90e8\u8868 ANALYZE \u662f\u5728\u8fdc\u7a0b\u91c7\u6837\uff0c\u8fd8\u662f\u8bfb\u53d6\u5e76\u4f20\u8f93\u5168\u90e8\u6570\u636e\u540e\u5728\u672c\u5730\u91c7\u6837\u3002\u652f\u6301 off\u3001random\u3001system\u3001bernoulli \u548c auto\u3002off \u7981\u7528\u8fdc\u7a0b\u91c7\u6837\uff0c\u5168\u90e8\u6570\u636e\u4f1a\u4f20\u5230\u672c\u5730\u540e\u91c7\u6837\u3002random \u4f7f\u7528 random() \u51fd\u6570\u5728\u8fdc\u7a0b\u9009\u62e9\u8fd4\u56de\u884c\uff1bsystem \u548c bernoulli \u4f7f\u7528\u540c\u540d\u5185\u7f6e TABLESAMPLE \u65b9\u6cd5\u3002random \u9002\u7528\u4e8e\u6240\u6709\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\uff0cTABLESAMPLE \u4ec5\u4ece 9.5 \u8d77\u652f\u6301\u3002\u9ed8\u8ba4\u503c auto \u81ea\u52a8\u9009\u62e9\u63a8\u8350\u65b9\u6cd5\uff0c\u76ee\u524d\u6839\u636e\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\u9009\u62e9 bernoulli \u6216 random\u3002"}, {"name": "extensions", "definition": "\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 PostgreSQL \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002 \u4f7f\u7528 extensions \u9009\u9879\u65f6\uff0c \u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb \u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002"}, {"name": "fetch_size", "definition": "\u8be5\u9009\u9879\u6307\u5b9a postgres_fdw \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a 100 \u3002"}, {"name": "batch_size", "definition": "\u6b64\u9009\u9879\u6307\u5b9a postgres_fdw \u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u5e94\u63d2\u5165\u7684\u884c\u6570\uff0c\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u8868\u7ea7\u8bbe\u7f6e\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u8bbe\u7f6e\uff0c\u9ed8\u8ba4\u503c\u4e3a 1\u3002\u5b9e\u9645\u4e00\u6b21\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u548c batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u4e00\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570\u4e58\u4ee5 batch_size \u8d85\u51fa\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u62a5\u9519\u3002\u6b64\u9009\u9879\u4e5f\u9002\u7528\u4e8e\u5411\u5916\u90e8\u8868\u6267\u884c COPY\uff0c\u5b9e\u9645\u4e00\u6b21\u590d\u5236\u7684\u884c\u6570\u6309\u7c7b\u4f3c\u65b9\u5f0f\u786e\u5b9a\uff0c\u4f46\u53d7 COPY \u5b9e\u73b0\u9650\u5236\uff0c\u6700\u591a\u4e3a 1000 \u884c\u3002"}, {"name": "async_capable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002 \u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c postgres_fdw \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002 \u5373\u4f7f Append \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 postgres_fdw \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002"}, {"name": "parallel_commit", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "parallel_abort", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u4e2d\u6b62\u65f6\uff0c postgres_fdw \u662f\u5426\u5e76\u884c\u4e2d\u6b62\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002"}, {"name": "updatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 INSERT \u3001 UPDATE \u548c DELETE \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c information_schema \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 postgres_fdw \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002"}, {"name": "truncatable", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u5141\u8bb8\u4f7f\u7528 TRUNCATE \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002 \u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002"}, {"name": "import_collate", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 COLLATE \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002 \u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a true \uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 COLLATE \"default\" \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002"}, {"name": "import_default", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 DEFAULT \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a false \u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b nextval() \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_generated", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 GENERATED \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a IMPORT \u5c06\u5931\u8d25\u3002"}, {"name": "import_not_null", "definition": "\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 NOT NULL \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a true \u3002"}, {"name": "keep_connections", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a on \u3002\u5982\u679c\u8bbe\u7f6e\u4e3a off \uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002"}, {"name": "use_scram_passthrough", "definition": "\u8be5\u9009\u9879\u63a7\u5236 postgres_fdw \u5728\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\u65f6\u662f\u5426\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u3002\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u6307\u5b9a\u3002\u7528\u6237\u6620\u5c04\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5916\u90e8\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\u3002\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u65f6\uff0c postgres_fdw \u4f7f\u7528\u7ecf SCRAM Hash \u5904\u7406\u7684\u51ed\u636e\uff0c\u800c\u4e0d\u662f\u660e\u6587\u7528\u6237\u5bc6\u7801\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5728 PostgreSQL \u7cfb\u7edf\u76ee\u5f55\u4e2d\u5b58\u50a8\u660e\u6587\u7528\u6237\u5bc6\u7801\u3002 \u8981\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\uff1a \u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8bf7\u6c42 scram-sha-256 \u8ba4\u8bc1\u65b9\u6cd5\uff1b\u5426\u5219\u8fde\u63a5\u5c06\u5931\u8d25\u3002 \u8fdc\u7a0b\u670d\u52a1\u5668\u53ef\u4ee5\u662f\u4efb\u4f55\u652f\u6301 SCRAM \u7684 PostgreSQL \u7248\u672c\u3002\u5bf9 use_scram_passthrough \u7684\u652f\u6301\u53ea\u8981\u6c42\u5ba2\u6237\u7aef\u4e00\u4fa7\uff08FDW \u4fa7\uff09\u5177\u5907\u3002 \u7528\u6237\u6620\u5c04\u5bc6\u7801\u4e0d\u4f1a\u88ab\u4f7f\u7528\u3002 \u8fd0\u884c postgres_fdw \u7684\u670d\u52a1\u5668\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u5fc5\u987b\u9488\u5bf9\u7528\u4e8e\u5728 postgres_fdw \u4e0a\u8ba4\u8bc1\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8be5\u7528\u6237\uff0c\u62e5\u6709\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\uff08\u52a0\u5bc6\u5bc6\u7801\uff09\uff08\u76d0\u503c\u548c\u8fed\u4ee3\u6b21\u6570\u90fd\u5fc5\u987b\u76f8\u540c\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5bc6\u7801\u76f8\u540c\uff09\u3002 \u56e0\u800c\uff0c\u5982\u679c\u8981\u5efa\u7acb\u5230\u591a\u4e2a\u4e3b\u673a\u7684 FDW \u8fde\u63a5\uff0c\u4f8b\u5982\u7528\u4e8e\u5206\u533a\u5916\u90e8\u8868\u6216\u5206\u7247\uff0c\u5219\u6240\u6709\u4e3b\u673a\u90fd\u5fc5\u987b\u4e3a\u76f8\u5173\u7528\u6237\u4fdd\u5b58\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\u3002 \u53d1\u8d77\u5bf9\u5916 FDW \u8fde\u63a5\u7684 PostgreSQL \u5b9e\u4f8b\u4e2d\uff0c\u5f53\u524d\u4f1a\u8bdd\u7684\u4f20\u5165\u5ba2\u6237\u7aef\u8fde\u63a5\u4e5f\u5fc5\u987b\u4f7f\u7528 SCRAM \u8ba4\u8bc1\u3002\uff08\u56e0\u6b64\u79f0\u4e3a \u201c \u900f\u4f20 \u201d \uff1aSCRAM \u5fc5\u987b\u5728\u8fdb\u5165\u548c\u79bb\u5f00\u65f6\u90fd\u88ab\u4f7f\u7528\u3002\uff09\u8fd9\u662f SCRAM \u534f\u8bae\u7684\u6280\u672f\u8981\u6c42\u3002"}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "name", "label": "\u9009\u9879"}, {"key": "definition", "label": "\u540c\u7248\u672c\u5b9a\u4e49"}]}], "related": [{"url": "/wiki/catalog/pg_foreign_data_wrapper/?v=18", "label": "Foreign-data wrapper \u7cfb\u7edf\u76ee\u5f55"}, {"url": "/e/postgres_fdw/", "label": "\u65e2\u6709\u6269\u5c55\u76ee\u5f55\u6807\u8bc6"}, {"url": "/wiki/plan/foreign-scan/?v=18", "label": "Foreign Scan \u8ba1\u5212\u8282\u70b9"}], "release": {"ref": "PostgreSQL 18.6 source archive", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f", "source_url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "source_snapshot_utc": ""}, "sources": [{"url": "https://pg.center/docs/18/postgres-fdw.html", "path": "postgres-fdw.html", "label": "PostgreSQL 18 English manual", "sha256": "a7833ebac1e9581de25695443eaec67d16d32ef33107783cdfb940fefa5f66a3", "language": "en", "original_url": "/docs/18/postgres-fdw.html"}, {"url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "line": 557, "path": "contrib/postgres_fdw/postgres_fdw.c", "label": "contrib/postgres_fdw/postgres_fdw.c:557", "sha256": "5f61f89fc1f9d67a204c47fd993db575b2d619449e5238b536b9fb1877037db6", "archive_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}], "sections": [{"title": "\u63a5\u53e3\u4e0e\u80fd\u529b\u8fb9\u754c", "paragraphs": ["\u77e9\u9635\u8bb0\u5f55\u6b64\u6e90\u7801\u6784\u5efa\u5b9e\u9645\u6ce8\u518c\u7684\u56de\u8c03\u3002\u6ce8\u518c\u8868\u660e\u5b9e\u73b0\u4e86\u76f8\u5e94\u63a5\u53e3\u94a9\u5b50\uff1b\u64cd\u4f5c\u662f\u5426\u5141\u8bb8\u8fd8\u53d6\u51b3\u4e8e\u9009\u9879\u3001\u67e5\u8be2\u5f62\u5f0f\u3001\u6743\u9650\u548c\u63d0\u4f9b\u65b9\u89c4\u5219\u3002", "\u4e0b\u65b9\u4fdd\u7559\u540c\u7248\u672c\u5b8c\u6574\u624b\u518c\uff0c\u5305\u62ec\u914d\u7f6e\u3001\u7ea6\u675f\u548c\u793a\u4f8b\u3002\u4e0d\u58f0\u79f0\u5df2\u8fdb\u884c\u8fd0\u884c\u65f6\u80fd\u529b\u6d4b\u8bd5\u3002"]}, {"title": "\u5f02\u6b65\u6267\u884c\u9009\u9879", "paragraphs": ["postgres_fdw \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c Append \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406\u9009\u9879", "paragraphs": ["\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0c\u5728 postgres_fdw \u4e2d\uff0c\u4e8b\u52a1\u662f\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u6765\u7ba1\u7406\u7684\uff0c\u5b50\u4e8b\u52a1\u5219\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u6765\u7ba1\u7406\u3002\u5f53\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c postgres_fdw \u4f1a\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c postgres_fdw \u4e5f\u4f1a\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u53ef\u4ee5\u6539\u5584\u6027\u80fd\uff1a", "\u5982\u679c\u542f\u7528\u4e86\u8fd9\u4e9b\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002", "\u542f\u7528\u8fd9\u4e9b\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002"]}, {"title": "\u4e8b\u52a1\u7ba1\u7406", "paragraphs": ["\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c postgres_fdw \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002", "\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a SERIALIZABLE \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 SERIALIZABLE \uff1b\u5426\u5219\u4f7f\u7528 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 SERIALIZABLE \u6216 REPEATABLE READ \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e READ COMMITTED \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 PostgreSQL \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002", "\u8bf7\u6ce8\u610f\uff0c postgres_fdw \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002"]}, {"title": "\u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316", "paragraphs": ["postgres_fdw \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 WHERE \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 WHERE \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 extensions \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f IMMUTABLE \u3002\u5bf9\u4e8e UPDATE \u6216 DELETE \u67e5\u8be2\uff0c postgres_fdw \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 WHERE \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 BEFORE \u6216 AFTER \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 CHECK OPTION \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 UPDATE \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001 IMMUTABLE \u64cd\u4f5c\u7b26\u6216 IMMUTABLE \u51fd\u6570\u3002", "\u5f53 postgres_fdw \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 JOIN \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 WHERE \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002", "\u53ef\u4ee5\u4f7f\u7528 EXPLAIN VERBOSE \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002"]}, {"title": "\u8de8\u7248\u672c\u517c\u5bb9\u6027", "paragraphs": ["postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002", "\u4e00\u4e2a\u9650\u5236\u662f\uff0cpostgres_fdw \u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u6240\u7528\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u901a\u8fc7\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\uff0c\u4ee5\u6b64\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002", "\u53e6\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5728\u5916\u90e8\u8868\u4e0a\u6267\u884c INSERT \u8bed\u53e5\u5e76\u5e26\u6709 ON CONFLICT DO NOTHING \u5b50\u53e5\u65f6\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8fd0\u884c PostgreSQL 9.5 \u6216\u66f4\u9ad8\u7248\u672c\uff0c\u56e0\u4e3a\u66f4\u65e9\u7248\u672c\u4e0d\u652f\u6301\u6b64\u7279\u6027\u3002"]}, {"code": "{\n\tFdwRoutine *routine = makeNode(FdwRoutine);\n\n\t/* Functions for scanning foreign tables */\n\troutine->GetForeignRelSize = postgresGetForeignRelSize;\n\troutine->GetForeignPaths = postgresGetForeignPaths;\n\troutine->GetForeignPlan = postgresGetForeignPlan;\n\troutine->BeginForeignScan = postgresBeginForeignScan;\n\troutine->IterateForeignScan = postgresIterateForeignScan;\n\troutine->ReScanForeignScan = postgresReScanForeignScan;\n\troutine->EndForeignScan = postgresEndForeignScan;\n\n\t/* Functions for updating foreign tables */\n\troutine->AddForeignUpdateTargets = postgresAddForeignUpdateTargets;\n\troutine->PlanForeignModify = postgresPlanForeignModify;\n\troutine->BeginForeignModify = postgresBeginForeignModify;\n\troutine->ExecForeignInsert = postgresExecForeignInsert;\n\troutine->ExecForeignBatchInsert = postgresExecForeignBatchInsert;\n\troutine->GetForeignModifyBatchSize = postgresGetForeignModifyBatchSize;\n\troutine->ExecForeignUpdate = postgresExecForeignUpdate;\n\troutine->ExecForeignDelete = postgresExecForeignDelete;\n\troutine->EndForeignModify = postgresEndForeignModify;\n\troutine->BeginForeignInsert = postgresBeginForeignInsert;\n\troutine->EndForeignInsert = postgresEndForeignInsert;\n\troutine->IsForeignRelUpdatable = postgresIsForeignRelUpdatable;\n\troutine->PlanDirectModify = postgresPlanDirectModify;\n\troutine->BeginDirectModify = postgresBeginDirectModify;\n\troutine->IterateDirectModify = postgresIterateDirectModify;\n\troutine->EndDirectModify = postgresEndDirectModify;\n\n\t/* Function for EvalPlanQual rechecks */\n\troutine->RecheckForeignScan = postgresRecheckForeignScan;\n\t/* Support functions for EXPLAIN */\n\troutine->ExplainForeignScan = postgresExplainForeignScan;\n\troutine->ExplainForeignModify = postgresExplainForeignModify;\n\troutine->ExplainDirectModify = postgresExplainDirectModify;\n\n\t/* Support function for TRUNCATE */\n\troutine->ExecForeignTruncate = postgresExecForeignTruncate;\n\n\t/* Support functions for ANALYZE */\n\troutine->AnalyzeForeignTable = postgresAnalyzeForeignTable;\n\n\t/* Support functions for IMPORT FOREIGN SCHEMA */\n\troutine->ImportForeignSchema = postgresImportForeignSchema;\n\n\t/* Support functions for join push-down */\n\troutine->GetForeignJoinPaths = postgresGetForeignJoinPaths;\n\n\t/* Support functions for upper relation push-down */\n\troutine->GetForeignUpperPaths = postgresGetForeignUpperPaths;\n\n\t/* Support functions for asynchronous execution */\n\troutine->IsForeignPathAsyncCapable = postgresIsForeignPathAsyncCapable;\n\troutine->ForeignAsyncRequest = postgresForeignAsyncRequest;\n\troutine->ForeignAsyncConfigureWait = postgresForeignAsyncConfigureWait;\n\troutine->ForeignAsyncNotify = postgresForeignAsyncNotify;\n\n\tPG_RETURN_POINTER(routine);\n}", "title": "\u6838\u5fc3\u6e90\u7801\u4e2d\u6ce8\u518c\u7684\u5b9e\u73b0"}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "description": ["\u901a\u8fc7\u5916\u90e8\u8868\u8bbf\u95ee\u8fdc\u7a0b PostgreSQL \u670d\u52a1\u5668\u4e2d\u7684\u8868\u3002"], "manual_html": "<div class=\"sect1\" id=\"POSTGRES-FDW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h2 class=\"title\" style=\"clear: both\">F.38.\u00a0postgres_fdw \u2014 \u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e </h2>\n</div>\n</div>\n</h2>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u6a21\u5757\u63d0\u4f9b\u5916\u90e8\u6570\u636e\u5305\u88c5\u5668 <code class=\"literal\">postgres_fdw</code>\uff0c\u53ef\u7528\u4e8e\u8bbf\u95ee\u5b58\u50a8\u5728\u5916\u90e8 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u4e2d\u7684\u6570\u636e\u3002</p>\n<p lang=\"zh\">\u672c\u6a21\u5757\u63d0\u4f9b\u7684\u529f\u80fd\u4e0e\u8f83\u65e7\u7684<a class=\"xref\" href=\"/docs/18/dblink.html\" title=\"F.11.\u00a0dblink \u2014 \u8fde\u63a5\u5230\u5176\u4ed6 PostgreSQL \u6570\u636e\u5e93\">dblink</a>\u6a21\u5757\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u91cd\u53e0\u3002\u4f46 <code class=\"filename\">postgres_fdw</code> \u4e3a\u8bbf\u95ee\u8fdc\u7a0b\u8868\u63d0\u4f9b\u4e86\u66f4\u900f\u660e\u4e14\u7b26\u5408\u6807\u51c6\u7684\u8bed\u6cd5\uff0c\u5e76\u4e14\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u6027\u80fd\u66f4\u597d\u3002</p>\n<p lang=\"zh\">\u8981\u51c6\u5907\u901a\u8fc7 <code class=\"filename\">postgres_fdw</code> \u8fdb\u884c\u8fdc\u7a0b\u8bbf\u95ee\uff1a</p>\n<div class=\"orderedlist\">\n<ol class=\"orderedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5b89\u88c5 <code class=\"filename\">postgres_fdw</code> \u6269\u5c55\uff0c\u53ef\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-createextension.html\" title=\"CREATE EXTENSION\"><span class=\"refentrytitle\">CREATE EXTENSION</span></a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u5bf9\u8c61\uff0c\u7528\u6765\u8868\u793a\u6bcf\u4e2a\u8981\u8fde\u63a5\u7684\u8fdc\u7a0b\u6570\u636e\u5e93\u3002\u5c06\u9664 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u4e4b\u5916\u7684\u8fde\u63a5\u4fe1\u606f\u6307\u5b9a\u4e3a\u670d\u52a1\u5668\u5bf9\u8c61\u7684\u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u9700\u8981\u83b7\u51c6\u8bbf\u95ee\u5404\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u7684\u6570\u636e\u5e93\u7528\u6237\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u521b\u5efa\u7528\u6237\u6620\u5c04\u3002\u5c06\u8981\u4f7f\u7528\u7684\u8fdc\u7a0b\u7528\u6237\u540d\u548c\u5bc6\u7801\u6307\u5b9a\u4e3a\u7528\u6237\u6620\u5c04\u7684 <code class=\"literal\">user</code> \u548c <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u8981\u8bbf\u95ee\u7684\u8fdc\u7a0b\u8868\uff0c\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u6216<a class=\"xref\" href=\"/docs/18/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u521b\u5efa\u5916\u90e8\u8868\u3002\u5916\u90e8\u8868\u7684\u5217\u5fc5\u987b\u4e0e\u88ab\u5f15\u7528\u7684\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u5728\u5916\u90e8\u8868\u5bf9\u8c61\u7684\u9009\u9879\u4e2d\u6307\u5b9a\u6b63\u786e\u7684\u8fdc\u7a0b\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0e\u8fdc\u7a0b\u8868\u4e0d\u540c\u7684\u8868\u540d\u548c/\u6216\u5217\u540d\u3002</p>\n</li>\n</ol>\n</div>\n<p lang=\"zh\">\u73b0\u5728\uff0c\u53ea\u9700\u5bf9\u5916\u90e8\u8868\u6267\u884c <code class=\"command\">SELECT</code>\uff0c\u5373\u53ef\u8bbf\u95ee\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u4e2d\u5b58\u50a8\u7684\u6570\u636e\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code>\u3001<code class=\"command\">COPY</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4fee\u6539\u8fdc\u7a0b\u8868\u3002\uff08\u5f53\u7136\uff0c\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\u7684\u8fdc\u7a0b\u7528\u6237\u5fc5\u987b\u62e5\u6709\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u7684\u6743\u9650\u3002\uff09</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5728\u8bbf\u95ee\u6216\u4fee\u6539\u8fdc\u7a0b\u8868\u65f6\uff0c<code class=\"literal\">ONLY</code> \u9009\u9879\u5728 <code class=\"command\">SELECT</code>\u3001<code class=\"command\">UPDATE</code>\u3001<code class=\"command\">DELETE</code> \u6216 <code class=\"command\">TRUNCATE</code> \u4e2d\u4e0d\u8d77\u4f5c\u7528\u3002</p>\n<p lang=\"zh\">postgres_fdw \u76ee\u524d\u4e0d\u652f\u6301\u5e26 ON CONFLICT DO UPDATE \u5b50\u53e5\u7684 INSERT\u3002\u4e0d\u8fc7\uff0c\u652f\u6301 ON CONFLICT DO NOTHING\uff0c\u524d\u63d0\u662f\u4e0d\u6307\u5b9a\u552f\u4e00\u7d22\u5f15\u63a8\u65ad\u6761\u4ef6\u3002postgres_fdw \u8fd8\u652f\u6301\u5728\u5206\u533a\u8868\u4e0a\u6267\u884c UPDATE \u6240\u89e6\u53d1\u7684\u884c\u79fb\u52a8\uff0c\u4f46\u76ee\u524d\u4e0d\u652f\u6301\u4ee5\u4e0b\u60c5\u51b5\uff1a\u7528\u4e8e\u63a5\u6536\u79fb\u5165\u884c\u7684\u8fdc\u7aef\u5206\u533a\uff0c\u540c\u65f6\u4e5f\u662f\u540c\u4e00\u547d\u4ee4\u4e2d\u5176\u4ed6\u4f4d\u7f6e\u5c06\u8981\u66f4\u65b0\u7684 UPDATE \u76ee\u6807\u5206\u533a\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5c06\u5916\u90e8\u8868\u7684\u5217\u58f0\u660e\u4e3a\u4e0e\u88ab\u5f15\u7528\u8fdc\u7a0b\u8868\u7684\u5bf9\u5e94\u5217\u5177\u6709\u5b8c\u5168\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u5728\u9002\u7528\u65f6\u5177\u6709\u76f8\u540c\u7684\u6392\u5e8f\u89c4\u5219\u3002\u5c3d\u7ba1 <code class=\"filename\">postgres_fdw</code> \u76ee\u524d\u5728\u6309\u9700\u6267\u884c\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u65b9\u9762\u76f8\u5f53\u5bbd\u5bb9\uff0c\u4f46\u5f53\u7c7b\u578b\u6216\u6392\u5e8f\u89c4\u5219\u4e0d\u5339\u914d\u65f6\uff0c\u4ecd\u53ef\u80fd\u51fa\u73b0\u4ee4\u4eba\u610f\u5916\u7684\u8bed\u4e49\u5f02\u5e38\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5bf9\u67e5\u8be2\u6761\u4ef6\u7684\u89e3\u91ca\u53ef\u80fd\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u5916\u90e8\u8868\u7684\u58f0\u660e\u53ef\u4ee5\u6bd4\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u5c11\u4e00\u4e9b\u5217\uff0c\u6216\u8005\u4f7f\u7528\u4e0d\u540c\u7684\u5217\u987a\u5e8f\u3002\u4e0e\u8fdc\u7a0b\u8868\u5217\u7684\u5339\u914d\u662f\u6309\u540d\u79f0\u800c\u4e0d\u662f\u6309\u4f4d\u7f6e\u8fdb\u884c\u7684\u3002</p>\n<div class=\"sect2\" id=\"POSTGRES-FDW-OPTIONS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-OPTIONS\">F.38.1. postgres_fdw \u7684 FDW \u9009\u9879</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-CONNECTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.1.\u00a0\u8fde\u63a5\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u6570\u636e\u5305\u88c5\u5668\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528 <span class=\"application\">libpq</span> \u5728\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u63a5\u53d7\u7684\u76f8\u540c\u9009\u9879\uff0c\u8be6\u89c1<a class=\"xref\" href=\"/docs/18/libpq-connect.html#LIBPQ-PARAMKEYWORDS\" title=\"32.1.2.\u00a0\u53c2\u6570\u5173\u952e\u8bcd\">\u7b2c\u00a032.1.2\u00a0\u8282</a>\uff1b\u4f46\u4ee5\u4e0b\u9009\u9879\u4e0d\u5141\u8bb8\u4f7f\u7528\uff0c\u6216\u4f1a\u88ab\u7279\u6b8a\u5904\u7406\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">user</code>\u3001<code class=\"literal\">password</code> \u548c <code class=\"literal\">sslpassword</code>\uff08\u8bf7\u6539\u4e3a\u5728\u7528\u6237\u6620\u5c04\u4e2d\u6307\u5b9a\uff0c\u6216\u4f7f\u7528\u670d\u52a1\u6587\u4ef6\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">client_encoding</code>\uff08\u4f1a\u6839\u636e\u672c\u5730\u670d\u52a1\u5668\u7f16\u7801\u81ea\u52a8\u8bbe\u7f6e\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">application_name</code> \u53ef\u4ee5\u51fa\u73b0\u5728\u8fde\u63a5\u9009\u9879\u548c<a class=\"xref\" href=\"/docs/18/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u4e2d\u7684<span class=\"emphasis\"><em>\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c<code class=\"varname\">postgres_fdw.application_name</code> \u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002\u4e0e <span class=\"application\">libpq</span> \u4e0d\u540c\uff0c<code class=\"filename\">postgres_fdw</code> \u5141\u8bb8 <code class=\"varname\">application_name</code> \u5305\u542b<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/18/postgres-fdw.html#GUC-PGFDW-APPLICATION-NAME\">postgres_fdw.application_name</a>\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">fallback_application_name</code>\uff08\u59cb\u7ec8\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres_fdw</code>\uff09</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><code class=\"literal\">sslkey</code> \u548c <code class=\"literal\">sslcert</code> \u53ef\u4ee5\u51fa\u73b0\u5728<span class=\"emphasis\"><em>\u8fde\u63a5\u9009\u9879\u3001\u7528\u6237\u6620\u5c04\u4e2d\u7684\u4efb\u4e00\u5904\uff0c\u6216\u540c\u65f6\u51fa\u73b0\u5728\u4e8c\u8005\u4e2d</em></span>\u3002\u5982\u679c\u4e24\u8005\u90fd\u5b58\u5728\uff0c\u7528\u6237\u6620\u5c04\u8bbe\u7f6e\u4f1a\u8986\u76d6\u8fde\u63a5\u8bbe\u7f6e\u3002</p>\n</li>\n</ul>\n</div>\n<p lang=\"zh\">\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u521b\u5efa\u6216\u4fee\u6539\u5e26\u6709 <code class=\"literal\">sslcert</code> \u6216 <code class=\"literal\">sslkey</code> \u8bbe\u7f6e\u7684\u7528\u6237\u6620\u5c04\u3002</p>\n<p lang=\"zh\">\u975e\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5bc6\u7801\u8ba4\u8bc1\u6216\u4f7f\u7528 GSSAPI \u59d4\u6d3e\u51ed\u636e\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\uff0c\u56e0\u6b64\u5728\u9700\u8981\u5bc6\u7801\u8ba4\u8bc1\u7684\u573a\u666f\u4e2d\uff0c\u5e94\u4e3a\u5c5e\u4e8e\u975e\u8d85\u7ea7\u7528\u6237\u7684\u7528\u6237\u6620\u5c04\u6307\u5b9a <code class=\"literal\">password</code> \u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8d85\u7ea7\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u7528\u6237\u6620\u5c04\u9009\u9879 <code class=\"literal\">password_required 'false'</code> \u6309\u7528\u6237\u6620\u5c04\u5355\u72ec\u8986\u76d6\u6b64\u68c0\u67e5\uff0c\u4f8b\u5982\uff1a</p>\n<pre class=\"programlisting\">ALTER USER MAPPING FOR some_non_superuser SERVER loopback_nopw\nOPTIONS (ADD password_required 'false');\n</pre>\n<p lang=\"zh\">\u4e3a\u4e86\u9632\u6b62\u975e\u7279\u6743\u7528\u6237\u5229\u7528 postgres \u670d\u52a1\u5668\u6240\u8fd0\u884c\u7684 unix \u7528\u6237\u7684\u8ba4\u8bc1\u6743\u9650\u63d0\u5347\u5230\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u53ea\u6709\u8d85\u7ea7\u7528\u6237\u624d\u80fd\u5728\u7528\u6237\u6620\u5c04\u4e0a\u8bbe\u7f6e\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u5fc5\u987b\u8c28\u614e\uff0c\u786e\u4fdd\u8fd9\u4e0d\u4f1a\u4f7f\u6620\u5c04\u7528\u6237\u80fd\u591f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\u5230\u6620\u5c04\u7684\u6570\u636e\u5e93\uff0c\u53c2\u89c1 CVE-2007-3278 \u548c CVE-2007-6601\u3002\u4e0d\u8981\u4e3a public \u89d2\u8272\u8bbe\u7f6e password_required=false\u3002\u8bf7\u6ce8\u610f\uff0c\u6620\u5c04\u7528\u6237\u53ef\u80fd\u4f7f\u7528\u8fd0\u884c postgres \u670d\u52a1\u5668\u7684\u7cfb\u7edf\u7528\u6237\u7684 Unix \u4e3b\u76ee\u5f55\u4e2d\u7684\u4efb\u4f55\u5ba2\u6237\u7aef\u8bc1\u4e66\u3001.pgpass\u3001.pg_service.conf \u7b49\u3002\uff08\u67e5\u627e\u4e3b\u76ee\u5f55\u7684\u89c4\u5219\u8be6\u89c1\u7b2c 32.16 \u8282\u3002\uff09\u4ed6\u4eec\u4e5f\u53ef\u80fd\u5229\u7528 peer\u3001ident \u7b49\u8ba4\u8bc1\u65b9\u5f0f\u6388\u4e88\u7684\u4efb\u4f55\u4fe1\u4efb\u5173\u7cfb\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-OBJECT-NAME\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.2.\u00a0\u5bf9\u8c61\u540d\u79f0\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u9009\u9879\u53ef\u7528\u4e8e\u63a7\u5236\u53d1\u9001\u5230\u8fdc\u7a0b <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\u7684 SQL \u8bed\u53e5\u4e2d\u6240\u4f7f\u7528\u7684\u540d\u79f0\u3002\u5f53\u521b\u5efa\u5916\u90e8\u8868\u65f6\u6240\u7528\u7684\u540d\u79f0\u4e0e\u5176\u5e95\u5c42\u8fdc\u7a0b\u8868\u7684\u540d\u79f0\u4e0d\u540c\u65f6\uff0c\u5c31\u9700\u8981\u8fd9\u4e9b\u9009\u9879\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">schema_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u6a21\u5f0f\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u6240\u5728\u6a21\u5f0f\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">table_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5916\u90e8\u8868\u4f7f\u7528\u7684\u8868\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u5916\u90e8\u8868\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">column_name</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u7684\u67d0\u4e2a\u5217\u6307\u5b9a\uff0c\u7528\u4e8e\u7ed9\u51fa\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5217\u4f7f\u7528\u7684\u5217\u540d\u3002\u5982\u679c\u7701\u7565\uff0c\u5219\u4f7f\u7528\u8be5\u5217\u81ea\u8eab\u7684\u540d\u79f0\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-COST-ESTIMATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.3.\u00a0\u4ee3\u4ef7\u4f30\u7b97\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u901a\u8fc7\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u67e5\u8be2\u6765\u83b7\u53d6\u8fdc\u7a0b\u6570\u636e\uff0c\u56e0\u6b64\uff0c\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u626b\u63cf\u5916\u90e8\u8868\u7684\u4f30\u8ba1\u4ee3\u4ef7\u5e94\u5f53\u7b49\u4e8e\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5b8c\u6210\u8be5\u64cd\u4f5c\u7684\u4ee3\u4ef7\uff0c\u518d\u52a0\u4e0a\u4e00\u4e9b\u901a\u4fe1\u5f00\u9500\u3002\u83b7\u5f97\u8fd9\u79cd\u4f30\u7b97\u6700\u53ef\u9760\u7684\u65b9\u6cd5\uff0c\u662f\u5411\u8fdc\u7a0b\u670d\u52a1\u5668\u8be2\u95ee\uff0c\u518d\u628a\u5f00\u9500\u52a0\u4e0a\u53bb\uff1b\u4f46\u5bf9\u4e8e\u7b80\u5355\u67e5\u8be2\uff0c\u4e3a\u4e86\u53d6\u5f97\u4ee3\u4ef7\u4f30\u7b97\u800c\u989d\u5916\u53d1\u9001\u4e00\u6b21\u8fdc\u7a0b\u67e5\u8be2\uff0c\u53ef\u80fd\u5e76\u4e0d\u5212\u7b97\u3002\u56e0\u6b64 <code class=\"filename\">postgres_fdw</code> \u63d0\u4f9b\u4ee5\u4e0b\u9009\u9879\u6765\u63a7\u5236\u4ee3\u4ef7\u4f30\u7b97\u7684\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">use_remote_estimate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u7528\u4e8e\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u53d1\u51fa\u8fdc\u7a0b <code class=\"command\">EXPLAIN</code> \u547d\u4ee4\u6765\u83b7\u53d6\u4ee3\u4ef7\u4f30\u7b97\u3002\u5916\u90e8\u8868\u4e0a\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5176\u6240\u5c5e\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\uff0c\u4f46\u53ea\u5bf9\u8be5\u8868\u751f\u6548\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_startup_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u4f1a\u88ab\u52a0\u5230\u8be5\u670d\u52a1\u5668\u4e0a\u4efb\u4f55\u5916\u90e8\u8868\u626b\u63cf\u7684\u4f30\u8ba1\u542f\u52a8\u4ee3\u4ef7\u4e2d\u3002\u5b83\u8868\u793a\u5efa\u7acb\u8fde\u63a5\u3001\u5728\u8fdc\u7a0b\u7aef\u89e3\u6790\u5e76\u89c4\u5212\u67e5\u8be2\u7b49\u989d\u5916\u5f00\u9500\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fdw_tuple_cost</code> (<code class=\"type\">floating point</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u7528\u4f5c\u8be5\u670d\u52a1\u5668\u4e0a\u5916\u90e8\u8868\u626b\u63cf\u7684\u6bcf\u4e2a\u5143\u7ec4\u7684\u989d\u5916\u4ee3\u4ef7\u3002\u5b83\u8868\u793a\u670d\u52a1\u5668\u4e4b\u95f4\u6570\u636e\u4f20\u8f93\u7684\u989d\u5916\u5f00\u9500\u3002\u53ef\u4ee5\u589e\u5927\u6216\u51cf\u5c0f\u8be5\u6570\u503c\uff0c\u4ee5\u53cd\u6620\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u66f4\u9ad8\u6216\u66f4\u4f4e\u7684\u7f51\u7edc\u5ef6\u8fdf\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">0.2</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u771f\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4ece\u8fdc\u7a0b\u670d\u52a1\u5668\u83b7\u53d6\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u5f53 <code class=\"literal\">use_remote_estimate</code> \u4e3a\u5047\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u5728\u672c\u5730\u6267\u884c\u884c\u6570\u548c\u4ee3\u4ef7\u4f30\u7b97\uff0c\u7136\u540e\u518d\u5c06 <code class=\"literal\">fdw_startup_cost</code> \u548c <code class=\"literal\">fdw_tuple_cost</code> \u52a0\u5230\u4ee3\u4ef7\u4f30\u7b97\u4e2d\u3002\u9664\u975e\u6709\u8fdc\u7a0b\u8868\u7edf\u8ba1\u4fe1\u606f\u7684\u672c\u5730\u526f\u672c\u53ef\u7528\uff0c\u5426\u5219\u8fd9\u79cd\u672c\u5730\u4f30\u7b97\u4e0d\u592a\u53ef\u80fd\u975e\u5e38\u51c6\u786e\u3002\u66f4\u65b0\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u7684\u65b9\u6cd5\uff0c\u662f\u5728\u5916\u90e8\u8868\u4e0a\u8fd0\u884c<a class=\"xref\" href=\"/docs/18/sql-analyze.html\" title=\"ANALYZE\"><span class=\"refentrytitle\">ANALYZE</span></a>\uff1b\u8fd9\u6837\u4f1a\u626b\u63cf\u8fdc\u7a0b\u8868\uff0c\u7136\u540e\u50cf\u5bf9\u5f85\u672c\u5730\u8868\u4e00\u6837\u8ba1\u7b97\u5e76\u5b58\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u4fdd\u7559\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u8fdc\u7a0b\u8868\u6bcf\u6b21\u67e5\u8be2\u7684\u89c4\u5212\u5f00\u9500\uff1b\u4f46\u5982\u679c\u8fdc\u7a0b\u8868\u7ecf\u5e38\u66f4\u65b0\uff0c\u672c\u5730\u7edf\u8ba1\u4fe1\u606f\u5f88\u5feb\u5c31\u4f1a\u8fc7\u65f6\u3002</p>\n<p lang=\"zh\">\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd <code class=\"command\">ANALYZE</code> \u64cd\u4f5c\u7684\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">analyze_sampling</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ef\u5728\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u8bbe\u7f6e\uff0c\u51b3\u5b9a\u5916\u90e8\u8868 ANALYZE \u662f\u5728\u8fdc\u7a0b\u91c7\u6837\uff0c\u8fd8\u662f\u8bfb\u53d6\u5e76\u4f20\u8f93\u5168\u90e8\u6570\u636e\u540e\u5728\u672c\u5730\u91c7\u6837\u3002\u652f\u6301 off\u3001random\u3001system\u3001bernoulli \u548c auto\u3002off \u7981\u7528\u8fdc\u7a0b\u91c7\u6837\uff0c\u5168\u90e8\u6570\u636e\u4f1a\u4f20\u5230\u672c\u5730\u540e\u91c7\u6837\u3002random \u4f7f\u7528 random() \u51fd\u6570\u5728\u8fdc\u7a0b\u9009\u62e9\u8fd4\u56de\u884c\uff1bsystem \u548c bernoulli \u4f7f\u7528\u540c\u540d\u5185\u7f6e TABLESAMPLE \u65b9\u6cd5\u3002random \u9002\u7528\u4e8e\u6240\u6709\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\uff0cTABLESAMPLE \u4ec5\u4ece 9.5 \u8d77\u652f\u6301\u3002\u9ed8\u8ba4\u503c auto \u81ea\u52a8\u9009\u62e9\u63a8\u8350\u65b9\u6cd5\uff0c\u76ee\u524d\u6839\u636e\u8fdc\u7a0b\u670d\u52a1\u5668\u7248\u672c\u9009\u62e9 bernoulli \u6216 random\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-REMOTE-EXECUTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.4.\u00a0\u8fdc\u7a0b\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u53ea\u6709\u4f7f\u7528\u5185\u7f6e\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u624d\u4f1a\u88ab\u8003\u8651\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u3002\u6d89\u53ca\u975e\u5185\u7f6e\u51fd\u6570\u7684\u5b50\u53e5\u4f1a\u5728\u53d6\u56de\u884c\u4e4b\u540e\u5728\u672c\u5730\u68c0\u67e5\u3002\u5982\u679c\u8fd9\u4e9b\u51fd\u6570\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4e5f\u53ef\u7528\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fe1\u5176\u7ed3\u679c\u4e0e\u672c\u5730\u76f8\u540c\uff0c\u5219\u5c06\u8fd9\u7c7b <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u7aef\u6267\u884c\u53ef\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u6b64\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">extensions</code> (<code class=\"type\">string</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u662f\u4e00\u4e2a\u4ee5\u9017\u53f7\u5206\u9694\u7684 <span class=\"productname\">PostgreSQL</span> \u6269\u5c55\u540d\u79f0\u5217\u8868\uff0c\u8fd9\u4e9b\u6269\u5c55\u5fc5\u987b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5df2\u5b89\u88c5\u4e14\u7248\u672c\u517c\u5bb9\u3002\u5c5e\u4e8e\u5217\u51fa\u6269\u5c55\u4e14\u4e0d\u53ef\u53d8\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u7b26\uff0c\u5c06\u88ab\u89c6\u4e3a\u53ef\u4e0b\u63a8\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002</p>\n<p lang=\"zh\">\u4f7f\u7528 <code class=\"literal\">extensions</code> \u9009\u9879\u65f6\uff0c<span class=\"emphasis\"><em>\u786e\u4fdd\u6240\u5217\u6269\u5c55\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b58\u5728\u4e14\u884c\u4e3a\u5b8c\u5168\u4e00\u81f4\uff0c\u5c5e\u4e8e\u7528\u6237\u81ea\u5df1\u7684\u8d23\u4efb</em></span>\u3002\u5426\u5219\uff0c\u8fdc\u7a0b\u67e5\u8be2\u53ef\u80fd\u5931\u8d25\u6216\u51fa\u73b0\u610f\u5916\u884c\u4e3a\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">fetch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u53d6\u56de\u64cd\u4f5c\u4e2d\u5e94\u83b7\u53d6\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">100</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">batch_size</code> (<code class=\"type\">integer</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u6307\u5b9a <code class=\"filename\">postgres_fdw</code> \u5728\u6bcf\u6b21\u63d2\u5165\u64cd\u4f5c\u4e2d\u5e94\u63d2\u5165\u7684\u884c\u6570\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u4e0a\u6307\u5b9a\u7684\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">1</code>\u3002</p>\n<p lang=\"zh\">postgres_fdw \u6bcf\u6b21\u5b9e\u9645\u63d2\u5165\u7684\u884c\u6570\u53d6\u51b3\u4e8e\u5217\u6570\u4e0e\u6307\u5b9a\u7684 batch_size\u3002\u4e00\u4e2a\u6279\u6b21\u4f5c\u4e3a\u5355\u6761\u67e5\u8be2\u6267\u884c\uff0c\u800c postgres_fdw \u7528\u4e8e\u8fde\u63a5\u8fdc\u7aef\u670d\u52a1\u5668\u7684 libpq \u534f\u8bae\u5c06\u5355\u6761\u67e5\u8be2\u7684\u53c2\u6570\u6570\u91cf\u9650\u5236\u4e3a 65535\u3002\u5f53\u5217\u6570 * batch_size \u8d85\u8fc7\u6b64\u9650\u5236\u65f6\uff0c\u4f1a\u8c03\u6574 batch_size \u4ee5\u907f\u514d\u9519\u8bef\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u4e5f\u9002\u7528\u4e8e\u5411\u5916\u90e8\u8868\u590d\u5236\u6570\u636e\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u5b9e\u9645\u4e00\u6b21\u590d\u5236\u7684\u884c\u6570\u4f1a\u4ee5\u4e0e\u63d2\u5165\u573a\u666f\u7c7b\u4f3c\u7684\u65b9\u5f0f\u786e\u5b9a\uff0c\u4f46\u7531\u4e8e <code class=\"command\">COPY</code> \u547d\u4ee4\u7684\u5b9e\u73b0\u9650\u5236\uff0c\u6700\u591a\u53ea\u80fd\u4e3a 1000 \u884c\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-ASYNCHRONOUS-EXECUTION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.5.\u00a0\u5f02\u6b65\u6267\u884c\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u652f\u6301\u5f02\u6b65\u6267\u884c\uff0c\u5b83\u53ef\u4ee5\u5e76\u53d1\u8fd0\u884c <code class=\"structname\">Append</code> \u8282\u70b9\u7684\u591a\u4e2a\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u4e32\u884c\u8fd0\u884c\uff0c\u4ee5\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u63a7\u5236\u8fd9\u79cd\u6267\u884c\u65b9\u5f0f\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">async_capable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4e3a\u5f02\u6b65\u6267\u884c\u800c\u5e76\u53d1\u626b\u63cf\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n<p lang=\"zh\">\u4e3a\u4e86\u786e\u4fdd\u4ece\u5916\u90e8\u670d\u52a1\u5668\u8fd4\u56de\u7684\u6570\u636e\u4fdd\u6301\u4e00\u81f4\uff0c\u9664\u975e\u8fd9\u4e9b\u8868\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\uff0c\u5426\u5219\u5bf9\u4e8e\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\uff0c<code class=\"filename\">postgres_fdw</code> \u53ea\u4f1a\u6253\u5f00\u4e00\u4e2a\u8fde\u63a5\uff0c\u5e76\u4e14\u5373\u4f7f\u6d89\u53ca\u591a\u4e2a\u5916\u90e8\u8868\uff0c\u4e5f\u4f1a\u987a\u5e8f\u8fd0\u884c\u9488\u5bf9\u8be5\u670d\u52a1\u5668\u7684\u6240\u6709\u67e5\u8be2\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7981\u7528\u6b64\u9009\u9879\u4ee5\u6d88\u9664\u5f02\u6b65\u8fd0\u884c\u67e5\u8be2\u5e26\u6765\u7684\u5f00\u9500\uff0c\u53cd\u800c\u53ef\u80fd\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f <code class=\"structname\">Append</code> \u8282\u70b9\u540c\u65f6\u5305\u542b\u540c\u6b65\u6267\u884c\u548c\u5f02\u6b65\u6267\u884c\u7684\u5b50\u8ba1\u5212\uff0c\u4e5f\u4f1a\u5e94\u7528\u5f02\u6b65\u6267\u884c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u5f02\u6b65\u5b50\u8ba1\u5212\u662f\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u5904\u7406\u7684\uff0c\u5219\u5728\u81f3\u5c11\u6709\u4e00\u4e2a\u540c\u6b65\u5b50\u8ba1\u5212\u8fd4\u56de\u5168\u90e8\u5143\u7ec4\u4e4b\u524d\uff0c\u4e0d\u4f1a\u8fd4\u56de\u5f02\u6b65\u5b50\u8ba1\u5212\u7684\u5143\u7ec4\uff0c\u56e0\u4e3a\u540c\u6b65\u5b50\u8ba1\u5212\u6267\u884c\u65f6\uff0c\u5f02\u6b65\u5b50\u8ba1\u5212\u4ecd\u5728\u7b49\u5f85\u53d1\u9001\u7ed9\u5916\u90e8\u670d\u52a1\u5668\u7684\u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u3002\u8fd9\u79cd\u884c\u4e3a\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u4f1a\u6539\u53d8\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-TRANSACTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.6.\u00a0\u4e8b\u52a1\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5982\u201c\u4e8b\u52a1\u7ba1\u7406\u201d\u4e00\u8282\u6240\u8ff0\uff0c\u5728 <code class=\"filename\">postgres_fdw</code> \u4e2d\uff0c\u4e8b\u52a1\u662f\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4e8b\u52a1\u6765\u7ba1\u7406\u7684\uff0c\u5b50\u4e8b\u52a1\u5219\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u6765\u7ba1\u7406\u3002\u5f53\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u4e8b\u52a1\u3002\u5f53\u5f53\u524d\u672c\u5730\u5b50\u4e8b\u52a1\u6d89\u53ca\u591a\u4e2a\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e5f\u4f1a\u5728\u672c\u5730\u5b50\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\u4e32\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u8fd9\u4e9b\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u3002\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\u53ef\u4ee5\u6539\u5584\u6027\u80fd\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">parallel_commit</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u63d0\u4ea4\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">parallel_abort</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u5728\u672c\u5730\u4e8b\u52a1\u4e2d\u6b62\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5e76\u884c\u4e2d\u6b62\u8be5\u672c\u5730\u4e8b\u52a1\u4e2d\u5728\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u7684\u8fdc\u7a0b\u4e8b\u52a1\u3002\u6b64\u8bbe\u7f6e\u4e5f\u9002\u7528\u4e8e\u8fdc\u7a0b\u5b50\u4e8b\u52a1\u548c\u672c\u5730\u5b50\u4e8b\u52a1\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\uff0c\u4e0d\u80fd\u6309\u8868\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u5982\u679c\u542f\u7528\u4e86\u8fd9\u4e9b\u9009\u9879\u7684\u591a\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u53c2\u4e0e\u540c\u4e00\u4e2a\u672c\u5730\u4e8b\u52a1\uff0c\u90a3\u4e48\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fd9\u4e9b\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u591a\u4e2a\u8fdc\u7a0b\u4e8b\u52a1\u4f1a\u8de8\u670d\u52a1\u5668\u5e76\u884c\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002</p>\n<p lang=\"zh\">\u542f\u7528\u8fd9\u4e9b\u9009\u9879\u540e\uff0c\u82e5\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u6d89\u53ca\u5f88\u591a\u8fdc\u7a0b\u4e8b\u52a1\uff0c\u5219\u5728\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8be5\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u8d1f\u9762\u5f71\u54cd\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-UPDATABILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.7.\u00a0\u53ef\u66f4\u65b0\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u66f4\u65b0\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">updatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">INSERT</code>\u3001<code class=\"command\">UPDATE</code> \u548c <code class=\"command\">DELETE</code> \u547d\u4ee4\u4fee\u6539\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u66f4\u65b0\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c<code class=\"literal\">information_schema</code> \u89c6\u56fe\u4f1a\u6839\u636e\u8be5\u9009\u9879\u7684\u8bbe\u7f6e\uff0c\u5c06 <code class=\"filename\">postgres_fdw</code> \u5916\u90e8\u8868\u62a5\u544a\u4e3a\u53ef\u66f4\u65b0\uff08\u6216\u4e0d\u53ef\u66f4\u65b0\uff09\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u4efb\u4f55\u68c0\u67e5\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-TRUNCATABILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.8.\u00a0\u53ef\u622a\u65ad\u6027\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709\u4f7f\u7528 <code class=\"filename\">postgres_fdw</code> \u7684\u5916\u90e8\u8868\u90fd\u88ab\u5047\u5b9a\u4e3a\u53ef\u622a\u65ad\u3002\u8fd9\u4e00\u70b9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u9009\u9879\u8986\u76d6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">truncatable</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u5141\u8bb8\u4f7f\u7528 <code class=\"command\">TRUNCATE</code> \u547d\u4ee4\u622a\u65ad\u5916\u90e8\u8868\u3002\u5b83\u53ef\u4e3a\u5916\u90e8\u8868\u6216\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u8868\u7ea7\u9009\u9879\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u7ea7\u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n<p lang=\"zh\">\u5f53\u7136\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u4e0d\u53ef\u622a\u65ad\uff0c\u6700\u7ec8\u4ecd\u4f1a\u62a5\u9519\u3002\u8be5\u9009\u9879\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5141\u8bb8\u5728\u672c\u5730\u76f4\u63a5\u629b\u51fa\u9519\u8bef\uff0c\u800c\u65e0\u9700\u67e5\u8be2\u8fdc\u7a0b\u670d\u52a1\u5668\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-IMPORTING\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.9.\u00a0\u5bfc\u5165\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u5bfc\u5165\u5916\u90e8\u8868\u5b9a\u4e49\u3002\u8be5\u547d\u4ee4\u4f1a\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4ee5\u5339\u914d\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u8868\u6216\u89c6\u56fe\u3002\u5982\u679c\u8981\u5bfc\u5165\u7684\u8fdc\u7a0b\u8868\u5217\u4f7f\u7528\u7528\u6237\u5b9a\u4e49\u6570\u636e\u7c7b\u578b\uff0c\u5219\u672c\u5730\u670d\u52a1\u5668\u5fc5\u987b\u5b58\u5728\u540c\u540d\u4e14\u517c\u5bb9\u7684\u7c7b\u578b\u3002</p>\n<p lang=\"zh\">\u53ef\u4f7f\u7528\u4ee5\u4e0b\u9009\u9879\uff08\u5728 <code class=\"command\">IMPORT FOREIGN SCHEMA</code> \u547d\u4ee4\u4e2d\u7ed9\u51fa\uff09\u81ea\u5b9a\u4e49\u5bfc\u5165\u884c\u4e3a\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">import_collate</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">COLLATE</code> \u9009\u9879\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u6392\u5e8f\u89c4\u5219\u540d\u79f0\u96c6\u5408\u4e0e\u672c\u5730\u670d\u52a1\u5668\u4e0d\u540c\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5173\u95ed\u6b64\u9009\u9879\uff1b\u5982\u679c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fd0\u884c\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c24\u5176\u53ef\u80fd\u53d1\u751f\u3002\u4e0d\u8fc7\uff0c\u5982\u679c\u8fd9\u6837\u505a\uff0c\u5bfc\u5165\u8868\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5c31\u5b58\u5728\u4e0e\u5e95\u5c42\u6570\u636e\u4e0d\u5339\u914d\u7684\u4e25\u91cd\u98ce\u9669\uff0c\u4ece\u800c\u5bfc\u81f4\u67e5\u8be2\u884c\u4e3a\u5f02\u5e38\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u5c06\u6b64\u53c2\u6570\u8bbe\u7f6e\u4e3a <code class=\"literal\">true</code>\uff0c\u5bfc\u5165\u6392\u5e8f\u89c4\u5219\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u9ed8\u8ba4\u503c\u7684\u5217\u4ecd\u53ef\u80fd\u6709\u98ce\u9669\u3002\u8fd9\u4e9b\u5217\u4f1a\u4ee5 <code class=\"literal\">COLLATE \"default\"</code> \u5bfc\u5165\uff0c\u8fd9\u5c06\u9009\u62e9\u672c\u5730\u670d\u52a1\u5668\u7684\u9ed8\u8ba4\u6392\u5e8f\u89c4\u5219\uff0c\u800c\u5b83\u53ef\u80fd\u5e76\u4e0d\u76f8\u540c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_default</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">DEFAULT</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">false</code>\u3002\u5982\u679c\u542f\u7528\u6b64\u9009\u9879\uff0c\u9700\u8981\u8b66\u60d5\u90a3\u4e9b\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u8ba1\u7b97\u7ed3\u679c\u53ef\u80fd\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0d\u540c\u7684\u9ed8\u8ba4\u503c\uff1b<code class=\"function\">nextval()</code> \u662f\u5e38\u89c1\u7684\u95ee\u9898\u6765\u6e90\u3002\u5982\u679c\u5bfc\u5165\u7684\u9ed8\u8ba4\u503c\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_generated</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">GENERATED</code> \u8868\u8fbe\u5f0f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002\u5982\u679c\u5bfc\u5165\u7684\u751f\u6210\u8868\u8fbe\u5f0f\u4f7f\u7528\u4e86\u672c\u5730\u4e0d\u5b58\u5728\u7684\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u5219\u6574\u4e2a <code class=\"command\">IMPORT</code> \u5c06\u5931\u8d25\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">import_not_null</code> (<code class=\"type\">boolean</code>)</span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236\u4ece\u5916\u90e8\u670d\u52a1\u5668\u5bfc\u5165\u7684\u5916\u90e8\u8868\u5b9a\u4e49\u4e2d\u662f\u5426\u5305\u542b\u5217\u7684 <code class=\"literal\">NOT NULL</code> \u7ea6\u675f\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">true</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c\u9664 <code class=\"literal\">NOT NULL</code> \u4e4b\u5916\u7684\u7ea6\u675f\u6c38\u8fdc\u4e0d\u4f1a\u4ece\u8fdc\u7a0b\u8868\u5bfc\u5165\u3002\u867d\u7136 <span class=\"productname\">PostgreSQL</span> \u786e\u5b9e\u652f\u6301\u5728\u5916\u90e8\u8868\u4e0a\u5b9a\u4e49\u68c0\u67e5\u7ea6\u675f\uff0c\u4f46\u7531\u4e8e\u7ea6\u675f\u8868\u8fbe\u5f0f\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u53ef\u80fd\u6c42\u503c\u4e0d\u540c\uff0c\u7cfb\u7edf\u4e0d\u4f1a\u81ea\u52a8\u5bfc\u5165\u5b83\u4eec\u3002\u6b64\u7c7b\u884c\u4e3a\u4e0d\u4e00\u81f4\u7684\u68c0\u67e5\u7ea6\u675f\uff0c\u53ef\u80fd\u5bfc\u81f4\u67e5\u8be2\u4f18\u5316\u4e2d\u96be\u4ee5\u53d1\u73b0\u7684\u9519\u8bef\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5e0c\u671b\u5bfc\u5165\u68c0\u67e5\u7ea6\u675f\uff0c\u5fc5\u987b\u624b\u5de5\u5b8c\u6210\uff0c\u5e76\u5e94\u4ed4\u7ec6\u6838\u5b9e\u6bcf\u4e00\u4e2a\u7ea6\u675f\u7684\u8bed\u4e49\u3002\u6709\u5173\u5916\u90e8\u8868\u4e0a\u68c0\u67e5\u7ea6\u675f\u5904\u7406\u65b9\u5f0f\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/18/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u3002</p>\n<p lang=\"zh\">\u4f5c\u4e3a\u5176\u4ed6\u8868\u5206\u533a\u7684\u8868\u6216\u5916\u90e8\u8868\uff0c\u4ec5\u5728\u5b83\u4eec\u88ab\u660e\u786e\u5199\u5165 <code class=\"literal\">LIMIT TO</code> \u5b50\u53e5\u65f6\u624d\u4f1a\u5bfc\u5165\u3002\u5426\u5219\uff0c\u5b83\u4eec\u4f1a\u88ab\u81ea\u52a8\u6392\u9664\u5728<a class=\"xref\" href=\"/docs/18/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><span class=\"refentrytitle\">IMPORT FOREIGN SCHEMA</span></a>\u4e4b\u5916\u3002\u7531\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u901a\u8fc7\u4f5c\u4e3a\u5206\u533a\u5c42\u6b21\u6839\u7684\u5206\u533a\u8868\u8bbf\u95ee\uff0c\u56e0\u6b64\u53ea\u5bfc\u5165\u5206\u533a\u8868\u5373\u53ef\u8bbf\u95ee\u5168\u90e8\u6570\u636e\uff0c\u800c\u65e0\u9700\u521b\u5efa\u989d\u5916\u5bf9\u8c61\u3002</p>\n</div>\n<div class=\"sect3\" id=\"POSTGRES-FDW-OPTIONS-CONNECTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h4 class=\"title\" lang=\"zh\">\n<div>\n<div>\n<h4 class=\"title\">F.38.1.10.\u00a0\u8fde\u63a5\u7ba1\u7406\u9009\u9879 </h4>\n</div>\n</div>\n</h4>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"filename\">postgres_fdw</code> \u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u672c\u5730\u4f1a\u8bdd\u4e2d\u4fdd\u6301\u6253\u5f00\uff0c\u4ee5\u4fbf\u91cd\u590d\u4f7f\u7528\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt id=\"POSTGRES-FDW-OPTION-KEEP-CONNECTIONS\"><span class=\"term\"><code class=\"literal\">keep_connections</code> (<code class=\"type\">boolean</code>)</span> </dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u662f\u5426\u4fdd\u6301\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u4ee5\u4fbf\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u5b83\u4eec\u3002\u8be5\u9009\u9879\u53ea\u80fd\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6307\u5b9a\u3002\u9ed8\u8ba4\u503c\u4e3a <code class=\"literal\">on</code>\u3002\u5982\u679c\u8bbe\u7f6e\u4e3a <code class=\"literal\">off</code>\uff0c\u5219\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u6240\u6709\u8fde\u63a5\u90fd\u4f1a\u5728\u6bcf\u4e2a\u4e8b\u52a1\u7ed3\u675f\u65f6\u88ab\u4e22\u5f03\u3002</p>\n</p>\n</dd>\n<dt id=\"POSTGRES-FDW-OPTION-USE-SCRAM-PASSTHROUGH\"><span class=\"term\"><code class=\"literal\">use_scram_passthrough</code> (<code class=\"type\">boolean</code>)</span> </dt>\n<dd>\n<p lang=\"zh\">\u8be5\u9009\u9879\u63a7\u5236 <code class=\"filename\">postgres_fdw</code> \u5728\u8fde\u63a5\u5230\u5916\u90e8\u670d\u52a1\u5668\u65f6\u662f\u5426\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u3002\u8be5\u9009\u9879\u53ef\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u6307\u5b9a\u3002\u7528\u6237\u6620\u5c04\u7684\u8bbe\u7f6e\u4f1a\u8986\u76d6\u5916\u90e8\u670d\u52a1\u5668\u7684\u8bbe\u7f6e\u3002\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\u65f6\uff0c<code class=\"filename\">postgres_fdw</code> \u4f7f\u7528\u7ecf SCRAM Hash \u5904\u7406\u7684\u51ed\u636e\uff0c\u800c\u4e0d\u662f\u660e\u6587\u7528\u6237\u5bc6\u7801\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5728 PostgreSQL \u7cfb\u7edf\u76ee\u5f55\u4e2d\u5b58\u50a8\u660e\u6587\u7528\u6237\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u8981\u4f7f\u7528 SCRAM \u900f\u4f20\u8ba4\u8bc1\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8bf7\u6c42 <code class=\"literal\">scram-sha-256</code> \u8ba4\u8bc1\u65b9\u6cd5\uff1b\u5426\u5219\u8fde\u63a5\u5c06\u5931\u8d25\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8fdc\u7a0b\u670d\u52a1\u5668\u53ef\u4ee5\u662f\u4efb\u4f55\u652f\u6301 SCRAM \u7684 PostgreSQL \u7248\u672c\u3002\u5bf9 <code class=\"literal\">use_scram_passthrough</code> \u7684\u652f\u6301\u53ea\u8981\u6c42\u5ba2\u6237\u7aef\u4e00\u4fa7\uff08FDW \u4fa7\uff09\u5177\u5907\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u7528\u6237\u6620\u5c04\u5bc6\u7801\u4e0d\u4f1a\u88ab\u4f7f\u7528\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u8fd0\u884c <code class=\"filename\">postgres_fdw</code> \u7684\u670d\u52a1\u5668\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u5fc5\u987b\u9488\u5bf9\u7528\u4e8e\u5728 <code class=\"filename\">postgres_fdw</code> \u4e0a\u8ba4\u8bc1\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8be5\u7528\u6237\uff0c\u62e5\u6709\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\uff08\u52a0\u5bc6\u5bc6\u7801\uff09\uff08\u76d0\u503c\u548c\u8fed\u4ee3\u6b21\u6570\u90fd\u5fc5\u987b\u76f8\u540c\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5bc6\u7801\u76f8\u540c\uff09\u3002</p>\n<p>\u56e0\u800c\uff0c\u5982\u679c\u8981\u5efa\u7acb\u5230\u591a\u4e2a\u4e3b\u673a\u7684 FDW \u8fde\u63a5\uff0c\u4f8b\u5982\u7528\u4e8e\u5206\u533a\u5916\u90e8\u8868\u6216\u5206\u7247\uff0c\u5219\u6240\u6709\u4e3b\u673a\u90fd\u5fc5\u987b\u4e3a\u76f8\u5173\u7528\u6237\u4fdd\u5b58\u5b8c\u5168\u76f8\u540c\u7684 SCRAM \u51ed\u636e\u3002</p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p>\u53d1\u8d77\u5bf9\u5916 FDW \u8fde\u63a5\u7684 PostgreSQL \u5b9e\u4f8b\u4e2d\uff0c\u5f53\u524d\u4f1a\u8bdd\u7684\u4f20\u5165\u5ba2\u6237\u7aef\u8fde\u63a5\u4e5f\u5fc5\u987b\u4f7f\u7528 SCRAM \u8ba4\u8bc1\u3002\uff08\u56e0\u6b64\u79f0\u4e3a<span class=\"quote\">\u201c<span class=\"quote\">\u900f\u4f20</span>\u201d</span>\uff1aSCRAM \u5fc5\u987b\u5728\u8fdb\u5165\u548c\u79bb\u5f00\u65f6\u90fd\u88ab\u4f7f\u7528\u3002\uff09\u8fd9\u662f SCRAM \u534f\u8bae\u7684\u6280\u672f\u8981\u6c42\u3002</p>\n</li>\n</ul>\n</div>\n</dd>\n</dl>\n</div>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-FUNCTIONS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-FUNCTIONS\">F.38.2. \u51fd\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_get_connections( IN check_conn boolean DEFAULT false, OUT server_name text, OUT user_name text, OUT valid boolean, OUT used_in_xact boolean, OUT closed boolean, OUT remote_backend_pid int4) returns setof record</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u8fd4\u56de postgres_fdw \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u6240\u6709\u6253\u5f00\u8fde\u63a5\u7684\u4fe1\u606f\u3002\u5982\u679c\u6ca1\u6709\u6253\u5f00\u7684\u8fde\u63a5\uff0c\u5219\u4e0d\u8fd4\u56de\u4efb\u4f55\u8bb0\u5f55\u3002</p>\n<p lang=\"zh\">check_conn \u4e3a true \u65f6\uff0c\u6b64\u51fd\u6570\u4f1a\u68c0\u67e5\u6bcf\u4e2a\u8fde\u63a5\u7684\u72b6\u6001\uff0c\u5e76\u5728 closed \u5217\u4e2d\u663e\u793a\u7ed3\u679c\u3002\u6b64\u529f\u80fd\u76ee\u524d\u4ec5\u9002\u7528\u4e8e\u652f\u6301 poll \u7cfb\u7edf\u8c03\u7528\u7684\u975e\u6807\u51c6 POLLRDHUP \u6269\u5c55\u7684\u7cfb\u7edf\uff0c\u5305\u62ec Linux\u3002\u5b83\u53ef\u7528\u4e8e\u68c0\u67e5\u4e8b\u52a1\u4e2d\u4f7f\u7528\u7684\u5168\u90e8\u8fde\u63a5\u662f\u5426\u4ecd\u7136\u6253\u5f00\u3002\u53ea\u8981\u6709\u8fde\u63a5\u5173\u95ed\uff0c\u4e8b\u52a1\u5c31\u65e0\u6cd5\u6210\u529f\u63d0\u4ea4\uff0c\u56e0\u6b64\u68c0\u6d4b\u5230\u8fde\u63a5\u5173\u95ed\u65f6\u5e94\u5c3d\u5feb\u56de\u6eda\uff0c\u800c\u975e\u7ee7\u7eed\u6267\u884c\u81f3\u7ed3\u675f\u3002\u5982\u679c\u51fd\u6570\u62a5\u544a\u67d0\u4e2a\u8fde\u63a5\u7684 used_in_xact \u548c closed \u5747\u4e3a true\uff0c\u7528\u6237\u53ef\u4ee5\u7acb\u5373\u56de\u6eda\u4e8b\u52a1\u3002</p>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT * FROM postgres_fdw_get_connections(true);\n server_name | user_name | valid | used_in_xact | closed | remote_backend_pid\n-------------+-----------+-------+--------------+-----------------------------\n loopback1   | postgres  | t     | t            | f      |            1353340\n loopback2   | public    | t     | t            | f      |            1353120\n loopback3   |           | f     | t            | f      |            1353156\n</pre>\n<p lang=\"zh\">\u8f93\u51fa\u5217\u89c1<a class=\"xref\" href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-GET-CONNECTIONS-COLUMNS\" title=\"\u8868\u00a0F.28.\u00a0postgres_fdw_get_connections \u8f93\u51fa\u5217\">\u8868\u00a0F.28</a>\u3002</p>\n<div class=\"table\" id=\"POSTGRES-FDW-GET-CONNECTIONS-COLUMNS\">\n<p class=\"title\" lang=\"zh\"><strong>\u8868\u00a0F.28.\u00a0<code class=\"function\">postgres_fdw_get_connections</code> \u8f93\u51fa\u5217</strong></p>\n<div class=\"table-contents\">\n<table class=\"table\">\n<thead>\n<tr>\n<th lang=\"zh\">\u5217</th>\n<th lang=\"zh\">\u7c7b\u578b</th>\n<th lang=\"zh\">\u8bf4\u660e</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"structfield\">server_name</code></td>\n<td lang=\"zh\">\u6587\u672c</td>\n<td lang=\"zh\">\u6b64\u8fde\u63a5\u7684\u5916\u90e8\u670d\u52a1\u5668\u540d\u79f0\u3002\u5982\u679c\u670d\u52a1\u5668\u5df2\u88ab\u5220\u9664\u4f46\u8fde\u63a5\u4ecd\u4fdd\u6301\u6253\u5f00\uff08\u5373\u88ab\u6807\u8bb0\u4e3a\u65e0\u6548\uff09\uff0c\u5219\u8be5\u503c\u4e3a <code class=\"literal\">NULL</code>\u3002</td>\n</tr>\n<tr>\n<td><code class=\"structfield\">user_name</code></td>\n<td lang=\"zh\">\u6587\u672c</td>\n<td lang=\"zh\">\u6620\u5c04\u5230\u6b64\u8fde\u63a5\u6240\u5c5e\u5916\u90e8\u670d\u52a1\u5668\u7684\u672c\u5730\u7528\u6237\u540d\u79f0\uff1b\u5982\u679c\u4f7f\u7528\u7684\u662f public \u6620\u5c04\uff0c\u5219\u4e3a <code class=\"literal\">public</code>\u3002\u5982\u679c\u7528\u6237\u6620\u5c04\u5df2\u88ab\u5220\u9664\u4f46\u8fde\u63a5\u4ecd\u4fdd\u6301\u6253\u5f00\uff08\u5373\u88ab\u6807\u8bb0\u4e3a\u65e0\u6548\uff09\uff0c\u5219\u8be5\u503c\u4e3a <code class=\"literal\">NULL</code>\u3002</td>\n</tr>\n<tr>\n<td lang=\"zh\">\u6709\u6548</td>\n<td><code class=\"type\">boolean</code></td>\n<td lang=\"zh\">\u5982\u679c\u6b64\u8fde\u63a5\u65e0\u6548\uff0c\u5219\u4e3a\u5047\uff1b\u65e0\u6548\u610f\u5473\u7740\u5b83\u5728\u5f53\u524d\u4e8b\u52a1\u4e2d\u88ab\u4f7f\u7528\uff0c\u4f46\u5176\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u5df2\u88ab\u66f4\u6539\u6216\u5220\u9664\u3002\u65e0\u6548\u8fde\u63a5\u5c06\u5728\u4e8b\u52a1\u7ed3\u675f\u65f6\u5173\u95ed\u3002\u5426\u5219\u8fd4\u56de\u771f\u3002</td>\n</tr>\n<tr>\n<td><code class=\"structfield\">used_in_xact</code></td>\n<td><code class=\"type\">boolean</code></td>\n<td lang=\"zh\">\u5982\u679c\u6b64\u8fde\u63a5\u5728\u5f53\u524d\u4e8b\u52a1\u4e2d\u88ab\u4f7f\u7528\uff0c\u5219\u4e3a\u771f\u3002</td>\n</tr>\n<tr>\n<td lang=\"zh\">\u5c01\u95ed</td>\n<td><code class=\"type\">boolean</code></td>\n<td lang=\"zh\">\u6b64\u8fde\u63a5\u5df2\u5173\u95ed\u65f6\u4e3a true\uff0c\u5426\u5219\u4e3a false\u3002\u5982\u679c check_conn \u8bbe\u4e3a false\uff0c\u6216\u5f53\u524d\u5e73\u53f0\u4e0d\u652f\u6301\u8fde\u63a5\u72b6\u6001\u68c0\u67e5\uff0c\u5219\u8fd4\u56de NULL\u3002</td>\n</tr>\n<tr>\n<td><code class=\"structfield\">remote_backend_pid</code></td>\n<td><code class=\"type\">int4</code></td>\n<td lang=\"zh\">\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u5904\u7406\u6b64\u8fde\u63a5\u7684\u8fdc\u7a0b\u540e\u7aef\u8fdb\u7a0b ID\u3002\u5982\u679c\u8fdc\u7a0b\u540e\u7aef\u5df2\u7ec8\u6b62\u4e14\u8fde\u63a5\u5df2\u5173\u95ed\uff08<code class=\"literal\">closed</code> \u4e3a <code class=\"literal\">true</code>\uff09\uff0c\u6b64\u5904\u4ecd\u4f1a\u663e\u793a\u8be5\u5df2\u7ec8\u6b62\u540e\u7aef\u7684\u8fdb\u7a0b ID\u3002</td>\n</tr>\n</tbody>\n</table>\n</div>\n</div><br class=\"table-break\"/>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect(server_name text) returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u8bf7\u6ce8\u610f\uff0c\u4f7f\u7528\u4e0d\u540c\u7684\u7528\u6237\u6620\u5c04\u65f6\uff0c\u5bf9\u540c\u4e00\u670d\u52a1\u5668\u53ef\u80fd\u5b58\u5728\u591a\u4e2a\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u5982\u679c\u627e\u4e0d\u5230\u7ed9\u5b9a\u540d\u79f0\u7684\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u62a5\u544a\u9519\u8bef\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect('loopback1');\n postgres_fdw_disconnect\n-------------------------\n t\n</pre>\n</dd>\n<dt><span class=\"term\"><code class=\"function\">postgres_fdw_disconnect_all() returns boolean</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u51fd\u6570\u4f1a\u4e22\u5f03 <code class=\"filename\">postgres_fdw</code> \u4ece\u672c\u5730\u4f1a\u8bdd\u5230\u5916\u90e8\u670d\u52a1\u5668\u6240\u5efa\u7acb\u7684\u5168\u90e8\u5df2\u6253\u5f00\u8fde\u63a5\u3002\u5982\u679c\u8fd9\u4e9b\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u88ab\u4f7f\u7528\uff0c\u5219\u4e0d\u4f1a\u88ab\u4e22\u5f03\uff0c\u5e76\u4f1a\u62a5\u544a\u8b66\u544a\u6d88\u606f\u3002\u5982\u679c\u81f3\u5c11\u4e22\u5f03\u4e00\u4e2a\u8fde\u63a5\uff0c\u5219\u6b64\u51fd\u6570\u8fd4\u56de <code class=\"literal\">true</code>\uff0c\u5426\u5219\u8fd4\u56de <code class=\"literal\">false</code>\u3002\u6b64\u51fd\u6570\u7684\u7528\u6cd5\u793a\u4f8b\uff1a</p>\n<pre class=\"screen\">postgres=# SELECT postgres_fdw_disconnect_all();\n postgres_fdw_disconnect_all\n-----------------------------\n t\n</pre>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CONNECTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-CONNECTION-MANAGEMENT\">F.38.3. \u8fde\u63a5\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u5728\u9996\u6b21\u6267\u884c\u4f7f\u7528\u4e0e\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u5173\u8054\u7684\u5916\u90e8\u8868\u7684\u67e5\u8be2\u65f6\uff0c\u4f1a\u5efa\u7acb\u5230\u8be5\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8be5\u8fde\u63a5\u4f1a\u5728\u540c\u4e00\u4f1a\u8bdd\u4e2d\u4fdd\u7559\u5e76\u4f9b\u540e\u7eed\u67e5\u8be2\u91cd\u7528\u3002\u8fd9\u4e00\u884c\u4e3a\u53ef\u901a\u8fc7\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\u63a7\u5236\u3002\u5982\u679c\u4f7f\u7528\u591a\u4e2a\u7528\u6237\u6807\u8bc6\uff08\u7528\u6237\u6620\u5c04\uff09\u8bbf\u95ee\u8be5\u5916\u90e8\u670d\u52a1\u5668\uff0c\u5219\u4f1a\u4e3a\u6bcf\u4e2a\u7528\u6237\u6620\u5c04\u5efa\u7acb\u4e00\u4e2a\u8fde\u63a5\u3002</p>\n<p lang=\"zh\">\u5f53\u66f4\u6539\u5916\u90e8\u670d\u52a1\u5668\u6216\u7528\u6237\u6620\u5c04\u7684\u5b9a\u4e49\uff0c\u6216\u5c06\u5176\u5220\u9664\u65f6\uff0c\u76f8\u5173\u8fde\u63a5\u4f1a\u88ab\u5173\u95ed\u3002\u4f46\u8bf7\u6ce8\u610f\uff0c\u5982\u679c\u4efb\u4f55\u8fde\u63a5\u5728\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u4e2d\u6b63\u5728\u4f7f\u7528\uff0c\u5219\u4f1a\u4fdd\u7559\u5230\u4e8b\u52a1\u7ed3\u675f\u3002\u5173\u95ed\u7684\u8fde\u63a5\u4f1a\u5728\u540e\u7eed\u4f7f\u7528\u5916\u90e8\u8868\u7684\u67e5\u8be2\u9700\u8981\u5b83\u4eec\u65f6\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\">\u4e00\u65e6\u4e0e\u5916\u90e8\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5b83\u4f1a\u4e00\u76f4\u4fdd\u7559\u5230\u672c\u5730\u4f1a\u8bdd\u6216\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u9000\u51fa\u3002\u8981\u663e\u5f0f\u65ad\u5f00\u8fde\u63a5\uff0c\u53ef\u4ee5\u7981\u7528\u5916\u90e8\u670d\u52a1\u5668\u7684 <code class=\"literal\">keep_connections</code> \u9009\u9879\uff0c\u6216\u4f7f\u7528 <code class=\"function\">postgres_fdw_disconnect</code> \u548c <code class=\"function\">postgres_fdw_disconnect_all</code> \u51fd\u6570\u3002\u4f8b\u5982\uff0c\u8fd9\u4e9b\u51fd\u6570\u53ef\u7528\u4e8e\u5173\u95ed\u4e0d\u518d\u9700\u8981\u7684\u8fde\u63a5\uff0c\u4ece\u800c\u91ca\u653e\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u8fde\u63a5\u8d44\u6e90\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-TRANSACTION-MANAGEMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-TRANSACTION-MANAGEMENT\">F.38.4. \u4e8b\u52a1\u7ba1\u7406</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728\u5f15\u7528\u67d0\u4e2a\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u4efb\u610f\u8fdc\u7a0b\u8868\u7684\u67e5\u8be2\u671f\u95f4\uff0c\u5982\u679c\u5f53\u524d\u672c\u5730\u4e8b\u52a1\u5c1a\u672a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u5bf9\u5e94\u7684\u4e8b\u52a1\uff0c<code class=\"filename\">postgres_fdw</code> \u5c31\u4f1a\u5728\u8be5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u4e00\u4e2a\u4e8b\u52a1\u3002\u672c\u5730\u4e8b\u52a1\u63d0\u4ea4\u6216\u4e2d\u6b62\u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4e5f\u4f1a\u63d0\u4ea4\u6216\u4e2d\u6b62\u3002\u4fdd\u5b58\u70b9\u4e5f\u4f1a\u901a\u8fc7\u521b\u5efa\u5bf9\u5e94\u7684\u8fdc\u7a0b\u4fdd\u5b58\u70b9\u8fdb\u884c\u7c7b\u4f3c\u7ba1\u7406\u3002</p>\n<p lang=\"zh\">\u5f53\u672c\u5730\u4e8b\u52a1\u7684\u9694\u79bb\u7ea7\u522b\u4e3a <code class=\"literal\">SERIALIZABLE</code> \u65f6\uff0c\u8fdc\u7a0b\u4e8b\u52a1\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code>\uff1b\u5426\u5219\u4f7f\u7528 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u3002\u8fd9\u4e00\u9009\u62e9\u786e\u4fdd\u5982\u679c\u4e00\u4e2a\u67e5\u8be2\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u591a\u6b21\u8868\u626b\u63cf\uff0c\u6240\u6709\u626b\u63cf\u90fd\u80fd\u83b7\u5f97\u5feb\u7167\u4e00\u81f4\u7684\u7ed3\u679c\u3002\u5176\u7ed3\u679c\u662f\uff0c\u540c\u4e00\u4e8b\u52a1\u4e2d\u7684\u540e\u7eed\u67e5\u8be2\u4f1a\u770b\u5230\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u540c\u6570\u636e\uff0c\u5373\u4f7f\u8fdc\u7a0b\u670d\u52a1\u5668\u7531\u4e8e\u5176\u4ed6\u6d3b\u52a8\u6b63\u5728\u53d1\u751f\u5e76\u53d1\u66f4\u65b0\u3002\u5bf9\u4e8e\u4f7f\u7528 <code class=\"literal\">SERIALIZABLE</code> \u6216 <code class=\"literal\">REPEATABLE READ</code> \u9694\u79bb\u7ea7\u522b\u7684\u672c\u5730\u4e8b\u52a1\uff0c\u8fd9\u79cd\u884c\u4e3a\u672c\u6765\u5c31\u7b26\u5408\u9884\u671f\uff1b\u4f46\u5bf9\u4e8e <code class=\"literal\">READ COMMITTED</code> \u672c\u5730\u4e8b\u52a1\uff0c\u5219\u53ef\u80fd\u4ee4\u4eba\u610f\u5916\u3002\u672a\u6765\u7684 <span class=\"productname\">PostgreSQL</span> \u7248\u672c\u53ef\u80fd\u4f1a\u4fee\u6539\u8fd9\u4e9b\u89c4\u5219\u3002</p>\n<p lang=\"zh\">\u8bf7\u6ce8\u610f\uff0c<code class=\"filename\">postgres_fdw</code> \u5f53\u524d\u4e0d\u652f\u6301\u4e3a\u4e24\u9636\u6bb5\u63d0\u4ea4\u9884\u5907\u8fdc\u7a0b\u4e8b\u52a1\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-OPTIMIZATION\">F.38.5. \u8fdc\u7a0b\u67e5\u8be2\u4f18\u5316</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u4f1a\u5c3d\u529b\u4f18\u5316\u8fdc\u7a0b\u67e5\u8be2\uff0c\u4ee5\u51cf\u5c11\u4ece\u5916\u90e8\u670d\u52a1\u5668\u4f20\u8f93\u7684\u6570\u636e\u91cf\u3002\u8fd9\u662f\u901a\u8fc7\u5c06\u67e5\u8be2\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\uff0c\u4ee5\u53ca\u4e0d\u83b7\u53d6\u5f53\u524d\u67e5\u8be2\u4e0d\u9700\u8981\u7684\u8868\u5217\u6765\u5b9e\u73b0\u7684\u3002\u4e3a\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u53ea\u6709\u5f53 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u4f7f\u7528\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\u3001\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u90fd\u662f\u5185\u7f6e\u7684\uff0c\u6216\u5c5e\u4e8e\u5916\u90e8\u670d\u52a1\u5668 <code class=\"literal\">extensions</code> \u9009\u9879\u5217\u51fa\u7684\u6269\u5c55\u65f6\uff0c\u624d\u4f1a\u5c06\u8be5\u5b50\u53e5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u8fd9\u7c7b\u5b50\u53e5\u4e2d\u7684\u64cd\u4f5c\u7b26\u548c\u51fd\u6570\u8fd8\u5fc5\u987b\u662f <code class=\"literal\">IMMUTABLE</code>\u3002\u5bf9\u4e8e <code class=\"command\">UPDATE</code> \u6216 <code class=\"command\">DELETE</code> \u67e5\u8be2\uff0c<code class=\"filename\">postgres_fdw</code> \u4f1a\u5728\u67e5\u8be2\u4e2d\u4e0d\u5b58\u5728\u65e0\u6cd5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u7684 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u3001\u6ca1\u6709\u672c\u5730\u8fde\u63a5\u64cd\u4f5c\u3001\u76ee\u6807\u8868\u4e0a\u6ca1\u6709\u884c\u7ea7\u672c\u5730 <code class=\"literal\">BEFORE</code> \u6216 <code class=\"literal\">AFTER</code> \u89e6\u53d1\u5668\u6216\u5b58\u50a8\u751f\u6210\u5217\uff0c\u4e5f\u6ca1\u6709\u6765\u81ea\u7236\u89c6\u56fe\u7684 <code class=\"literal\">CHECK OPTION</code> \u7ea6\u675f\u65f6\uff0c\u5c1d\u8bd5\u5c06\u6574\u4e2a\u67e5\u8be2\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4ee5\u4f18\u5316\u6267\u884c\u3002\u5728 <code class=\"command\">UPDATE</code> \u4e2d\uff0c\u4e3a\u4e86\u964d\u4f4e\u67e5\u8be2\u88ab\u9519\u8bef\u6267\u884c\u7684\u98ce\u9669\uff0c\u8d4b\u7ed9\u76ee\u6807\u5217\u7684\u8868\u8fbe\u5f0f\u4e5f\u5fc5\u987b\u53ea\u4f7f\u7528\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u3001<code class=\"literal\">IMMUTABLE</code> \u64cd\u4f5c\u7b26\u6216 <code class=\"literal\">IMMUTABLE</code> \u51fd\u6570\u3002</p>\n<p lang=\"zh\">\u5f53 <code class=\"filename\">postgres_fdw</code> \u9047\u5230\u540c\u4e00\u5916\u90e8\u670d\u52a1\u5668\u4e0a\u7684\u5916\u90e8\u8868\u4e4b\u95f4\u7684\u8fde\u63a5\u65f6\uff0c\u9664\u975e\u7531\u4e8e\u67d0\u79cd\u539f\u56e0\u5b83\u8ba4\u4e3a\u5206\u522b\u4ece\u5404\u8868\u53d6\u56de\u884c\u4f1a\u66f4\u9ad8\u6548\uff0c\u6216\u8005\u76f8\u5173\u8868\u5f15\u7528\u53d7\u4e0d\u540c\u7528\u6237\u6620\u5c04\u7ea6\u675f\uff0c\u5426\u5219\u4f1a\u5c06\u6574\u4e2a\u8fde\u63a5\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u5728\u53d1\u9001 <code class=\"literal\">JOIN</code> \u5b50\u53e5\u65f6\uff0c\u5b83\u4e5f\u4f1a\u91c7\u53d6\u4e0e\u524d\u8ff0 <code class=\"literal\">WHERE</code> \u5b50\u53e5\u76f8\u540c\u7684\u9884\u9632\u63aa\u65bd\u3002</p>\n<p lang=\"zh\">\u53ef\u4ee5\u4f7f\u7528 <code class=\"command\">EXPLAIN VERBOSE</code> \u67e5\u770b\u5b9e\u9645\u53d1\u9001\u7ed9\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u7684\u67e5\u8be2\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-REMOTE-QUERY-EXECUTION-ENVIRONMENT\">F.38.6. \u8fdc\u7a0b\u67e5\u8be2\u6267\u884c\u73af\u5883</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u5728 <code class=\"filename\">postgres_fdw</code> \u6253\u5f00\u7684\u8fdc\u7a0b\u4f1a\u8bdd\u4e2d\uff0c<a class=\"xref\" href=\"/docs/18/runtime-config-client.html#GUC-SEARCH-PATH\">search_path</a>\u53c2\u6570\u4f1a\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u5305\u542b <code class=\"literal\">pg_catalog</code>\uff0c\u8fd9\u6837\u65e0\u9700\u6a21\u5f0f\u9650\u5b9a\u5c31\u53ea\u80fd\u770b\u5230\u5185\u7f6e\u5bf9\u8c61\u3002\u8fd9\u5bf9 <code class=\"filename\">postgres_fdw</code> \u81ea\u8eab\u751f\u6210\u7684\u67e5\u8be2\u4e0d\u662f\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u603b\u662f\u63d0\u4f9b\u8fd9\u79cd\u9650\u5b9a\u3002\u7136\u800c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bf9\u90a3\u4e9b\u901a\u8fc7\u8fdc\u7a0b\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u6216\u89c4\u5219\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u7684\u51fd\u6570\u5e26\u6765\u98ce\u9669\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fdc\u7a0b\u8868\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u89c6\u56fe\uff0c\u5219\u8be5\u89c6\u56fe\u4e2d\u4f7f\u7528\u7684\u4efb\u4f55\u51fd\u6570\u90fd\u4f1a\u5728\u53d7\u9650\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u6267\u884c\u3002\u5efa\u8bae\u5728\u8fd9\u7c7b\u51fd\u6570\u4e2d\u5bf9\u6240\u6709\u540d\u79f0\u90fd\u5199\u6210\u5e26\u6a21\u5f0f\u9650\u5b9a\u7684\u5f62\u5f0f\uff0c\u6216\u8005\u4e3a\u8fd9\u7c7b\u51fd\u6570\u9644\u52a0 <code class=\"literal\">SET search_path</code> \u9009\u9879\uff08\u89c1<a class=\"xref\" href=\"/docs/18/sql-createfunction.html\" title=\"CREATE FUNCTION\"><span class=\"refentrytitle\">CREATE FUNCTION</span></a>\uff09\uff0c\u4ee5\u5efa\u7acb\u5176\u9884\u671f\u7684\u641c\u7d22\u8def\u5f84\u73af\u5883\u3002</p>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u8fd8\u4f1a\u4e3a\u8fdc\u7a0b\u4f1a\u8bdd\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff1a</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist compact\">\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/18/runtime-config-client.html#GUC-TIMEZONE\">TimeZone</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">UTC</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/18/runtime-config-client.html#GUC-DATESTYLE\">DateStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">ISO</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\n<p><a class=\"xref\" href=\"/docs/18/runtime-config-client.html#GUC-INTERVALSTYLE\">IntervalStyle</a>\u88ab\u8bbe\u7f6e\u4e3a <code class=\"literal\">postgres</code></p>\n</li>\n<li class=\"listitem\" lang=\"zh\">\u5bf9\u4e8e 9.0 \u53ca\u66f4\u65b0\u7248\u672c\u7684\u8fdc\u7aef\u670d\u52a1\u5668\uff0cextra_float_digits \u8bbe\u4e3a 3\uff1b\u66f4\u65e9\u7248\u672c\u5219\u8bbe\u4e3a 2\u3002</li>\n</ul>\n</div>\n<p lang=\"zh\">\u8fd9\u4e9b\u8bbe\u7f6e\u901a\u5e38\u4e0d\u50cf <code class=\"varname\">search_path</code> \u90a3\u6837\u5bb9\u6613\u51fa\u95ee\u9898\uff0c\u4f46\u5982\u679c\u6709\u9700\u8981\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u51fd\u6570\u7684 <code class=\"literal\">SET</code> \u9009\u9879\u5904\u7406\u3002</p>\n<p lang=\"zh\"><span class=\"emphasis\"><em>\u4e0d</em></span>\u5efa\u8bae\u901a\u8fc7\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u7684\u4f1a\u8bdd\u7ea7\u8bbe\u7f6e\u6765\u8986\u76d6\u8fd9\u79cd\u884c\u4e3a\uff1b\u8fd9\u5f88\u53ef\u80fd\u5bfc\u81f4 <code class=\"filename\">postgres_fdw</code> \u5de5\u4f5c\u5f02\u5e38\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-CROSS-VERSION-COMPATIBILITY\">F.38.7. \u8de8\u7248\u672c\u517c\u5bb9\u6027</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">postgres_fdw \u53ef\u7528\u4e8e\u8bbf\u95ee PostgreSQL 8.3 \u53ca\u66f4\u65b0\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u53ea\u8bfb\u80fd\u529b\u53ef\u8ffd\u6eaf\u5230 8.1\u3002</p>\n<p lang=\"zh\">\u4e00\u4e2a\u9650\u5236\u662f\uff0cpostgres_fdw \u901a\u5e38\u8ba4\u4e3a\u5916\u90e8\u8868 WHERE \u5b50\u53e5\u4e2d\u7684\u4e0d\u53ef\u53d8\u5185\u7f6e\u51fd\u6570\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u5b89\u5168\u5730\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u6240\u7528\u7248\u672c\u4e4b\u540e\u624d\u52a0\u5165\u7684\u5185\u7f6e\u51fd\u6570\u4e5f\u53ef\u80fd\u88ab\u53d1\u9001\u8fc7\u53bb\uff0c\u5bfc\u81f4\u201cfunction does not exist\u201d\u6216\u7c7b\u4f3c\u9519\u8bef\u3002\u53ef\u4ee5\u901a\u8fc7\u6539\u5199\u67e5\u8be2\u7ed5\u8fc7\u6b64\u95ee\u9898\uff0c\u4f8b\u5982\u5c06\u5916\u90e8\u8868\u5f15\u7528\u653e\u5165\u5e26 OFFSET 0 \u7684\u5b50 SELECT \u4e2d\uff0c\u4ee5\u6b64\u5f62\u6210\u4f18\u5316\u5c4f\u969c\uff0c\u5e76\u5c06\u6709\u95ee\u9898\u7684\u51fd\u6570\u6216\u8fd0\u7b97\u7b26\u653e\u5728\u5b50 SELECT \u5916\u90e8\u3002</p>\n<p lang=\"zh\">\u53e6\u4e00\u4e2a\u9650\u5236\u662f\uff0c\u5728\u5916\u90e8\u8868\u4e0a\u6267\u884c <code class=\"command\">INSERT</code> \u8bed\u53e5\u5e76\u5e26\u6709 <code class=\"literal\">ON CONFLICT DO NOTHING</code> \u5b50\u53e5\u65f6\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u5fc5\u987b\u8fd0\u884c <span class=\"productname\">PostgreSQL</span> 9.5 \u6216\u66f4\u9ad8\u7248\u672c\uff0c\u56e0\u4e3a\u66f4\u65e9\u7248\u672c\u4e0d\u652f\u6301\u6b64\u7279\u6027\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-WAIT-EVENTS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-WAIT-EVENTS\">F.38.8. \u7b49\u5f85\u4e8b\u4ef6</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\"><code class=\"filename\">postgres_fdw</code> \u53ef\u4ee5\u5728\u7b49\u5f85\u4e8b\u4ef6\u7c7b\u578b <code class=\"literal\">Extension</code> \u4e0b\u62a5\u544a\u4ee5\u4e0b\u7b49\u5f85\u4e8b\u4ef6\uff1a</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwCleanupResult</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u4e8b\u52a1\u4e2d\u6b62\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwConnect</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"literal\">PostgresFdwGetResult</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7b49\u5f85\u63a5\u6536\u6765\u81ea\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u67e5\u8be2\u7ed3\u679c\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-CONFIGURATION-PARAMETERS\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-CONFIGURATION-PARAMETERS\">F.38.9. \u914d\u7f6e\u53c2\u6570</a></span></h3>\n</div>\n</div>\n</div>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt id=\"GUC-PGFDW-APPLICATION-NAME\"><span class=\"term\"><code class=\"varname\">postgres_fdw.application_name</code> (<code class=\"type\">string</code>) </span> </dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a\u7528\u4e8e<a class=\"xref\" href=\"/docs/18/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u914d\u7f6e\u53c2\u6570\u7684\u503c\uff0c\u8be5\u503c\u4f1a\u5728 <code class=\"filename\">postgres_fdw</code> \u5efa\u7acb\u5230\u5916\u90e8\u670d\u52a1\u5668\u7684\u8fde\u63a5\u65f6\u4f7f\u7528\u3002\u8fd9\u4f1a\u8986\u76d6\u670d\u52a1\u5668\u5bf9\u8c61\u7684 <code class=\"varname\">application_name</code> \u9009\u9879\u3002\u8bf7\u6ce8\u610f\uff0c\u4fee\u6539\u6b64\u53c2\u6570\u4e0d\u4f1a\u5f71\u54cd\u4efb\u4f55\u73b0\u6709\u8fde\u63a5\uff0c\u9664\u975e\u8fd9\u4e9b\u8fde\u63a5\u91cd\u65b0\u5efa\u7acb\u3002</p>\n<p lang=\"zh\"><code class=\"varname\">postgres_fdw.application_name</code> \u53ef\u4ee5\u662f\u4efb\u610f\u957f\u5ea6\u7684\u4efb\u610f\u5b57\u7b26\u4e32\uff0c\u751a\u81f3\u53ef\u4ee5\u5305\u542b\u975e ASCII \u5b57\u7b26\u3002\u4e0d\u8fc7\uff0c\u5f53\u5b83\u88ab\u4f20\u9012\u5e76\u4f5c\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u4e2d\u7684 <code class=\"varname\">application_name</code> \u4f7f\u7528\u65f6\uff0c\u8bf7\u6ce8\u610f\u5b83\u4f1a\u88ab\u622a\u65ad\u5230\u5c11\u4e8e <code class=\"symbol\">NAMEDATALEN</code> \u4e2a\u5b57\u7b26\u3002\u9664\u53ef\u6253\u5370 ASCII \u5b57\u7b26\u4ee5\u5916\u7684\u6240\u6709\u5b57\u7b26\u90fd\u4f1a\u88ab\u66ff\u6362\u4e3a<a class=\"link\" href=\"/docs/18/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE\" title=\"4.1.2.2.\u00a0C\u98ce\u683c\u8f6c\u4e49\u7684\u5b57\u7b26\u4e32\u5e38\u91cf\">C \u98ce\u683c\u7684\u5341\u516d\u8fdb\u5236\u8f6c\u4e49</a>\u3002\u6709\u5173\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/18/runtime-config-logging.html#GUC-APPLICATION-NAME\">application_name</a>\u3002</p>\n<p lang=\"zh\"><code class=\"literal\">%</code> \u5b57\u7b26\u8868\u793a<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u4e49\u5e8f\u5217</span>\u201d</span>\u7684\u5f00\u59cb\uff0c\u5e76\u4f1a\u6309\u4e0b\u8ff0\u65b9\u5f0f\u66ff\u6362\u4e3a\u72b6\u6001\u4fe1\u606f\u3002\u672a\u8bc6\u522b\u7684\u8f6c\u4e49\u4f1a\u88ab\u5ffd\u7565\u3002\u5176\u4ed6\u5b57\u7b26\u4f1a\u539f\u6837\u590d\u5236\u5230\u5e94\u7528\u540d\u4e2d\u3002\u8bf7\u6ce8\u610f\uff0c\u4e0d\u5141\u8bb8\u5728 <code class=\"literal\">%</code> \u4e0e\u9009\u9879\u5b57\u6bcd\u4e4b\u95f4\u6307\u5b9a\u6b63\u8d1f\u53f7\u6216\u6570\u5b57\u5b57\u9762\u91cf\u6765\u8fdb\u884c\u5bf9\u9f50\u548c\u586b\u5145\u3002</p>\n<div class=\"informaltable\">\n<table class=\"informaltable\">\n<thead>\n<tr>\n<th lang=\"zh\">\u8f6c\u4e49\u5e8f\u5217</th>\n<th lang=\"zh\">\u6548\u679c</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"literal\">%a</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u5e94\u7528\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%c</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u4f1a\u8bdd ID\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/18/runtime-config-logging.html#GUC-LOG-LINE-PREFIX\">log_line_prefix</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%C</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u96c6\u7c07\u540d\uff08\u7ec6\u8282\u89c1<a class=\"xref\" href=\"/docs/18/runtime-config-logging.html#GUC-CLUSTER-NAME\">cluster_name</a>\uff09</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%u</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u7528\u6237\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%d</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u5e93\u540d</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%p</code></td>\n<td lang=\"zh\">\u672c\u5730\u670d\u52a1\u5668\u4e0a\u540e\u7aef\u7684\u8fdb\u7a0b ID</td>\n</tr>\n<tr>\n<td><code class=\"literal\">%%</code></td>\n<td lang=\"zh\">\u5b57\u9762\u5b57\u7b26 %</td>\n</tr>\n</tbody>\n</table>\n</div>\n<p lang=\"zh\">\u4f8b\u5982\uff0c\u5047\u8bbe\u7528\u6237 local_user \u4ece\u6570\u636e\u5e93 local_db \u4ee5 foreign_user \u8eab\u4efd\u8fde\u63a5\u5230 foreign_db\uff0c\u5219\u8bbe\u7f6e 'db=%d, user=%u' \u4f1a\u66ff\u6362\u4e3a 'db=local_db, user=local_user'\u3002</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-EXAMPLES\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-EXAMPLES\">F.38.10. \u793a\u4f8b</a></span></h3>\n</div>\n</div>\n</div>\n<p lang=\"zh\">\u4e0b\u9762\u662f\u4f7f\u7528 <code class=\"literal\">postgres_fdw</code> \u521b\u5efa\u5916\u90e8\u8868\u7684\u4e00\u4e2a\u793a\u4f8b\u3002\u9996\u5148\u5b89\u88c5\u6269\u5c55\uff1a</p>\n<pre class=\"programlisting\">CREATE EXTENSION postgres_fdw;\n</pre>\n<p lang=\"zh\">\u7136\u540e\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-createserver.html\" title=\"CREATE SERVER\"><span class=\"refentrytitle\">CREATE SERVER</span></a>\u521b\u5efa\u5916\u90e8\u670d\u52a1\u5668\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8fde\u63a5\u5230\u4e00\u53f0 <span class=\"productname\">PostgreSQL</span> \u670d\u52a1\u5668\uff0c\u5b83\u8fd0\u884c\u5728\u4e3b\u673a <code class=\"literal\">192.83.123.89</code> \u4e0a\u5e76\u76d1\u542c <code class=\"literal\">5432</code> \u7aef\u53e3\u3002\u8981\u8fde\u63a5\u7684\u6570\u636e\u5e93\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"literal\">foreign_db</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE SERVER foreign_server\n        FOREIGN DATA WRAPPER postgres_fdw\n        OPTIONS (host '192.83.123.89', port '5432', dbname 'foreign_db');\n</pre>\n<p lang=\"zh\">\u8fd8\u9700\u8981\u7528<a class=\"xref\" href=\"/docs/18/sql-createusermapping.html\" title=\"CREATE USER MAPPING\"><span class=\"refentrytitle\">CREATE USER MAPPING</span></a>\u5b9a\u4e49\u4e00\u4e2a\u7528\u6237\u6620\u5c04\uff0c\u4ee5\u6807\u8bc6\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u4f7f\u7528\u54ea\u4e2a\u89d2\u8272\uff1a</p>\n<pre class=\"programlisting\">CREATE USER MAPPING FOR local_user\n        SERVER foreign_server\n        OPTIONS (user 'foreign_user', password 'password');\n</pre>\n<p lang=\"zh\">\u73b0\u5728\u5c31\u53ef\u4ee5\u4f7f\u7528<a class=\"xref\" href=\"/docs/18/sql-createforeigntable.html\" title=\"CREATE FOREIGN TABLE\"><span class=\"refentrytitle\">CREATE FOREIGN TABLE</span></a>\u521b\u5efa\u5916\u90e8\u8868\u4e86\u3002\u5728\u672c\u793a\u4f8b\u4e2d\uff0c\u5e0c\u671b\u8bbf\u95ee\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u540d\u4e3a <code class=\"structname\">some_schema.some_table</code> \u7684\u8868\u3002\u5b83\u5728\u672c\u5730\u7684\u540d\u79f0\u5c06\u662f <code class=\"structname\">foreign_table</code>\uff1a</p>\n<pre class=\"programlisting\">CREATE FOREIGN TABLE foreign_table (\n        id integer NOT NULL,\n        data text\n)\n        SERVER foreign_server\n        OPTIONS (schema_name 'some_schema', table_name 'some_table');\n</pre>\n<p lang=\"zh\">\u5728 <code class=\"command\">CREATE FOREIGN TABLE</code> \u4e2d\u58f0\u660e\u7684\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u5176\u4ed6\u5c5e\u6027\uff0c\u5fc5\u987b\u4e0e\u5b9e\u9645\u8fdc\u7a0b\u8868\u5339\u914d\u3002\u5217\u540d\u4e5f\u5fc5\u987b\u5339\u914d\uff0c\u9664\u975e\u4e3a\u5404\u4e2a\u5217\u9644\u52a0 <code class=\"literal\">column_name</code> \u9009\u9879\u6765\u6307\u660e\u5b83\u4eec\u5728\u8fdc\u7a0b\u8868\u4e2d\u7684\u540d\u79f0\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u76f8\u6bd4\u624b\u5de5\u6784\u9020\u5916\u90e8\u8868\u5b9a\u4e49\uff0c\u4f7f\u7528 <a class=\"link\" href=\"/docs/18/sql-importforeignschema.html\" title=\"IMPORT FOREIGN SCHEMA\"><code class=\"command\">IMPORT FOREIGN SCHEMA</code></a> \u66f4\u53ef\u53d6\u3002</p>\n</div>\n<div class=\"sect2\" id=\"POSTGRES-FDW-AUTHOR\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h3 class=\"title\" lang=\"zh\"><span class=\"sect2\"><a href=\"/docs/18/postgres-fdw.html#POSTGRES-FDW-AUTHOR\">F.38.11. \u4f5c\u8005</a></span></h3>\n</div>\n</div>\n</div>\n<p>Shigeru Hanada <code class=\"email\">&lt;<a class=\"email\" href=\"mailto:shigeru.hanada@gmail.com\">shigeru.hanada@gmail.com</a>&gt;</code></p>\n</div>\n</div>", "manual_path": "/docs/18/postgres-fdw.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/datatype-geometric.html", "method": "same-major semantic node", "sha256": "3e6a2a9270d62b2d90e9de291deefbf6aeb3f07329b5c2913a40da835e8dee71", "language": "zh", "matched_nodes": ["#DATATYPE-GEOMETRIC/div[11]/p[2]/em[1]"]}, {"url": "/docs/18/postgres-fdw.html", "method": "same-major semantic node", "sha256": "13dee90aff35c8bd5d980d6b077844ad3d6090c3afdd7efd0fe921b18897a85b", "language": "zh", "matched_nodes": ["#POSTGRES-FDW/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/div[2]/ul[0]/li[4]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[12]/div[10]/div[2]/dl[0]/dd[3]/p[1]", "#POSTGRES-FDW/div[12]/div[10]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/div[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[0]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[1]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[2]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[3]", "#POSTGRES-FDW/div[12]/div[1]/div[2]/ul[0]/li[4]", "#POSTGRES-FDW/div[12]/div[1]/p[1]", "#POSTGRES-FDW/div[12]/div[1]/p[3]", "#POSTGRES-FDW/div[12]/div[1]/p[4]", "#POSTGRES-FDW/div[12]/div[1]/p[5]", "#POSTGRES-FDW/div[12]/div[1]/p[7]", "#POSTGRES-FDW/div[12]/div[2]/div[0]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[2]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[2]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/div[0]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[3]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[3]/p[1]", "#POSTGRES-FDW/div[12]/div[3]/p[3]", "#POSTGRES-FDW/div[12]/div[3]/p[4]", "#POSTGRES-FDW/div[12]/div[4]/div[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[12]/div[4]/div[2]/dl[0]/dd[5]/p[2]", "#POSTGRES-FDW/div[12]/div[4]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[5]/div[2]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[12]/div[5]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/div[0]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[6]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[6]/p[1]", "#POSTGRES-FDW/div[12]/div[6]/p[3]", "#POSTGRES-FDW/div[12]/div[6]/p[4]", "#POSTGRES-FDW/div[12]/div[7]/div[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[7]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[7]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/div[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[8]/div[2]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[8]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[3]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[5]", "#POSTGRES-FDW/div[12]/div[9]/div[3]/dl[0]/dd[7]", "#POSTGRES-FDW/div[12]/div[9]/p[1]", "#POSTGRES-FDW/div[12]/div[9]/p[2]", "#POSTGRES-FDW/div[12]/div[9]/p[4]", "#POSTGRES-FDW/div[12]/div[9]/p[5]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[0]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[1]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[2]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[3]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/tbody[2]/tr[5]/td[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/div[1]/table[0]/thead[1]/tr[0]/th[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/div[5]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[1]/p[4]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[3]/p[0]", "#POSTGRES-FDW/div[13]/div[1]/dl[0]/dd[5]/p[0]", "#POSTGRES-FDW/div[14]/p[1]", "#POSTGRES-FDW/div[14]/p[2]", "#POSTGRES-FDW/div[14]/p[3]", "#POSTGRES-FDW/div[15]/p[1]", "#POSTGRES-FDW/div[15]/p[2]", "#POSTGRES-FDW/div[15]/p[3]", "#POSTGRES-FDW/div[16]/p[1]", "#POSTGRES-FDW/div[16]/p[2]", "#POSTGRES-FDW/div[16]/p[3]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[0]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[1]", "#POSTGRES-FDW/div[17]/div[3]/ul[0]/li[2]", "#POSTGRES-FDW/div[17]/p[1]", "#POSTGRES-FDW/div[17]/p[2]", "#POSTGRES-FDW/div[17]/p[4]", "#POSTGRES-FDW/div[17]/p[5]", "#POSTGRES-FDW/div[18]/p[3]", "#POSTGRES-FDW/div[19]/div[2]/dl[0]/dd[1]", "#POSTGRES-FDW/div[19]/div[2]/dl[0]/dd[3]", "#POSTGRES-FDW/div[19]/div[2]/dl[0]/dd[5]", "#POSTGRES-FDW/div[19]/p[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[0]", "#POSTGRES-FDW/div[1]/dl[0]/dt[10]", "#POSTGRES-FDW/div[1]/dl[0]/dt[1]", "#POSTGRES-FDW/div[1]/dl[0]/dt[2]", "#POSTGRES-FDW/div[1]/dl[0]/dt[3]", "#POSTGRES-FDW/div[1]/dl[0]/dt[4]", "#POSTGRES-FDW/div[1]/dl[0]/dt[5]", "#POSTGRES-FDW/div[1]/dl[0]/dt[6]", "#POSTGRES-FDW/div[1]/dl[0]/dt[7]", "#POSTGRES-FDW/div[1]/dl[0]/dt[8]", "#POSTGRES-FDW/div[1]/dl[0]/dt[9]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[0]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[1]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[2]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[3]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[4]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[5]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/tbody[2]/tr[6]/td[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[0]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/div[3]/table[0]/thead[1]/tr[0]/th[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/p[0]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/p[1]", "#POSTGRES-FDW/div[20]/div[1]/dl[0]/dd[1]/p[2]", "#POSTGRES-FDW/div[21]/p[1]", "#POSTGRES-FDW/div[21]/p[3]", "#POSTGRES-FDW/div[21]/p[5]", "#POSTGRES-FDW/div[21]/p[7]", "#POSTGRES-FDW/div[21]/p[9]", "#POSTGRES-FDW/div[6]/ol[0]/li[0]", "#POSTGRES-FDW/div[6]/ol[0]/li[1]", "#POSTGRES-FDW/div[6]/ol[0]/li[2]", "#POSTGRES-FDW/div[6]/ol[0]/li[3]", "#POSTGRES-FDW/p[10]", "#POSTGRES-FDW/p[11]", "#POSTGRES-FDW/p[3]", "#POSTGRES-FDW/p[4]", "#POSTGRES-FDW/p[5]", "#POSTGRES-FDW/p[7]", "#POSTGRES-FDW/p[8]"]}, {"url": "/docs/18/protocol-overview.html", "method": "same-major semantic node", "sha256": "3f1aa8bd4dbef58e9a82e8cf4c82829a4df7416cfa83dd61c18e9e25060f22da", "language": "zh", "matched_nodes": ["#PROTOCOL-OVERVIEW/div[9]/p[1]/span[2]/span[0]"]}, {"url": "/docs/18/sql-createindex.html", "method": "same-major semantic node", "sha256": "d943da3610e12ec596dded42ac67d7d3b2028c0c0aad7db6cddca4a61fc052aa", "language": "zh", "matched_nodes": ["#SQL-CREATEINDEX/div[5]/div[3]/p[4]/span[2]/span[0]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "Accesses tables in remote PostgreSQL servers through foreign tables.", "/versions/18/facts/0/label": "Interface family", "/versions/18/facts/0/value": "Foreign-data wrapper", "/versions/18/facts/1/label": "Handler or routine", "/versions/18/facts/2/label": "Recorded callbacks", "/versions/18/facts/3/label": "Data source", "/versions/18/facts/3/value": "Remote PostgreSQL servers", "/versions/18/tables/0/title": "Registered interface handlers", "/versions/18/tables/1/title": "Documented options", "/versions/18/related/0/label": "Foreign-data wrapper catalog", "/versions/18/related/1/label": "Existing extension catalogue identity", "/versions/18/related/2/label": "Foreign Scan plan node", "/versions/18/sections/0/title": "Interface and capability boundaries", "/versions/18/sections/1/title": "Asynchronous Execution Options", "/versions/18/sections/2/title": "Transaction Management Options", "/versions/18/sections/3/title": "Transaction Management", "/versions/18/sections/4/title": "Remote Query Optimization", "/versions/18/sections/5/title": "Cross-Version Compatibility", "/versions/18/sections/6/title": "Registered implementation in core source", "/versions/18/tables/0/rows/0/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/1/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/2/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/3/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/4/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/5/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/6/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/7/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/8/state": "Handler registered; conditions apply", "/versions/18/tables/0/rows/9/state": "Handler registered; conditions apply", "/versions/18/sections/0/paragraphs/0": "The matrix records callbacks actually registered in this source build. Registration identifies an implemented interface hook; options, query shape, privileges and provider rules determine whether an operation is allowed.", "/versions/18/sections/0/paragraphs/1": "The complete same-version manual below retains configuration, constraints and examples. No runtime capability test is claimed.", "/versions/18/sections/1/paragraphs/0": "postgres_fdw supports asynchronous execution, which runs multiple parts of an Append node concurrently rather than serially to improve performance. This execution can be controlled using the following option:", "/versions/18/sections/2/paragraphs/0": "As described in the Transaction Management section, in postgres_fdw transactions are managed by creating corresponding remote transactions, and subtransactions are managed by creating corresponding remote subtransactions. When multiple remote transactions are involved in the current local transaction, by default postgres_fdw commits or aborts those remote transactions serially when the local transaction is committed or aborted. When multiple remote subtransactions are involved in the current local subtransaction, by default postgres_fdw commits or aborts those remote subtransactions serially when the local subtransaction is committed or aborted. Performance can be improved with the following options:", "/versions/18/sections/2/paragraphs/1": "If multiple foreign servers with these options enabled are involved in a local transaction, multiple remote transactions on those foreign servers are committed or aborted in parallel across those foreign servers when the local transaction is committed or aborted.", "/versions/18/sections/2/paragraphs/2": "When these options are enabled, a foreign server with many remote transactions may see a negative performance impact when the local transaction is committed or aborted.", "/versions/18/sections/3/paragraphs/0": "During a query that references any remote tables on a foreign server, postgres_fdw opens a transaction on the remote server if one is not already open corresponding to the current local transaction. The remote transaction is committed or aborted when the local transaction commits or aborts. Savepoints are similarly managed by creating corresponding remote savepoints.", "/versions/18/sections/3/paragraphs/1": "The remote transaction uses SERIALIZABLE isolation level when the local transaction has SERIALIZABLE isolation level; otherwise it uses REPEATABLE READ isolation level. This choice ensures that if a query performs multiple table scans on the remote server, it will get snapshot-consistent results for all the scans. A consequence is that successive queries within a single transaction will see the same data from the remote server, even if concurrent updates are occurring on the remote server due to other activities. That behavior would be expected anyway if the local transaction uses SERIALIZABLE or REPEATABLE READ isolation level, but it might be surprising for a READ COMMITTED local transaction. A future PostgreSQL release might modify these rules.", "/versions/18/sections/3/paragraphs/2": "Note that it is currently not supported by postgres_fdw to prepare the remote transaction for two-phase commit.", "/versions/18/sections/4/paragraphs/0": "postgres_fdw attempts to optimize remote queries to reduce the amount of data transferred from foreign servers. This is done by sending query WHERE clauses to the remote server for execution, and by not retrieving table columns that are not needed for the current query. To reduce the risk of misexecution of queries, WHERE clauses are not sent to the remote server unless they use only data types, operators, and functions that are built-in or belong to an extension that's listed in the foreign server's extensions option. Operators and functions in such clauses must be IMMUTABLE as well. For an UPDATE or DELETE query, postgres_fdw attempts to optimize the query execution by sending the whole query to the remote server if there are no query WHERE clauses that cannot be sent to the remote server, no local joins for the query, no row-level local BEFORE or AFTER triggers or stored generated columns on the target table, and no CHECK OPTION constraints from parent views. In UPDATE , expressions to assign to target columns must use only built-in data types, IMMUTABLE operators, or IMMUTABLE functions, to reduce the risk of misexecution of the query.", "/versions/18/sections/4/paragraphs/1": "When postgres_fdw encounters a join between foreign tables on the same foreign server, it sends the entire join to the foreign server, unless for some reason it believes that it will be more efficient to fetch rows from each table individually, or unless the table references involved are subject to different user mappings. While sending the JOIN clauses, it takes the same precautions as mentioned above for the WHERE clauses.", "/versions/18/sections/4/paragraphs/2": "The query that is actually sent to the remote server for execution can be examined using EXPLAIN VERBOSE .", "/versions/18/sections/5/paragraphs/0": "postgres_fdw can be used with remote servers dating back to PostgreSQL 8.3. Read-only capability is available back to 8.1.", "/versions/18/sections/5/paragraphs/1": "A limitation however is that postgres_fdw generally assumes that immutable built-in functions and operators are safe to send to the remote server for execution, if they appear in a WHERE clause for a foreign table. Thus, a built-in function that was added since the remote server's release might be sent to it for execution, resulting in \u201c function does not exist \u201d or a similar error. This type of failure can be worked around by rewriting the query, for example by embedding the foreign table reference in a sub- SELECT with OFFSET 0 as an optimization fence, and placing the problematic function or operator outside the sub- SELECT .", "/versions/18/sections/5/paragraphs/2": "Another limitation is that when executing INSERT statements with an ON CONFLICT DO NOTHING clause on a foreign table, the remote server must be running PostgreSQL 9.5 or later, as earlier versions do not support this feature.", "/versions/18/tables/0/rows/0/feature": "Scan rows", "/versions/18/tables/0/rows/5/feature": "Join path pushdown", "/versions/18/tables/0/rows/6/feature": "Upper paths, including aggregation", "/versions/18/tables/0/rows/7/feature": "Batch insert", "/versions/18/tables/0/rows/8/feature": "Asynchronous append execution", "/versions/18/tables/0/rows/9/feature": "Import schema", "/versions/18/tables/0/columns/0/label": "Interface operation", "/versions/18/tables/0/columns/1/label": "Source observation", "/versions/18/tables/0/columns/2/label": "Callback", "/versions/18/tables/0/columns/3/label": "Implementation", "/versions/18/tables/1/columns/0/label": "Option", "/versions/18/tables/1/columns/1/label": "Same-version definition", "/versions/18/tables/1/rows/0/definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used.", "/versions/18/tables/1/rows/1/definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used.", "/versions/18/tables/1/rows/2/definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used.", "/versions/18/tables/1/rows/3/definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false .", "/versions/18/tables/1/rows/4/definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 .", "/versions/18/tables/1/rows/5/definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.2 .", "/versions/18/tables/1/rows/6/definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table samples the data on the remote side, or reads and transfers all data and performs the sampling locally. The supported values are off , random , system , bernoulli and auto . off disables remote sampling, so all data are transferred and sampled locally. random performs remote sampling using the random() function to choose returned rows, while system and bernoulli rely on the built-in TABLESAMPLE methods of those names. random works on all remote server versions, while TABLESAMPLE is supported only since 9.5. auto (the default) picks the recommended sampling method automatically; currently it means either bernoulli or random depending on the remote server version.", "/versions/18/tables/1/rows/7/definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly.", "/versions/18/tables/1/rows/8/definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 .", "/versions/18/tables/1/rows/9/definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error. This option also applies when copying into foreign tables. In that case the actual number of rows postgres_fdw copies at once is determined in a similar way to the insert case, but it is limited to at most 1000 due to implementation restrictions of the COPY command.", "/versions/18/tables/1/rows/10/definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release.", "/versions/18/tables/1/rows/11/definition": "This option controls whether postgres_fdw commits, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false .", "/versions/18/tables/1/rows/12/definition": "This option controls whether postgres_fdw aborts, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is aborted. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false .", "/versions/18/tables/1/rows/13/definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server.", "/versions/18/tables/1/rows/14/definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server.", "/versions/18/tables/1/rows/15/definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different.", "/versions/18/tables/1/rows/16/definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally.", "/versions/18/tables/1/rows/17/definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally.", "/versions/18/tables/1/rows/18/definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true .", "/versions/18/tables/1/rows/19/definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction.", "/versions/18/tables/1/rows/20/definition": "This option controls whether postgres_fdw will use the SCRAM pass-through authentication to connect to the foreign server. It can be specified for a foreign server or a user mapping. A user mapping setting overrides the foreign server setting. With SCRAM pass-through authentication, postgres_fdw uses SCRAM-hashed secrets instead of plain-text user passwords to connect to the remote server. This avoids storing plain-text user passwords in PostgreSQL system catalogs. To use SCRAM pass-through authentication: The remote server must request the scram-sha-256 authentication method; otherwise, the connection will fail. The remote server can be of any PostgreSQL version that supports SCRAM. Support for use_scram_passthrough is only required on the client side (FDW side). The user mapping password is not used. The server running postgres_fdw and the remote server must have identical SCRAM secrets (encrypted passwords) for the user being used on postgres_fdw to authenticate on the foreign server (same salt and iterations, not merely the same password). As a corollary, if FDW connections to multiple hosts are to be made, for example for partitioned foreign tables/sharding, then all hosts must have identical SCRAM secrets for the users involved. The current session on the PostgreSQL instance that makes the outgoing FDW connections also must also use SCRAM authentication for its incoming client connection. (Hence \u201c pass-through \u201d : SCRAM must be used going in and out.) This is a technical requirement of the SCRAM protocol."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "2b79e355219a8470f850a537aed544d635d3c3e7ac7d25bc18bc2caaecdda2eb"}, "evidence_kind": "source and documentation", "comparison_data": {"options": [{"name": "schema_name", "definition": "This option, which can be specified for a foreign table, gives the schema name to use for the foreign table on the remote server. If this option is omitted, the name of the foreign table's schema is used."}, {"name": "table_name", "definition": "This option, which can be specified for a foreign table, gives the table name to use for the foreign table on the remote server. If this option is omitted, the foreign table's name is used."}, {"name": "column_name", "definition": "This option, which can be specified for a column of a foreign table, gives the column name to use for the column on the remote server. If this option is omitted, the column's name is used."}, {"name": "use_remote_estimate", "definition": "This option, which can be specified for a foreign table or a foreign server, controls whether postgres_fdw issues remote EXPLAIN commands to obtain cost estimates. A setting for a foreign table overrides any setting for its server, but only for that table. The default is false ."}, {"name": "fdw_startup_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is added to the estimated startup cost of any foreign-table scan on that server. This represents the additional overhead of establishing a connection, parsing and planning the query on the remote side, etc. The default value is 100 ."}, {"name": "fdw_tuple_cost", "definition": "This option, which can be specified for a foreign server, is a floating point value that is used as extra cost per-tuple for foreign-table scans on that server. This represents the additional overhead of data transfer between servers. You might increase or decrease this number to reflect higher or lower network delay to the remote server. The default value is 0.2 ."}, {"name": "analyze_sampling", "definition": "This option, which can be specified for a foreign table or a foreign server, determines if ANALYZE on a foreign table samples the data on the remote side, or reads and transfers all data and performs the sampling locally. The supported values are off , random , system , bernoulli and auto . off disables remote sampling, so all data are transferred and sampled locally. random performs remote sampling using the random() function to choose returned rows, while system and bernoulli rely on the built-in TABLESAMPLE methods of those names. random works on all remote server versions, while TABLESAMPLE is supported only since 9.5. auto (the default) picks the recommended sampling method automatically; currently it means either bernoulli or random depending on the remote server version."}, {"name": "extensions", "definition": "This option is a comma-separated list of names of PostgreSQL extensions that are installed, in compatible versions, on both the local and remote servers. Functions and operators that are immutable and belong to a listed extension will be considered shippable to the remote server. This option can only be specified for foreign servers, not per-table. When using the extensions option, it is the user's responsibility that the listed extensions exist and behave identically on both the local and remote servers. Otherwise, remote queries may fail or behave unexpectedly."}, {"name": "fetch_size", "definition": "This option specifies the number of rows postgres_fdw should get in each fetch operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 100 ."}, {"name": "batch_size", "definition": "This option specifies the number of rows postgres_fdw should insert in each insert operation. It can be specified for a foreign table or a foreign server. The option specified on a table overrides an option specified for the server. The default is 1 . Note the actual number of rows postgres_fdw inserts at once depends on the number of columns and the provided batch_size value. The batch is executed as a single query, and the libpq protocol (which postgres_fdw uses to connect to a remote server) limits the number of parameters in a single query to 65535. When the number of columns * batch_size exceeds the limit, the batch_size will be adjusted to avoid an error. This option also applies when copying into foreign tables. In that case the actual number of rows postgres_fdw copies at once is determined in a similar way to the insert case, but it is limited to at most 1000 due to implementation restrictions of the COPY command."}, {"name": "async_capable", "definition": "This option controls whether postgres_fdw allows foreign tables to be scanned concurrently for asynchronous execution. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is false . In order to ensure that the data being returned from a foreign server is consistent, postgres_fdw will only open one connection for a given foreign server and will run all queries against that server sequentially even if there are multiple foreign tables involved, unless those tables are subject to different user mappings. In such a case, it may be more performant to disable this option to eliminate the overhead associated with running queries asynchronously. Asynchronous execution is applied even when an Append node contains subplan(s) executed synchronously as well as subplan(s) executed asynchronously. In such a case, if the asynchronous subplans are ones processed using postgres_fdw , tuples from the asynchronous subplans are not returned until after at least one synchronous subplan returns all tuples, as that subplan is executed while the asynchronous subplans are waiting for the results of asynchronous queries sent to foreign servers. This behavior might change in a future release."}, {"name": "parallel_commit", "definition": "This option controls whether postgres_fdw commits, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is committed. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false ."}, {"name": "parallel_abort", "definition": "This option controls whether postgres_fdw aborts, in parallel, remote transactions opened on a foreign server in a local transaction when the local transaction is aborted. This setting also applies to remote and local subtransactions. This option can only be specified for foreign servers, not per-table. The default is false ."}, {"name": "updatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be modified using INSERT , UPDATE and DELETE commands. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact updatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server. Note however that the information_schema views will report a postgres_fdw foreign table to be updatable (or not) according to the setting of this option, without any check of the remote server."}, {"name": "truncatable", "definition": "This option controls whether postgres_fdw allows foreign tables to be truncated using the TRUNCATE command. It can be specified for a foreign table or a foreign server. A table-level option overrides a server-level option. The default is true . Of course, if the remote table is not in fact truncatable, an error would occur anyway. Use of this option primarily allows the error to be thrown locally without querying the remote server."}, {"name": "import_collate", "definition": "This option controls whether column COLLATE options are included in the definitions of foreign tables imported from a foreign server. The default is true . You might need to turn this off if the remote server has a different set of collation names than the local server does, which is likely to be the case if it's running on a different operating system. If you do so, however, there is a very severe risk that the imported table columns' collations will not match the underlying data, resulting in anomalous query behavior. Even when this parameter is set to true , importing columns whose collation is the remote server's default can be risky. They will be imported with COLLATE \"default\" , which will select the local server's default collation, which could be different."}, {"name": "import_default", "definition": "This option controls whether column DEFAULT expressions are included in the definitions of foreign tables imported from a foreign server. The default is false . If you enable this option, be wary of defaults that might get computed differently on the local server than they would be on the remote server; nextval() is a common source of problems. The IMPORT will fail altogether if an imported default expression uses a function or operator that does not exist locally."}, {"name": "import_generated", "definition": "This option controls whether column GENERATED expressions are included in the definitions of foreign tables imported from a foreign server. The default is true . The IMPORT will fail altogether if an imported generated expression uses a function or operator that does not exist locally."}, {"name": "import_not_null", "definition": "This option controls whether column NOT NULL constraints are included in the definitions of foreign tables imported from a foreign server. The default is true ."}, {"name": "keep_connections", "definition": "This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction."}, {"name": "use_scram_passthrough", "definition": "This option controls whether postgres_fdw will use the SCRAM pass-through authentication to connect to the foreign server. It can be specified for a foreign server or a user mapping. A user mapping setting overrides the foreign server setting. With SCRAM pass-through authentication, postgres_fdw uses SCRAM-hashed secrets instead of plain-text user passwords to connect to the remote server. This avoids storing plain-text user passwords in PostgreSQL system catalogs. To use SCRAM pass-through authentication: The remote server must request the scram-sha-256 authentication method; otherwise, the connection will fail. The remote server can be of any PostgreSQL version that supports SCRAM. Support for use_scram_passthrough is only required on the client side (FDW side). The user mapping password is not used. The server running postgres_fdw and the remote server must have identical SCRAM secrets (encrypted passwords) for the user being used on postgres_fdw to authenticate on the foreign server (same salt and iterations, not merely the same password). As a corollary, if FDW connections to multiple hosts are to be made, for example for partitioned foreign tables/sharding, then all hosts must have identical SCRAM secrets for the users involved. The current session on the PostgreSQL instance that makes the outgoing FDW connections also must also use SCRAM authentication for its incoming client connection. (Hence \u201c pass-through \u201d : SCRAM must be used going in and out.) This is a technical requirement of the SCRAM protocol."}], "callbacks": {"EndForeignScan": "postgresEndForeignScan", "GetForeignPlan": "postgresGetForeignPlan", "EndDirectModify": "postgresEndDirectModify", "GetForeignPaths": "postgresGetForeignPaths", "BeginForeignScan": "postgresBeginForeignScan", "EndForeignInsert": "postgresEndForeignInsert", "EndForeignModify": "postgresEndForeignModify", "PlanDirectModify": "postgresPlanDirectModify", "BeginDirectModify": "postgresBeginDirectModify", "ExecForeignDelete": "postgresExecForeignDelete", "ExecForeignInsert": "postgresExecForeignInsert", "ExecForeignUpdate": "postgresExecForeignUpdate", "GetForeignRelSize": "postgresGetForeignRelSize", "PlanForeignModify": "postgresPlanForeignModify", "ReScanForeignScan": "postgresReScanForeignScan", "BeginForeignInsert": "postgresBeginForeignInsert", "BeginForeignModify": "postgresBeginForeignModify", "ExplainForeignScan": "postgresExplainForeignScan", "ForeignAsyncNotify": "postgresForeignAsyncNotify", "IterateForeignScan": "postgresIterateForeignScan", "RecheckForeignScan": "postgresRecheckForeignScan", "AnalyzeForeignTable": "postgresAnalyzeForeignTable", "ExecForeignTruncate": "postgresExecForeignTruncate", "ExplainDirectModify": "postgresExplainDirectModify", "ForeignAsyncRequest": "postgresForeignAsyncRequest", "GetForeignJoinPaths": "postgresGetForeignJoinPaths", "ImportForeignSchema": "postgresImportForeignSchema", "IterateDirectModify": "postgresIterateDirectModify", "ExplainForeignModify": "postgresExplainForeignModify", "GetForeignUpperPaths": "postgresGetForeignUpperPaths", "IsForeignRelUpdatable": "postgresIsForeignRelUpdatable", "ExecForeignBatchInsert": "postgresExecForeignBatchInsert", "AddForeignUpdateTargets": "postgresAddForeignUpdateTargets", "ForeignAsyncConfigureWait": "postgresForeignAsyncConfigureWait", "GetForeignModifyBatchSize": "postgresGetForeignModifyBatchSize", "IsForeignPathAsyncCapable": "postgresIsForeignPathAsyncCapable"}, "source_options": [], "protocol_versions": {}}, "comparison_hash": "b8cfe64df86ef92c7aa383c99b1ce6ddc0c195b32004bf9a4ec0ea46bb7e9ba8", "manual_language": "zh", "runtime_verified": false}, "comparison": {"left": "17", "right": "18", "status": "changed", "diff": "--- PostgreSQL 17\n+++ PostgreSQL 18\n@@ -117,6 +117,10 @@\n     {\n       \"definition\": \"This option controls whether postgres_fdw keeps the connections to the foreign server open so that subsequent queries can re-use them. It can only be specified for a foreign server. The default is on . If set to off , all connections to this foreign server will be discarded at the end of each transaction.\",\n       \"name\": \"keep_connections\"\n+    },\n+    {\n+      \"definition\": \"This option controls whether postgres_fdw will use the SCRAM pass-through authentication to connect to the foreign server. It can be specified for a foreign server or a user mapping. A user mapping setting overrides the foreign server setting. With SCRAM pass-through authentication, postgres_fdw uses SCRAM-hashed secrets instead of plain-text user passwords to connect to the remote server. This avoids storing plain-text user passwords in PostgreSQL system catalogs. To use SCRAM pass-through authentication: The remote server must request the scram-sha-256 authentication method; otherwise, the connection will fail. The remote server can be of any PostgreSQL version that supports SCRAM. Support for use_scram_passthrough is only required on the client side (FDW side). The user mapping password is not used. The server running postgres_fdw and the remote server must have identical SCRAM secrets (encrypted passwords) for the user being used on postgres_fdw to authenticate on the foreign server (same salt and iterations, not merely the same password). As a corollary, if FDW connections to multiple hosts are to be made, for example for partitioned foreign tables/sharding, then all hosts must have identical SCRAM secrets for the users involved. The current session on the PostgreSQL instance that makes the outgoing FDW connections also must also use SCRAM authentication for its incoming client connection. (Hence \u201c pass-through \u201d : SCRAM must be used going in and out.) This is a technical requirement of the SCRAM protocol.\",\n+      \"name\": \"use_scram_passthrough\"\n     }\n   ],\n   \"protocol_versions\": {},"}}