{"kind": "opclass", "major": "18", "item": {"slug": "family-gin-jsonb_path_ops", "name": "gin/jsonb_path_ops (family)", "name_zh": "", "category": "GIN \u64cd\u4f5c\u7b26\u5bb6\u65cf", "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "content_hash": "238358899d4ffc903f00870577d26a5555a5e31fa4001bafe46f5492e5b8e7d1", "versions": {"10": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "family": {"name": "jsonb_path_ops", "method": "gin"}, "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=10", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=10", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=10", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "classes": [{"name": "jsonb_path_ops", "slug": "class-gin-jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb", "source_oid": "", "family_slug": "family-gin-jsonb_path_ops"}], "related": [{"url": "/wiki/indexam/gin/?v=10", "label": "GIN \u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "label": "10.23", "major": "10", "channel": "historical", "revision": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9", "source_sha256": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9", "manual_fingerprint": "113b870e3ff4b52320f34750da5e740800f3f6e4ed6f2fc00a0891944d1be7c2", "catalog_fingerprint": "dd2d5fd5e17d29184db5f6625f9f0f9b9d40ae7aa34b6ccf28ddbc8684bd4992"}, "sources": [{"url": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}, {"url": "/docs/10/indexes-opclass.html", "path": "indexes-opclass.html", "label": "PostgreSQL 10 English manual: indexes-opclass.html", "sha256": "5e070d906c5b9c756625cc59969d7259b304fb3ff73ec4363e2dcbf923ad4c61"}, {"url": "/docs/10/catalog-pg-opfamily.html", "path": "catalog-pg-opfamily.html", "label": "PostgreSQL 10 English manual: catalog-pg-opfamily.html", "sha256": "11462d866bbcf3bda5f38dfea3fea5b4f004397ce1d002a226013ca1b0705c1a"}, {"url": "/docs/10/catalog-pg-amop.html", "path": "catalog-pg-amop.html", "label": "PostgreSQL 10 English manual: catalog-pg-amop.html", "sha256": "d5ce5a3be599e5506edbe3ff615674beb013720953f4979a44b6ecfd4cc24090"}, {"url": "/docs/10/catalog-pg-amproc.html", "path": "catalog-pg-amproc.html", "label": "PostgreSQL 10 English manual: catalog-pg-amproc.html", "sha256": "5e5f2932bae4725864988e810841b0edf82d629b3ea2690ffe8b44935eb89131"}, {"url": "/docs/10/datatype-json.html", "path": "datatype-json.html", "label": "PostgreSQL 10 English manual: datatype-json.html", "sha256": "2f7b133b518b18a4db2eaad36323b8924ee01202552bc22cd3bad5d64964eb09"}, {"url": "/docs/10/gin-builtin-opclasses.html", "path": "gin-builtin-opclasses.html", "label": "PostgreSQL 10 English manual: gin-builtin-opclasses.html", "sha256": "f4be7e91d56bdebb03c4f5cef51adc134eb9995198eb64ebb793cbc08c034c7f"}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/10/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "10", "build_id": 63, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "128986dc42e9e1f0bc923427b9a91d31b2ced11bce4da0272584af9fcf1622c2", "fragment_sha256": "dfb18d4f20bebf01ee5a8f50b7df4c561d0e696cb96ab74da753e0e1624ccc51", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "snapshot:sha256:62997ea80516ad012fbf6359de33f3b016b54c47e2df76e75606116b4baaf8e5", "translated_from_revision": null}, "body_sha256": "55e4bf3a6db4d47ff86c19a2e0a8afa459e20d377d1ac1118eab67b1898a4b61", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}, "facts_zh": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u786e\u5b9a\u7d22\u5f15\u9488\u5bf9\u8be5\u5217\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u5efa\u7acb\u5728\u7c7b\u578b int4 \u4e0a\u7684 B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8be5\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u9488\u5bf9\u4ee5\u4e0b\u7c7b\u578b\u7684\u503c\u7684\u6bd4\u8f83\u51fd\u6570\uff1a int4 \u3002\u5b9e\u9645\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5c31\u8db3\u591f\u4e86\u3002\u4e4b\u6240\u4ee5\u9700\u8981\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u4e8e\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\uff0c\u53ef\u80fd\u5b58\u5728\u4e0d\u6b62\u4e00\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6216\u5b9e\u90e8\u5bf9\u590d\u6570\u6570\u636e\u7c7b\u578b\u6392\u5e8f\u3002\u53ef\u4ee5\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u7c7b\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u57fa\u672c\u6392\u5e8f\u987a\u5e8f\uff08\u968f\u540e\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879\u8fdb\u884c\u8c03\u6574\uff1a COLLATE \uff0c ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4ec5\u652f\u6301\u4e3a @> \u64cd\u4f5c\u7b26\u5efa\u7acb\u7d22\u5f15\u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u793a\u4f8b\u5982\u4e0b\uff1a", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u4f7f\u7528 @> \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u4e0e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \u76f8\u6bd4\uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002\u5bf9\u4e8e\u76f8\u540c\u6570\u636e\uff0c jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u641c\u7d22\u7684\u9488\u5bf9\u6027\u4e5f\u66f4\u5f3a\uff0c\u7279\u522b\u662f\u5f53\u67e5\u8be2\u5305\u542b\u6570\u636e\u4e2d\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u7684\u6027\u80fd\u901a\u5e38\u4f18\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [6] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "center_zh": {"title": "gin/jsonb_path_ops (family)", "locale": "zh-Hans", "source": {"key": "family-gin-jsonb_path_ops", "locale": "zh-Hans", "version": "10", "text_hash": "b71f86991f3d36220f62f9ff1cb98c17280310b2cb15decc1818d67993ece1ca", "collection": "opclass", "dataset_hash": "7c31b524dfe136022d39a6ae8dcfac6b3bbd5f8fdaf422536599981252aff0c9", "source_database": "center", "source_revision": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}, "payload": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=10", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=10", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=10", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/10/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "10", "build_id": 63, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "128986dc42e9e1f0bc923427b9a91d31b2ced11bce4da0272584af9fcf1622c2", "fragment_sha256": "dfb18d4f20bebf01ee5a8f50b7df4c561d0e696cb96ab74da753e0e1624ccc51", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "snapshot:sha256:62997ea80516ad012fbf6359de33f3b016b54c47e2df76e75606116b4baaf8e5", "translated_from_revision": null}, "body_sha256": "55e4bf3a6db4d47ff86c19a2e0a8afa459e20d377d1ac1118eab67b1898a4b61", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}, "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u786e\u5b9a\u7d22\u5f15\u9488\u5bf9\u8be5\u5217\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u5efa\u7acb\u5728\u7c7b\u578b int4 \u4e0a\u7684 B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8be5\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u9488\u5bf9\u4ee5\u4e0b\u7c7b\u578b\u7684\u503c\u7684\u6bd4\u8f83\u51fd\u6570\uff1a int4 \u3002\u5b9e\u9645\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5c31\u8db3\u591f\u4e86\u3002\u4e4b\u6240\u4ee5\u9700\u8981\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u4e8e\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\uff0c\u53ef\u80fd\u5b58\u5728\u4e0d\u6b62\u4e00\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6216\u5b9e\u90e8\u5bf9\u590d\u6570\u6570\u636e\u7c7b\u578b\u6392\u5e8f\u3002\u53ef\u4ee5\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u7c7b\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u57fa\u672c\u6392\u5e8f\u987a\u5e8f\uff08\u968f\u540e\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879\u8fdb\u884c\u8c03\u6574\uff1a COLLATE \uff0c ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4ec5\u652f\u6301\u4e3a @> \u64cd\u4f5c\u7b26\u5efa\u7acb\u7d22\u5f15\u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u793a\u4f8b\u5982\u4e0b\uff1a", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u4f7f\u7528 @> \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u4e0e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \u76f8\u6bd4\uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002\u5bf9\u4e8e\u76f8\u540c\u6570\u636e\uff0c jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u641c\u7d22\u7684\u9488\u5bf9\u6027\u4e5f\u66f4\u5f3a\uff0c\u7279\u522b\u662f\u5f53\u67e5\u8be2\u5305\u542b\u6570\u636e\u4e2d\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u7684\u6027\u80fd\u901a\u5e38\u4f18\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [6] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em class=\"firstterm\">\u64cd\u4f5c\u7b26\u7c7b</em>\u3002</p><p>\u64cd\u4f5c\u7b26\u7c7b\u786e\u5b9a\u7d22\u5f15\u9488\u5bf9\u8be5\u5217\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u5efa\u7acb\u5728\u7c7b\u578b <code class=\"type\">int4</code> \u4e0a\u7684 B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code class=\"literal\">int4_ops</code> \u7c7b\uff1b\u8be5\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u9488\u5bf9\u4ee5\u4e0b\u7c7b\u578b\u7684\u503c\u7684\u6bd4\u8f83\u51fd\u6570\uff1a<code class=\"type\">int4</code>\u3002\u5b9e\u9645\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5c31\u8db3\u591f\u4e86\u3002\u4e4b\u6240\u4ee5\u9700\u8981\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u4e8e\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\uff0c\u53ef\u80fd\u5b58\u5728\u4e0d\u6b62\u4e00\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6216\u5b9e\u90e8\u5bf9\u590d\u6570\u6570\u636e\u7c7b\u578b\u6392\u5e8f\u3002\u53ef\u4ee5\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u7c7b\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u57fa\u672c\u6392\u5e8f\u987a\u5e8f\uff08\u968f\u540e\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879\u8fdb\u884c\u8c03\u6574\uff1a<code class=\"literal\">COLLATE</code>\uff0c<code class=\"literal\">ASC</code>/<code class=\"literal\">DESC</code> \u548c/\u6216 <code class=\"literal\">NULLS FIRST</code>/<code class=\"literal\">NULLS LAST</code>\uff09\u3002\n  </p><p>   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/10/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "version": "10", "link_map": {"/zh/docs/10/indexes-opclass.html": "/docs/10/indexes-opclass.html"}, "body_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002</p><p>\u64cd\u4f5c\u7b26\u7c7b\u786e\u5b9a\u7d22\u5f15\u9488\u5bf9\u8be5\u5217\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u5efa\u7acb\u5728\u7c7b\u578b <code>int4</code> \u4e0a\u7684 B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8be5\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u9488\u5bf9\u4ee5\u4e0b\u7c7b\u578b\u7684\u503c\u7684\u6bd4\u8f83\u51fd\u6570\uff1a<code>int4</code>\u3002\u5b9e\u9645\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5c31\u8db3\u591f\u4e86\u3002\u4e4b\u6240\u4ee5\u9700\u8981\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u4e8e\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\uff0c\u53ef\u80fd\u5b58\u5728\u4e0d\u6b62\u4e00\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6216\u5b9e\u90e8\u5bf9\u590d\u6570\u6570\u636e\u7c7b\u578b\u6392\u5e8f\u3002\u53ef\u4ee5\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u7c7b\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u57fa\u672c\u6392\u5e8f\u987a\u5e8f\uff08\u968f\u540e\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879\u8fdb\u884c\u8c03\u6574\uff1a<code>COLLATE</code>\uff0c<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code>\uff09\u3002\n  </p><p>   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/10/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "body_sha256": "20c0afa1cfea8892da05de9798eaccd107beba15fa56668df833d694a7e9073f", "content_hash": "b71f86991f3d36220f62f9ff1cb98c17280310b2cb15decc1818d67993ece1ca", "source_database": "center", "source_revision": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}, "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "description": "contains", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403e-jsonb-jsonb", "sort_family_slug": ""}], "signature": "gin/jsonb_path_ops", "tables_zh": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=10", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=10", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=10", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=10", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "source_oid": "4037", "description": ["jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002"], "sections_zh": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u786e\u5b9a\u7d22\u5f15\u9488\u5bf9\u8be5\u5217\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u5efa\u7acb\u5728\u7c7b\u578b int4 \u4e0a\u7684 B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8be5\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u9488\u5bf9\u4ee5\u4e0b\u7c7b\u578b\u7684\u503c\u7684\u6bd4\u8f83\u51fd\u6570\uff1a int4 \u3002\u5b9e\u9645\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5c31\u8db3\u591f\u4e86\u3002\u4e4b\u6240\u4ee5\u9700\u8981\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u4e8e\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\uff0c\u53ef\u80fd\u5b58\u5728\u4e0d\u6b62\u4e00\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6216\u5b9e\u90e8\u5bf9\u590d\u6570\u6570\u636e\u7c7b\u578b\u6392\u5e8f\u3002\u53ef\u4ee5\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u7c7b\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u57fa\u672c\u6392\u5e8f\u987a\u5e8f\uff08\u968f\u540e\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879\u8fdb\u884c\u8c03\u6574\uff1a COLLATE \uff0c ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4ec5\u652f\u6301\u4e3a @> \u64cd\u4f5c\u7b26\u5efa\u7acb\u7d22\u5f15\u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u793a\u4f8b\u5982\u4e0b\uff1a", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u4f7f\u7528 @> \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u4e0e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \u76f8\u6bd4\uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002\u5bf9\u4e8e\u76f8\u540c\u6570\u636e\uff0c jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u641c\u7d22\u7684\u9488\u5bf9\u6027\u4e5f\u66f4\u5f3a\uff0c\u7279\u522b\u662f\u5f53\u67e5\u8be2\u5305\u542b\u6570\u636e\u4e2d\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u7684\u6027\u80fd\u901a\u5e38\u4f18\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [6] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "localization": {"status": "complete", "sources": [{"url": "/docs/10/catalog-pg-amop.html", "method": "same-major semantic node", "sha256": "f2ee5e4386a45a176aa7c61ff8d752aee0ce3aaea06553965bee526ab799f223", "language": "zh", "matched_nodes": ["#CATALOG-PG-AMOP/p[2]/em[1]"]}, {"url": "/docs/10/datatype-json.html", "method": "same-major semantic node", "sha256": "165b454cf9ff6825d21a4252844d43764fca541eafd0649170257d230e23425b", "language": "zh", "matched_nodes": ["#DATATYPE-JSON/div[18]/p[19]", "#DATATYPE-JSON/div[18]/p[20]", "#DATATYPE-JSON/div[18]/p[21]", "#DATATYPE-JSON/div[18]/p[5]"]}, {"url": "/docs/10/gin-builtin-opclasses.html", "method": "same-major semantic node", "sha256": "12f3e033aa63890057ee39dd621eb6847a36587dcddea3d23f53714f221336ec", "language": "zh", "matched_nodes": ["#GIN-BUILTIN-OPCLASSES/p[4]"]}, {"url": "/docs/10/indexes-opclass.html", "method": "same-major semantic node", "sha256": "a63692e6035b21dab0183c026ca8b0c2ac480c3ca9833fdce2081537733252db", "language": "zh", "matched_nodes": ["#INDEXES-OPCLASS/p[3]", "#INDEXES-OPCLASS/p[5]", "#INDEXES-OPCLASS/p[6]"]}, {"url": "/docs/10/xfunc-c.html", "method": "same-major semantic node", "sha256": "0df98937379292051379860f0a86609d1855b9c9df04dfb53c02ec0380079453", "language": "zh", "matched_nodes": ["#XFUNC-C/p[3]/span[1]/span[0]"]}], "language": "zh", "original_text": {"/versions/10/description/0": "GIN operator family containing 1 classes, 1 operator strategies and 5 support functions in this source build.", "/versions/10/facts/0/label": "Object kind", "/versions/10/facts/0/value": "Operator family", "/versions/10/facts/1/label": "Index AM", "/versions/10/tables/0/title": "Family operator strategies", "/versions/10/tables/1/title": "Family support functions", "/versions/10/tables/2/title": "Classes in this family", "/versions/10/related/0/label": "GIN Index AM", "/versions/10/sections/0/title": "Operator classes and families", "/versions/10/sections/1/title": "Specific manual guidance", "/versions/10/tables/0/rows/0/scope": "Family member", "/versions/10/sections/0/paragraphs/0": "An index definition can specify an operator class for each column of an index.", "/versions/10/sections/0/paragraphs/1": "The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).", "/versions/10/sections/0/paragraphs/2": "There are also some built-in operator classes besides the default ones:", "/versions/10/sections/1/paragraphs/0": "The non-default GIN operator class jsonb_path_ops supports indexing the @> operator only. An example of creating an index with this operator class is:", "/versions/10/sections/1/paragraphs/1": "Although the jsonb_path_ops operator class supports only queries with the @> operator, it has notable performance advantages over the default operator class jsonb_ops . A jsonb_path_ops index is usually much smaller than a jsonb_ops index over the same data, and the specificity of searches is better, particularly when queries contain keys that appear frequently in the data. Therefore search operations typically perform better than with the default operator class.", "/versions/10/sections/1/paragraphs/2": "The technical difference between a jsonb_ops and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the data. [6] Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it; for example to index {\"foo\": {\"bar\": \"baz\"}} , a single index item would be created incorporating all three of foo , bar , and baz into the hash value. Thus a containment query looking for this structure would result in an extremely specific index search; but there is no way at all to find out whether foo appears as a key. On the other hand, a jsonb_ops index would create three index items representing foo , bar , and baz separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the equivalent jsonb_path_ops search, especially if there are a very large number of rows containing any single one of the three index items.", "/versions/10/sections/1/paragraphs/3": "A disadvantage of the jsonb_path_ops approach is that it produces no index entries for JSON structures not containing any values, such as {\"a\": {}} . If a search for documents containing such a structure is requested, it will require a full-index scan, which is quite slow. jsonb_path_ops is therefore ill-suited for applications that often perform such searches.", "/versions/10/sections/1/paragraphs/4": "Of the two operator classes for type jsonb , jsonb_ops is the default. jsonb_path_ops supports fewer operators but offers better performance for those operators. See Section 8.14.4 for details.", "/versions/10/tables/0/rows/0/purpose": "search", "/versions/10/tables/2/rows/0/default": "no", "/versions/10/tables/0/columns/0/label": "Operator overload", "/versions/10/tables/0/columns/1/label": "Strategy", "/versions/10/tables/0/columns/2/label": "Purpose", "/versions/10/tables/0/columns/3/label": "Ordering family", "/versions/10/tables/0/columns/4/label": "Membership scope", "/versions/10/tables/0/columns/5/label": "Source description", "/versions/10/tables/1/columns/0/label": "Support number", "/versions/10/tables/1/columns/1/label": "Left type", "/versions/10/tables/1/columns/2/label": "Right type", "/versions/10/tables/1/columns/3/label": "Function signature", "/versions/10/tables/1/columns/4/label": "Result type", "/versions/10/tables/2/columns/0/label": "Class", "/versions/10/tables/2/columns/1/label": "Input type", "/versions/10/tables/2/columns/2/label": "Key type", "/versions/10/tables/2/columns/3/label": "Default", "/versions/10/tables/0/rows/0/description": "contains", "/versions/10/tables/1/rows/1/result_type": "internal", "/versions/10/tables/1/rows/2/result_type": "internal"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "b9ecdd1dfe6a06968a6c350de6dff678935fb7ad95136c3a5f125ffcd3bc9d27", "canonical_center_text_hash": "b71f86991f3d36220f62f9ff1cb98c17280310b2cb15decc1818d67993ece1ca"}, "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "comparison_data": {"kind": "family", "classes": [{"name": "jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb"}], "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "sort_family": ""}], "attributes": {"name": "jsonb_path_ops", "method": "gin"}, "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "char"}]}, "comparison_hash": "0a2874bff72a3f56a5a8a3d5a09f84444bd7680edfe09649390edec5a696f13a", "manual_language": "zh", "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "char"}], "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002</p><p>\u64cd\u4f5c\u7b26\u7c7b\u786e\u5b9a\u7d22\u5f15\u9488\u5bf9\u8be5\u5217\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u5efa\u7acb\u5728\u7c7b\u578b <code>int4</code> \u4e0a\u7684 B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8be5\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u9488\u5bf9\u4ee5\u4e0b\u7c7b\u578b\u7684\u503c\u7684\u6bd4\u8f83\u51fd\u6570\uff1a<code>int4</code>\u3002\u5b9e\u9645\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5c31\u8db3\u591f\u4e86\u3002\u4e4b\u6240\u4ee5\u9700\u8981\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u4e8e\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\uff0c\u53ef\u80fd\u5b58\u5728\u4e0d\u6b62\u4e00\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6216\u5b9e\u90e8\u5bf9\u590d\u6570\u6570\u636e\u7c7b\u578b\u6392\u5e8f\u3002\u53ef\u4ee5\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u7c7b\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u57fa\u672c\u6392\u5e8f\u987a\u5e8f\uff08\u968f\u540e\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879\u8fdb\u884c\u8c03\u6574\uff1a<code>COLLATE</code>\uff0c<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code>\uff09\u3002\n  </p><p>   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/10/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "11": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "family": {"name": "jsonb_path_ops", "method": "gin"}, "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=11", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=11", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=11", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "classes": [{"name": "jsonb_path_ops", "slug": "class-gin-jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb", "source_oid": "", "family_slug": "family-gin-jsonb_path_ops"}], "related": [{"url": "/wiki/indexam/gin/?v=11", "label": "GIN \u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "label": "11.22", "major": "11", "channel": "historical", "revision": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0", "source_sha256": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0", "manual_fingerprint": "99c9e45d34555f000789cb4e019492e838041c1f2f31d840f3051ff9d7ed9118", "catalog_fingerprint": "4f08eb8c7ac7d09abfbb29a172148a44b8fb72026616bb55a5f8f84db7a38785"}, "sources": [{"url": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, {"url": "/docs/11/indexes-opclass.html", "path": "indexes-opclass.html", "label": "PostgreSQL 11 English manual: indexes-opclass.html", "sha256": "234c67ab5a33096697e1851c197c79ba0e872686c7909c2696716a102253c7bd"}, {"url": "/docs/11/catalog-pg-opfamily.html", "path": "catalog-pg-opfamily.html", "label": "PostgreSQL 11 English manual: catalog-pg-opfamily.html", "sha256": "bc70c6a938dcf14c212ff9139ff1436f8292305ae551f7af4432c2b034d84070"}, {"url": "/docs/11/catalog-pg-amop.html", "path": "catalog-pg-amop.html", "label": "PostgreSQL 11 English manual: catalog-pg-amop.html", "sha256": "c17d050a6f2d093de2c343242bcc4d446b936de1d2902727d3fa3b0697b44fd3"}, {"url": "/docs/11/catalog-pg-amproc.html", "path": "catalog-pg-amproc.html", "label": "PostgreSQL 11 English manual: catalog-pg-amproc.html", "sha256": "819e66cb86af033d3328a3602c65c861e9f2d2c519d1f42f37fdd7766e1fc31f"}, {"url": "/docs/11/datatype-json.html", "path": "datatype-json.html", "label": "PostgreSQL 11 English manual: datatype-json.html", "sha256": "1e2d80f721b0f8adacfae58e63c4a673d204669d9ad175a7f40abf37c450d30b"}, {"url": "/docs/11/gin-builtin-opclasses.html", "path": "gin-builtin-opclasses.html", "label": "PostgreSQL 11 English manual: gin-builtin-opclasses.html", "sha256": "2474f5783430f92bd53819d5d4e3f6614544f4410826d2ba31a3c3e338799fa2"}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/11/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "11", "build_id": 64, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "1ad83a0beef158ff8346b350cd1b5de15598c9aff4156aa860271165fdf5fe51", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "snapshot:sha256:ef5c7bc074acae9795db16e6b7482aea3b222bd4bcce0f76831332b97a21e8a1", "translated_from_revision": null}, "body_sha256": "821f51152ab3ba1f4b6d1c426c5373e87385a7f66e218060feb9bf13dbda2d10", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, "facts_zh": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4ec5\u652f\u6301\u4e3a @> \u64cd\u4f5c\u7b26\u5efa\u7acb\u7d22\u5f15\u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u793a\u4f8b\u5982\u4e0b\uff1a", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u4f7f\u7528 @> \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u4e0e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \u76f8\u6bd4\uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002\u5bf9\u4e8e\u76f8\u540c\u6570\u636e\uff0c jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u641c\u7d22\u7684\u9488\u5bf9\u6027\u4e5f\u66f4\u5f3a\uff0c\u7279\u522b\u662f\u5f53\u67e5\u8be2\u5305\u542b\u6570\u636e\u4e2d\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u7684\u6027\u80fd\u901a\u5e38\u4f18\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [6] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "center_zh": {"title": "gin/jsonb_path_ops (family)", "locale": "zh-Hans", "source": {"key": "family-gin-jsonb_path_ops", "locale": "zh-Hans", "version": "11", "text_hash": "2c97f9532b24e7828aa303e42e5593fa5b93d9fb46d54d39429ff7241119d0da", "collection": "opclass", "dataset_hash": "7c31b524dfe136022d39a6ae8dcfac6b3bbd5f8fdaf422536599981252aff0c9", "source_database": "center", "source_revision": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, "payload": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=11", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=11", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=11", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/11/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "11", "build_id": 64, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "1ad83a0beef158ff8346b350cd1b5de15598c9aff4156aa860271165fdf5fe51", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "snapshot:sha256:ef5c7bc074acae9795db16e6b7482aea3b222bd4bcce0f76831332b97a21e8a1", "translated_from_revision": null}, "body_sha256": "821f51152ab3ba1f4b6d1c426c5373e87385a7f66e218060feb9bf13dbda2d10", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4ec5\u652f\u6301\u4e3a @> \u64cd\u4f5c\u7b26\u5efa\u7acb\u7d22\u5f15\u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u793a\u4f8b\u5982\u4e0b\uff1a", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u4f7f\u7528 @> \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u4e0e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \u76f8\u6bd4\uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002\u5bf9\u4e8e\u76f8\u540c\u6570\u636e\uff0c jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u641c\u7d22\u7684\u9488\u5bf9\u6027\u4e5f\u66f4\u5f3a\uff0c\u7279\u522b\u662f\u5f53\u67e5\u8be2\u5305\u542b\u6570\u636e\u4e2d\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u7684\u6027\u80fd\u901a\u5e38\u4f18\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [6] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em class=\"firstterm\">\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code class=\"type\">int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code class=\"literal\">int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code class=\"type\">int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code class=\"literal\">COLLATE</code>\u3001<code class=\"literal\">ASC</code>/<code class=\"literal\">DESC</code> \u548c/\u6216 <code class=\"literal\">NULLS FIRST</code>/<code class=\"literal\">NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/11/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "version": "11", "link_map": {"/zh/docs/11/indexes-opclass.html": "/docs/11/indexes-opclass.html"}, "body_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/11/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "body_sha256": "6ace9fb9a5ec0445338503752fe2ad85056dc0dc4878c40665ec1c52b04d3434", "content_hash": "2c97f9532b24e7828aa303e42e5593fa5b93d9fb46d54d39429ff7241119d0da", "source_database": "center", "source_revision": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "description": "contains", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403e-jsonb-jsonb", "sort_family_slug": ""}], "signature": "gin/jsonb_path_ops", "tables_zh": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=11", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=11", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=11", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=11", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "source_oid": "4037", "description": ["jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002"], "sections_zh": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4ec5\u652f\u6301\u4e3a @> \u64cd\u4f5c\u7b26\u5efa\u7acb\u7d22\u5f15\u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u793a\u4f8b\u5982\u4e0b\uff1a", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u4f7f\u7528 @> \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u4e0e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \u76f8\u6bd4\uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002\u5bf9\u4e8e\u76f8\u540c\u6570\u636e\uff0c jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u641c\u7d22\u7684\u9488\u5bf9\u6027\u4e5f\u66f4\u5f3a\uff0c\u7279\u522b\u662f\u5f53\u67e5\u8be2\u5305\u542b\u6570\u636e\u4e2d\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u7684\u6027\u80fd\u901a\u5e38\u4f18\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [6] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "localization": {"status": "complete", "sources": [{"url": "/docs/11/catalog-pg-amop.html", "method": "same-major semantic node", "sha256": "d4e01ba05c1f00188e2353ef6816dbe175140ae359defc71e20f92fb0e69299a", "language": "zh", "matched_nodes": ["#CATALOG-PG-AMOP/p[2]/em[1]"]}, {"url": "/docs/11/datatype-json.html", "method": "same-major semantic node", "sha256": "e3239ad05fc4bad945529e631d9e5da84363b31e6e589461b97d69386cc43e7f", "language": "zh", "matched_nodes": ["#DATATYPE-JSON/div[18]/p[19]", "#DATATYPE-JSON/div[18]/p[20]", "#DATATYPE-JSON/div[18]/p[21]", "#DATATYPE-JSON/div[18]/p[5]"]}, {"url": "/docs/11/gin-builtin-opclasses.html", "method": "same-major semantic node", "sha256": "f45606e38d84d395d5a602736ffa7b92929e9cb1fa0ec2daf61849a89d9b0c3c", "language": "zh", "matched_nodes": ["#GIN-BUILTIN-OPCLASSES/p[4]"]}, {"url": "/docs/11/indexes-opclass.html", "method": "same-major semantic node", "sha256": "89f6f02b6aadf86b19cfce09618561d39321a355dbce65ca30759d9044f1ac44", "language": "zh", "matched_nodes": ["#INDEXES-OPCLASS/p[3]", "#INDEXES-OPCLASS/p[5]", "#INDEXES-OPCLASS/p[6]"]}, {"url": "/docs/11/xfunc-c.html", "method": "same-major semantic node", "sha256": "338b6447b1144585971c12bdf32b24efc4b9b5a4778aff31b878afd575c1c68c", "language": "zh", "matched_nodes": ["#XFUNC-C/p[3]/span[1]/span[0]"]}], "language": "zh", "original_text": {"/versions/11/description/0": "GIN operator family containing 1 classes, 1 operator strategies and 5 support functions in this source build.", "/versions/11/facts/0/label": "Object kind", "/versions/11/facts/0/value": "Operator family", "/versions/11/facts/1/label": "Index AM", "/versions/11/tables/0/title": "Family operator strategies", "/versions/11/tables/1/title": "Family support functions", "/versions/11/tables/2/title": "Classes in this family", "/versions/11/related/0/label": "GIN Index AM", "/versions/11/sections/0/title": "Operator classes and families", "/versions/11/sections/1/title": "Specific manual guidance", "/versions/11/tables/0/rows/0/scope": "Family member", "/versions/11/sections/0/paragraphs/0": "An index definition can specify an operator class for each column of an index.", "/versions/11/sections/0/paragraphs/1": "The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).", "/versions/11/sections/0/paragraphs/2": "There are also some built-in operator classes besides the default ones:", "/versions/11/sections/1/paragraphs/0": "The non-default GIN operator class jsonb_path_ops supports indexing the @> operator only. An example of creating an index with this operator class is:", "/versions/11/sections/1/paragraphs/1": "Although the jsonb_path_ops operator class supports only queries with the @> operator, it has notable performance advantages over the default operator class jsonb_ops . A jsonb_path_ops index is usually much smaller than a jsonb_ops index over the same data, and the specificity of searches is better, particularly when queries contain keys that appear frequently in the data. Therefore search operations typically perform better than with the default operator class.", "/versions/11/sections/1/paragraphs/2": "The technical difference between a jsonb_ops and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the data. [6] Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it; for example to index {\"foo\": {\"bar\": \"baz\"}} , a single index item would be created incorporating all three of foo , bar , and baz into the hash value. Thus a containment query looking for this structure would result in an extremely specific index search; but there is no way at all to find out whether foo appears as a key. On the other hand, a jsonb_ops index would create three index items representing foo , bar , and baz separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the equivalent jsonb_path_ops search, especially if there are a very large number of rows containing any single one of the three index items.", "/versions/11/sections/1/paragraphs/3": "A disadvantage of the jsonb_path_ops approach is that it produces no index entries for JSON structures not containing any values, such as {\"a\": {}} . If a search for documents containing such a structure is requested, it will require a full-index scan, which is quite slow. jsonb_path_ops is therefore ill-suited for applications that often perform such searches.", "/versions/11/sections/1/paragraphs/4": "Of the two operator classes for type jsonb , jsonb_ops is the default. jsonb_path_ops supports fewer operators but offers better performance for those operators. See Section 8.14.4 for details.", "/versions/11/tables/0/rows/0/purpose": "search", "/versions/11/tables/2/rows/0/default": "no", "/versions/11/tables/0/columns/0/label": "Operator overload", "/versions/11/tables/0/columns/1/label": "Strategy", "/versions/11/tables/0/columns/2/label": "Purpose", "/versions/11/tables/0/columns/3/label": "Ordering family", "/versions/11/tables/0/columns/4/label": "Membership scope", "/versions/11/tables/0/columns/5/label": "Source description", "/versions/11/tables/1/columns/0/label": "Support number", "/versions/11/tables/1/columns/1/label": "Left type", "/versions/11/tables/1/columns/2/label": "Right type", "/versions/11/tables/1/columns/3/label": "Function signature", "/versions/11/tables/1/columns/4/label": "Result type", "/versions/11/tables/2/columns/0/label": "Class", "/versions/11/tables/2/columns/1/label": "Input type", "/versions/11/tables/2/columns/2/label": "Key type", "/versions/11/tables/2/columns/3/label": "Default", "/versions/11/tables/0/rows/0/description": "contains", "/versions/11/tables/1/rows/1/result_type": "internal", "/versions/11/tables/1/rows/2/result_type": "internal"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "0520e028262d66189ed55ca7afa3765d193765628afd77da112e2d704275e61f", "canonical_center_text_hash": "2c97f9532b24e7828aa303e42e5593fa5b93d9fb46d54d39429ff7241119d0da"}, "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "comparison_data": {"kind": "family", "classes": [{"name": "jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb"}], "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "sort_family": ""}], "attributes": {"name": "jsonb_path_ops", "method": "gin"}, "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "char"}]}, "comparison_hash": "0a2874bff72a3f56a5a8a3d5a09f84444bd7680edfe09649390edec5a696f13a", "manual_language": "zh", "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "char"}], "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/11/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "12": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "family": {"name": "jsonb_path_ops", "method": "gin"}, "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=12", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=12", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=12", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=12", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=12", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "classes": [{"name": "jsonb_path_ops", "slug": "class-gin-jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb", "source_oid": "", "family_slug": "family-gin-jsonb_path_ops"}], "related": [{"url": "/wiki/indexam/gin/?v=12", "label": "GIN \u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "label": "12.22", "major": "12", "channel": "historical", "revision": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b", "source_sha256": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b", "manual_fingerprint": "535df36baec2140f211303631c0a3f64e02d2673b9d34cb050d247997c94bd1e", "catalog_fingerprint": "1f423fd3c5fb61c039f8814116ce19dedbb2804bc864599818e88cbc4f5f284a"}, "sources": [{"url": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, {"url": "/docs/12/indexes-opclass.html", "path": "indexes-opclass.html", "label": "PostgreSQL 12 English manual: indexes-opclass.html", "sha256": "bdd742eaf65ab7addb35aa56509afe244d63775521460a046bf76f50bc0389db"}, {"url": "/docs/12/catalog-pg-opfamily.html", "path": "catalog-pg-opfamily.html", "label": "PostgreSQL 12 English manual: catalog-pg-opfamily.html", "sha256": "75a570e54ddf195baf23b86b05e0409dabae1f98dd223f9ca028e70deb4f3435"}, {"url": "/docs/12/catalog-pg-amop.html", "path": "catalog-pg-amop.html", "label": "PostgreSQL 12 English manual: catalog-pg-amop.html", "sha256": "84b91a9d763b1fb2968cc8be226a0369d31a6acb2468eb56cfd0b8d2030d1b45"}, {"url": "/docs/12/catalog-pg-amproc.html", "path": "catalog-pg-amproc.html", "label": "PostgreSQL 12 English manual: catalog-pg-amproc.html", "sha256": "8fecd047164ac5772bb48770067c55ab89a810d2ee1686ed316738bc0c18e330"}, {"url": "/docs/12/datatype-json.html", "path": "datatype-json.html", "label": "PostgreSQL 12 English manual: datatype-json.html", "sha256": "eed123a5f22e2522a6e43ad67d67bef2f9f209b5d70da55a822b4dadd0e6848a"}, {"url": "/docs/12/gin-builtin-opclasses.html", "path": "gin-builtin-opclasses.html", "label": "PostgreSQL 12 English manual: gin-builtin-opclasses.html", "sha256": "befe434b89850bf26b9c93b550a88909e16887b58d43afee4563562c36dbc9b7"}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/12/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "12", "build_id": 65, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "9e99e81f1c125188bfc1f1d0a61066939ae3307e6311b04025d5cf658d2aa430", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "snapshot:sha256:86d2ff781f93e1de17122ebc514d5e64fcb63fed15941f496d7e146c6dcc7a49", "translated_from_revision": null}, "body_sha256": "e4cc6977e6c0e78ec0d4476786030eaab21e8bcb805fa277ae01e5b42e8d9707", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "facts_zh": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [6] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "center_zh": {"title": "gin/jsonb_path_ops (family)", "locale": "zh-Hans", "source": {"key": "family-gin-jsonb_path_ops", "locale": "zh-Hans", "version": "12", "text_hash": "3f6545cba3007e602f0b8afb275663e86b7d5b941e0e632525f940feb3b14fd8", "collection": "opclass", "dataset_hash": "7c31b524dfe136022d39a6ae8dcfac6b3bbd5f8fdaf422536599981252aff0c9", "source_database": "center", "source_revision": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "payload": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=12", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=12", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=12", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=12", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=12", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/12/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "12", "build_id": 65, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "9e99e81f1c125188bfc1f1d0a61066939ae3307e6311b04025d5cf658d2aa430", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "snapshot:sha256:86d2ff781f93e1de17122ebc514d5e64fcb63fed15941f496d7e146c6dcc7a49", "translated_from_revision": null}, "body_sha256": "e4cc6977e6c0e78ec0d4476786030eaab21e8bcb805fa277ae01e5b42e8d9707", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [6] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em class=\"firstterm\">\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code class=\"type\">int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code class=\"literal\">int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code class=\"type\">int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code class=\"literal\">COLLATE</code>\u3001<code class=\"literal\">ASC</code>/<code class=\"literal\">DESC</code> \u548c/\u6216 <code class=\"literal\">NULLS FIRST</code>/<code class=\"literal\">NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/12/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "version": "12", "link_map": {"/zh/docs/12/indexes-opclass.html": "/docs/12/indexes-opclass.html"}, "body_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/12/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "body_sha256": "fd486216c0f2c5f33e49bc55b2972b68d331c8e4dcdb593efccb32f99ab686fb", "content_hash": "3f6545cba3007e602f0b8afb275663e86b7d5b941e0e632525f940feb3b14fd8", "source_database": "center", "source_revision": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "description": "contains", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403e-jsonb-jsonb", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath exists", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403f-jsonb-jsonpath", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath match", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-4040-jsonb-jsonpath", "sort_family_slug": ""}], "signature": "gin/jsonb_path_ops", "tables_zh": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=12", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=12", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=12", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=12", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=12", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=12", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "source_oid": "4037", "description": ["jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002"], "sections_zh": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [6] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "localization": {"status": "complete", "sources": [{"url": "/docs/12/catalog-pg-amop.html", "method": "same-major semantic node", "sha256": "fb1485d72baa6293bbb9db509168fcb9e29aeb84d9eaa463046dffc10c6689ab", "language": "zh", "matched_nodes": ["#CATALOG-PG-AMOP/p[2]/em[1]"]}, {"url": "/docs/12/datatype-json.html", "method": "same-major semantic node", "sha256": "5a46150e3fb4bd47dd2a421735d2e7672c4368f9209446b850d6adbf92d51b7e", "language": "zh", "matched_nodes": ["#DATATYPE-JSON/div[19]/p[23]", "#DATATYPE-JSON/div[19]/p[24]", "#DATATYPE-JSON/div[19]/p[25]", "#DATATYPE-JSON/div[19]/p[5]"]}, {"url": "/docs/12/gin-builtin-opclasses.html", "method": "same-major semantic node", "sha256": "f3b3b2cebb135f95125fa8246dbbe29496a83d00555288cd45bce46a24075488", "language": "zh", "matched_nodes": ["#GIN-BUILTIN-OPCLASSES/p[4]"]}, {"url": "/docs/12/indexes-opclass.html", "method": "same-major semantic node", "sha256": "caf2c6c72b3142db3faa12936bdc35bae99e5144454f5c7391fc02cc93ba1cb1", "language": "zh", "matched_nodes": ["#INDEXES-OPCLASS/p[3]", "#INDEXES-OPCLASS/p[5]", "#INDEXES-OPCLASS/p[6]"]}, {"url": "/docs/12/xfunc-c.html", "method": "same-major semantic node", "sha256": "b25a73df45087a8fdc374e82b6439c1e121ac685f86ab05f852f86fb2d32f749", "language": "zh", "matched_nodes": ["#XFUNC-C/p[3]/span[1]/span[0]"]}], "language": "zh", "original_text": {"/versions/12/description/0": "GIN operator family containing 1 classes, 3 operator strategies and 5 support functions in this source build.", "/versions/12/facts/0/label": "Object kind", "/versions/12/facts/0/value": "Operator family", "/versions/12/facts/1/label": "Index AM", "/versions/12/tables/0/title": "Family operator strategies", "/versions/12/tables/1/title": "Family support functions", "/versions/12/tables/2/title": "Classes in this family", "/versions/12/related/0/label": "GIN Index AM", "/versions/12/sections/0/title": "Operator classes and families", "/versions/12/sections/1/title": "Specific manual guidance", "/versions/12/tables/0/rows/0/scope": "Family member", "/versions/12/tables/0/rows/1/scope": "Family member", "/versions/12/tables/0/rows/2/scope": "Family member", "/versions/12/sections/0/paragraphs/0": "An index definition can specify an operator class for each column of an index.", "/versions/12/sections/0/paragraphs/1": "The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).", "/versions/12/sections/0/paragraphs/2": "There are also some built-in operator classes besides the default ones:", "/versions/12/sections/1/paragraphs/0": "The non-default GIN operator class jsonb_path_ops does not support the key-exists operators, but it does support @> , @? and @@ . An example of creating an index with this operator class is:", "/versions/12/sections/1/paragraphs/1": "For these operators, a GIN index extracts clauses of the form accessors_chain = constant out of the jsonpath pattern, and does the index search based on the keys and values mentioned in these clauses. The accessors chain may include . key , [*] , and [ index ] accessors. The jsonb_ops operator class also supports .* and .** accessors, but the jsonb_path_ops operator class does not.", "/versions/12/sections/1/paragraphs/2": "Although the jsonb_path_ops operator class supports only queries with the @> , @? and @@ operators, it has notable performance advantages over the default operator class jsonb_ops . A jsonb_path_ops index is usually much smaller than a jsonb_ops index over the same data, and the specificity of searches is better, particularly when queries contain keys that appear frequently in the data. Therefore search operations typically perform better than with the default operator class.", "/versions/12/sections/1/paragraphs/3": "The technical difference between a jsonb_ops and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the data. [6] Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it; for example to index {\"foo\": {\"bar\": \"baz\"}} , a single index item would be created incorporating all three of foo , bar , and baz into the hash value. Thus a containment query looking for this structure would result in an extremely specific index search; but there is no way at all to find out whether foo appears as a key. On the other hand, a jsonb_ops index would create three index items representing foo , bar , and baz separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the equivalent jsonb_path_ops search, especially if there are a very large number of rows containing any single one of the three index items.", "/versions/12/sections/1/paragraphs/4": "A disadvantage of the jsonb_path_ops approach is that it produces no index entries for JSON structures not containing any values, such as {\"a\": {}} . If a search for documents containing such a structure is requested, it will require a full-index scan, which is quite slow. jsonb_path_ops is therefore ill-suited for applications that often perform such searches.", "/versions/12/sections/1/paragraphs/5": "Of the two operator classes for type jsonb , jsonb_ops is the default. jsonb_path_ops supports fewer operators but offers better performance for those operators. See Section 8.14.4 for details.", "/versions/12/tables/0/rows/0/purpose": "search", "/versions/12/tables/0/rows/1/purpose": "search", "/versions/12/tables/0/rows/2/purpose": "search", "/versions/12/tables/2/rows/0/default": "no", "/versions/12/tables/0/columns/0/label": "Operator overload", "/versions/12/tables/0/columns/1/label": "Strategy", "/versions/12/tables/0/columns/2/label": "Purpose", "/versions/12/tables/0/columns/3/label": "Ordering family", "/versions/12/tables/0/columns/4/label": "Membership scope", "/versions/12/tables/0/columns/5/label": "Source description", "/versions/12/tables/1/columns/0/label": "Support number", "/versions/12/tables/1/columns/1/label": "Left type", "/versions/12/tables/1/columns/2/label": "Right type", "/versions/12/tables/1/columns/3/label": "Function signature", "/versions/12/tables/1/columns/4/label": "Result type", "/versions/12/tables/2/columns/0/label": "Class", "/versions/12/tables/2/columns/1/label": "Input type", "/versions/12/tables/2/columns/2/label": "Key type", "/versions/12/tables/2/columns/3/label": "Default", "/versions/12/tables/0/rows/0/description": "contains", "/versions/12/tables/0/rows/1/description": "jsonpath exists", "/versions/12/tables/0/rows/2/description": "jsonpath match", "/versions/12/tables/1/rows/1/result_type": "internal", "/versions/12/tables/1/rows/2/result_type": "internal"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "75ca46c45dddcce87f59ad07d8fb2099451b1a3a63152e2efeb32b717ad7fea6", "canonical_center_text_hash": "3f6545cba3007e602f0b8afb275663e86b7d5b941e0e632525f940feb3b14fd8"}, "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "comparison_data": {"kind": "family", "classes": [{"name": "jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb"}], "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}], "attributes": {"name": "jsonb_path_ops", "method": "gin"}, "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "char"}]}, "comparison_hash": "75553622acc147519cf864610fd7eb6a8584d10e722fa3c8d4e03e6db4c3438f", "manual_language": "zh", "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "char"}], "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/12/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "13": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "family": {"name": "jsonb_path_ops", "method": "gin"}, "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=13", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=13", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=13", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=13", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=13", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "classes": [{"name": "jsonb_path_ops", "slug": "class-gin-jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb", "source_oid": "", "family_slug": "family-gin-jsonb_path_ops"}], "related": [{"url": "/wiki/indexam/gin/?v=13", "label": "GIN \u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "label": "13.23", "major": "13", "channel": "historical", "revision": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6", "source_sha256": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6", "manual_fingerprint": "2bbea71f4723fc9e4e58cfdb28368763f999de2800d45ade748f7c7546dfb9d3", "catalog_fingerprint": "df58d29b226fbb90326087233d7970032abdec1352373270449eeee324f84a35"}, "sources": [{"url": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, {"url": "/docs/13/indexes-opclass.html", "path": "indexes-opclass.html", "label": "PostgreSQL 13 English manual: indexes-opclass.html", "sha256": "37723d8b80464e32b69ead59eff6160555679eb963ab37c5c3a8a6cbae1b152b"}, {"url": "/docs/13/catalog-pg-opfamily.html", "path": "catalog-pg-opfamily.html", "label": "PostgreSQL 13 English manual: catalog-pg-opfamily.html", "sha256": "238c97d1b6b9532d52b4cd0cc25f2b48be0dc4f2909858a45553863e801a969d"}, {"url": "/docs/13/catalog-pg-amop.html", "path": "catalog-pg-amop.html", "label": "PostgreSQL 13 English manual: catalog-pg-amop.html", "sha256": "7a8e67f8dc59c305612c6d029fc8760c092f27203d5338c6db6c6d9b8aabc561"}, {"url": "/docs/13/catalog-pg-amproc.html", "path": "catalog-pg-amproc.html", "label": "PostgreSQL 13 English manual: catalog-pg-amproc.html", "sha256": "7304d151ac7c668be22d688c152e43989557f61455a75dc74f4660363e7ab9ef"}, {"url": "/docs/13/datatype-json.html", "path": "datatype-json.html", "label": "PostgreSQL 13 English manual: datatype-json.html", "sha256": "a6452914f728aa8ff8ff29c9d53dbd66ba8d7e18e5a7dc04c167c392becc39af"}, {"url": "/docs/13/gin-builtin-opclasses.html", "path": "gin-builtin-opclasses.html", "label": "PostgreSQL 13 English manual: gin-builtin-opclasses.html", "sha256": "9e7e21a7aa2263ef43dde52b86374b31814cba425e65bfeee8408f950d22bc89"}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/13/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "13", "build_id": 66, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "a0195016f729f1cf7c03c7c1344f2a62ff6b78f9a4eb1f299eab7720fd80182c", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "snapshot:sha256:a13a825c39f0268ef1cfe9137e283e38d0da73b2d7894f0733c7b26372a4f6a4", "translated_from_revision": null}, "body_sha256": "0669a3b8cc3e9a790fd5a367ceaf635c653eeab0d0af5e58f46da1932de25aec", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "facts_zh": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [6] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "center_zh": {"title": "gin/jsonb_path_ops (family)", "locale": "zh-Hans", "source": {"key": "family-gin-jsonb_path_ops", "locale": "zh-Hans", "version": "13", "text_hash": "85356da76a530e3d7ba8a3be35784159c51d5394e47f025a3187bee1e10b0c51", "collection": "opclass", "dataset_hash": "7c31b524dfe136022d39a6ae8dcfac6b3bbd5f8fdaf422536599981252aff0c9", "source_database": "center", "source_revision": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "payload": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=13", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=13", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=13", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=13", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=13", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/13/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "13", "build_id": 66, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "a0195016f729f1cf7c03c7c1344f2a62ff6b78f9a4eb1f299eab7720fd80182c", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "snapshot:sha256:a13a825c39f0268ef1cfe9137e283e38d0da73b2d7894f0733c7b26372a4f6a4", "translated_from_revision": null}, "body_sha256": "0669a3b8cc3e9a790fd5a367ceaf635c653eeab0d0af5e58f46da1932de25aec", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [6] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em class=\"firstterm\">\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code class=\"type\">int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code class=\"literal\">int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code class=\"type\">int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code class=\"literal\">COLLATE</code>\u3001<code class=\"literal\">ASC</code>/<code class=\"literal\">DESC</code> \u548c/\u6216 <code class=\"literal\">NULLS FIRST</code>/<code class=\"literal\">NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/13/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "version": "13", "link_map": {"/zh/docs/13/indexes-opclass.html": "/docs/13/indexes-opclass.html"}, "body_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/13/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "body_sha256": "6193074004b8dd885576b47da39d2b0c5fee051f707b8402494bcf2073bd0d23", "content_hash": "85356da76a530e3d7ba8a3be35784159c51d5394e47f025a3187bee1e10b0c51", "source_database": "center", "source_revision": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "description": "contains", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403e-jsonb-jsonb", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath exists", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403f-jsonb-jsonpath", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath match", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-4040-jsonb-jsonpath", "sort_family_slug": ""}], "signature": "gin/jsonb_path_ops", "tables_zh": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=13", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=13", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=13", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=13", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=13", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=13", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "source_oid": "4037", "description": ["jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002"], "sections_zh": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [6] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "localization": {"status": "complete", "sources": [{"url": "/docs/13/catalog-pg-amop.html", "method": "same-major semantic node", "sha256": "344df36a802a949f2a1e178d6708bf07012cd0daff6368987f59cab3023d2853", "language": "zh", "matched_nodes": ["#CATALOG-PG-AMOP/p[2]/em[1]"]}, {"url": "/docs/13/datatype-json.html", "method": "same-major semantic node", "sha256": "4f40d591dd48f8b5cb58a4f0af9b824d2b0b6dee2132a6a010128e4f9b64184b", "language": "zh", "matched_nodes": ["#DATATYPE-JSON/div[19]/p[23]", "#DATATYPE-JSON/div[19]/p[24]", "#DATATYPE-JSON/div[19]/p[25]", "#DATATYPE-JSON/div[19]/p[5]"]}, {"url": "/docs/13/gin-builtin-opclasses.html", "method": "same-major semantic node", "sha256": "2d265a4d5030e4a59cd2965f7db559dc7580db90d48310756c933ed80c3fee54", "language": "zh", "matched_nodes": ["#GIN-BUILTIN-OPCLASSES/p[4]"]}, {"url": "/docs/13/indexes-opclass.html", "method": "same-major semantic node", "sha256": "000af3648471325f388091b478e7d22683ce58bd59f5f9463c09b36504a22d3d", "language": "zh", "matched_nodes": ["#INDEXES-OPCLASS/p[3]", "#INDEXES-OPCLASS/p[5]", "#INDEXES-OPCLASS/p[6]"]}, {"url": "/docs/13/xfunc-c.html", "method": "same-major semantic node", "sha256": "095469efa3baa961b27032ae79fbe7a17909a3ff9341e854497b97168d4a1271", "language": "zh", "matched_nodes": ["#XFUNC-C/p[3]/span[1]/span[0]"]}], "language": "zh", "original_text": {"/versions/13/description/0": "GIN operator family containing 1 classes, 3 operator strategies and 5 support functions in this source build.", "/versions/13/facts/0/label": "Object kind", "/versions/13/facts/0/value": "Operator family", "/versions/13/facts/1/label": "Index AM", "/versions/13/tables/0/title": "Family operator strategies", "/versions/13/tables/1/title": "Family support functions", "/versions/13/tables/2/title": "Classes in this family", "/versions/13/related/0/label": "GIN Index AM", "/versions/13/sections/0/title": "Operator classes and families", "/versions/13/sections/1/title": "Specific manual guidance", "/versions/13/tables/0/rows/0/scope": "Family member", "/versions/13/tables/0/rows/1/scope": "Family member", "/versions/13/tables/0/rows/2/scope": "Family member", "/versions/13/sections/0/paragraphs/0": "An index definition can specify an operator class for each column of an index.", "/versions/13/sections/0/paragraphs/1": "The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).", "/versions/13/sections/0/paragraphs/2": "There are also some built-in operator classes besides the default ones:", "/versions/13/sections/1/paragraphs/0": "The non-default GIN operator class jsonb_path_ops does not support the key-exists operators, but it does support @> , @? and @@ . An example of creating an index with this operator class is:", "/versions/13/sections/1/paragraphs/1": "For these operators, a GIN index extracts clauses of the form accessors_chain = constant out of the jsonpath pattern, and does the index search based on the keys and values mentioned in these clauses. The accessors chain may include . key , [*] , and [ index ] accessors. The jsonb_ops operator class also supports .* and .** accessors, but the jsonb_path_ops operator class does not.", "/versions/13/sections/1/paragraphs/2": "Although the jsonb_path_ops operator class supports only queries with the @> , @? and @@ operators, it has notable performance advantages over the default operator class jsonb_ops . A jsonb_path_ops index is usually much smaller than a jsonb_ops index over the same data, and the specificity of searches is better, particularly when queries contain keys that appear frequently in the data. Therefore search operations typically perform better than with the default operator class.", "/versions/13/sections/1/paragraphs/3": "The technical difference between a jsonb_ops and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the data. [6] Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it; for example to index {\"foo\": {\"bar\": \"baz\"}} , a single index item would be created incorporating all three of foo , bar , and baz into the hash value. Thus a containment query looking for this structure would result in an extremely specific index search; but there is no way at all to find out whether foo appears as a key. On the other hand, a jsonb_ops index would create three index items representing foo , bar , and baz separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the equivalent jsonb_path_ops search, especially if there are a very large number of rows containing any single one of the three index items.", "/versions/13/sections/1/paragraphs/4": "A disadvantage of the jsonb_path_ops approach is that it produces no index entries for JSON structures not containing any values, such as {\"a\": {}} . If a search for documents containing such a structure is requested, it will require a full-index scan, which is quite slow. jsonb_path_ops is therefore ill-suited for applications that often perform such searches.", "/versions/13/sections/1/paragraphs/5": "Of the two operator classes for type jsonb , jsonb_ops is the default. jsonb_path_ops supports fewer operators but offers better performance for those operators. See Section 8.14.4 for details.", "/versions/13/tables/0/rows/0/purpose": "search", "/versions/13/tables/0/rows/1/purpose": "search", "/versions/13/tables/0/rows/2/purpose": "search", "/versions/13/tables/2/rows/0/default": "no", "/versions/13/tables/0/columns/0/label": "Operator overload", "/versions/13/tables/0/columns/1/label": "Strategy", "/versions/13/tables/0/columns/2/label": "Purpose", "/versions/13/tables/0/columns/3/label": "Ordering family", "/versions/13/tables/0/columns/4/label": "Membership scope", "/versions/13/tables/0/columns/5/label": "Source description", "/versions/13/tables/1/columns/0/label": "Support number", "/versions/13/tables/1/columns/1/label": "Left type", "/versions/13/tables/1/columns/2/label": "Right type", "/versions/13/tables/1/columns/3/label": "Function signature", "/versions/13/tables/1/columns/4/label": "Result type", "/versions/13/tables/2/columns/0/label": "Class", "/versions/13/tables/2/columns/1/label": "Input type", "/versions/13/tables/2/columns/2/label": "Key type", "/versions/13/tables/2/columns/3/label": "Default", "/versions/13/tables/0/rows/0/description": "contains", "/versions/13/tables/0/rows/1/description": "jsonpath exists", "/versions/13/tables/0/rows/2/description": "jsonpath match", "/versions/13/tables/1/rows/1/result_type": "internal", "/versions/13/tables/1/rows/2/result_type": "internal"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "a583d1e6389f1866d2967eb72d699308ebe7e0bd2b2f3f928e9478feba98df67", "canonical_center_text_hash": "85356da76a530e3d7ba8a3be35784159c51d5394e47f025a3187bee1e10b0c51"}, "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "comparison_data": {"kind": "family", "classes": [{"name": "jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb"}], "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}], "attributes": {"name": "jsonb_path_ops", "method": "gin"}, "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "char"}]}, "comparison_hash": "75553622acc147519cf864610fd7eb6a8584d10e722fa3c8d4e03e6db4c3438f", "manual_language": "zh", "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "char"}], "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/13/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "14": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "family": {"name": "jsonb_path_ops", "method": "gin"}, "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=14", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=14", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=14", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=14", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=14", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "classes": [{"name": "jsonb_path_ops", "slug": "class-gin-jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb", "source_oid": "", "family_slug": "family-gin-jsonb_path_ops"}], "related": [{"url": "/wiki/indexam/gin/?v=14", "label": "GIN \u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "label": "14.24", "major": "14", "channel": "stable", "revision": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897", "source_sha256": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897", "manual_fingerprint": "1d055c6dc55d4defe2b6e9d0f842a47005487b21025b67e51d06721d3c122f71", "catalog_fingerprint": "9e0116f26e5ce870719efb77ef7b73e30c7928f8af27cbe87fdea32efe3811ef"}, "sources": [{"url": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, {"url": "/docs/14/indexes-opclass.html", "path": "indexes-opclass.html", "label": "PostgreSQL 14 English manual: indexes-opclass.html", "sha256": "b7e355fb7c1e6fe473dc70d4c7e73cd3aa9a11dddd2e32ece5e8effbdb910c0b"}, {"url": "/docs/14/catalog-pg-opfamily.html", "path": "catalog-pg-opfamily.html", "label": "PostgreSQL 14 English manual: catalog-pg-opfamily.html", "sha256": "8a0b55015a6e8f90326f0526570b3bbca00a06a3c1ca142b8324528b60112c4f"}, {"url": "/docs/14/catalog-pg-amop.html", "path": "catalog-pg-amop.html", "label": "PostgreSQL 14 English manual: catalog-pg-amop.html", "sha256": "402b87d7fb1a313b096ba5349a676ae38d507e2eb98739d6ed7f0681e0b9a9a4"}, {"url": "/docs/14/catalog-pg-amproc.html", "path": "catalog-pg-amproc.html", "label": "PostgreSQL 14 English manual: catalog-pg-amproc.html", "sha256": "5b918a7eba7592dc13a32a8fcbb7ca0a198d8f4d2b8a85b3c7befbc7705d44a1"}, {"url": "/docs/14/datatype-json.html", "path": "datatype-json.html", "label": "PostgreSQL 14 English manual: datatype-json.html", "sha256": "c461b64f4aed3106b17fcd5e6f468661fd02a44ce1961b52c422e9ed99b7049d"}, {"url": "/docs/14/gin-builtin-opclasses.html", "path": "gin-builtin-opclasses.html", "label": "PostgreSQL 14 English manual: gin-builtin-opclasses.html", "sha256": "5c20ab7bc41145686b6209e8b76a72044d3a60dbbe0cc2d1d8359fdced685d47"}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/14/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "14", "build_id": 99, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "503c4861e6fb3e17851c6c632abd4dbe3987258ed746ad484a08f199d2add809", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:87e6aa4fd6e1ec85c5f4a6de4f5647cfd9e5de734ca2c266d32b6d6192c662ef", "translated_from_revision": null}, "body_sha256": "e62a284d0572e38918104e916e02325351d359464e65a1cdf6b5bb7e2ed20bc9", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "facts_zh": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "center_zh": {"title": "gin/jsonb_path_ops (family)", "locale": "zh-Hans", "source": {"key": "family-gin-jsonb_path_ops", "locale": "zh-Hans", "version": "14", "text_hash": "752092fabdc4aedcf76daba4a572db86fd2c0bc6e06b687622bac090f9c32457", "collection": "opclass", "dataset_hash": "7c31b524dfe136022d39a6ae8dcfac6b3bbd5f8fdaf422536599981252aff0c9", "source_database": "center", "source_revision": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "payload": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=14", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=14", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=14", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=14", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=14", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/14/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "14", "build_id": 99, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "503c4861e6fb3e17851c6c632abd4dbe3987258ed746ad484a08f199d2add809", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:87e6aa4fd6e1ec85c5f4a6de4f5647cfd9e5de734ca2c266d32b6d6192c662ef", "translated_from_revision": null}, "body_sha256": "e62a284d0572e38918104e916e02325351d359464e65a1cdf6b5bb7e2ed20bc9", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em class=\"firstterm\">\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code class=\"type\">int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code class=\"literal\">int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code class=\"type\">int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code class=\"literal\">COLLATE</code>\u3001<code class=\"literal\">ASC</code>/<code class=\"literal\">DESC</code> \u548c/\u6216 <code class=\"literal\">NULLS FIRST</code>/<code class=\"literal\">NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/14/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "version": "14", "link_map": {"/zh/docs/14/indexes-opclass.html": "/docs/14/indexes-opclass.html"}, "body_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/14/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "body_sha256": "0d49e30cd63323c81ead4711729f10bbe435c663b860dfe3174f2fd318426845", "content_hash": "752092fabdc4aedcf76daba4a572db86fd2c0bc6e06b687622bac090f9c32457", "source_database": "center", "source_revision": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "description": "contains", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403e-jsonb-jsonb", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath exists", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403f-jsonb-jsonpath", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath match", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-4040-jsonb-jsonpath", "sort_family_slug": ""}], "signature": "gin/jsonb_path_ops", "tables_zh": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=14", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=14", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=14", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=14", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=14", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=14", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "source_oid": "4037", "description": ["jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002"], "sections_zh": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "localization": {"status": "complete", "sources": [{"url": "/docs/14/catalog-pg-amop.html", "method": "same-major semantic node", "sha256": "2b8fdc15654f6701ab77bdf068a2c3b50cadd8da3bce8f385811b4193b4952b4", "language": "zh", "matched_nodes": ["#CATALOG-PG-AMOP/p[2]/em[1]"]}, {"url": "/docs/14/datatype-json.html", "method": "same-major semantic node", "sha256": "6caaf22252a97833322c667923644122c2e880284c9f623b4ccbad4929b6ce66", "language": "zh", "matched_nodes": ["#DATATYPE-JSON/div[19]/p[23]", "#DATATYPE-JSON/div[19]/p[24]", "#DATATYPE-JSON/div[19]/p[25]", "#DATATYPE-JSON/div[19]/p[5]"]}, {"url": "/docs/14/gin-builtin-opclasses.html", "method": "same-major semantic node", "sha256": "97d491ea24c76743e59dc65d80c3e4e2f9e14c09e3612c627d9c622439e4f4a7", "language": "zh", "matched_nodes": ["#GIN-BUILTIN-OPCLASSES/p[4]"]}, {"url": "/docs/14/indexes-opclass.html", "method": "same-major semantic node", "sha256": "4cb8380e551ee45907962594be66e8173948c404caa5f227b1672e5d298bd128", "language": "zh", "matched_nodes": ["#INDEXES-OPCLASS/p[3]", "#INDEXES-OPCLASS/p[5]", "#INDEXES-OPCLASS/p[6]"]}, {"url": "/docs/14/xfunc-c.html", "method": "same-major semantic node", "sha256": "2fbd11bbae7ab2425c4de4cb1fc3f8b0c29c45b2e6551bb486931806474d2dfe", "language": "zh", "matched_nodes": ["#XFUNC-C/p[3]/span[1]/span[0]"]}], "language": "zh", "original_text": {"/versions/14/description/0": "GIN operator family containing 1 classes, 3 operator strategies and 5 support functions in this source build.", "/versions/14/facts/0/label": "Object kind", "/versions/14/facts/0/value": "Operator family", "/versions/14/facts/1/label": "Index AM", "/versions/14/tables/0/title": "Family operator strategies", "/versions/14/tables/1/title": "Family support functions", "/versions/14/tables/2/title": "Classes in this family", "/versions/14/related/0/label": "GIN Index AM", "/versions/14/sections/0/title": "Operator classes and families", "/versions/14/sections/1/title": "Specific manual guidance", "/versions/14/tables/0/rows/0/scope": "Family member", "/versions/14/tables/0/rows/1/scope": "Family member", "/versions/14/tables/0/rows/2/scope": "Family member", "/versions/14/sections/0/paragraphs/0": "An index definition can specify an operator class for each column of an index.", "/versions/14/sections/0/paragraphs/1": "The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).", "/versions/14/sections/0/paragraphs/2": "There are also some built-in operator classes besides the default ones:", "/versions/14/sections/1/paragraphs/0": "The non-default GIN operator class jsonb_path_ops does not support the key-exists operators, but it does support @> , @? and @@ . An example of creating an index with this operator class is:", "/versions/14/sections/1/paragraphs/1": "For these operators, a GIN index extracts clauses of the form accessors_chain = constant out of the jsonpath pattern, and does the index search based on the keys and values mentioned in these clauses. The accessors chain may include . key , [*] , and [ index ] accessors. The jsonb_ops operator class also supports .* and .** accessors, but the jsonb_path_ops operator class does not.", "/versions/14/sections/1/paragraphs/2": "Although the jsonb_path_ops operator class supports only queries with the @> , @? and @@ operators, it has notable performance advantages over the default operator class jsonb_ops . A jsonb_path_ops index is usually much smaller than a jsonb_ops index over the same data, and the specificity of searches is better, particularly when queries contain keys that appear frequently in the data. Therefore search operations typically perform better than with the default operator class.", "/versions/14/sections/1/paragraphs/3": "The technical difference between a jsonb_ops and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the data. [7] Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it; for example to index {\"foo\": {\"bar\": \"baz\"}} , a single index item would be created incorporating all three of foo , bar , and baz into the hash value. Thus a containment query looking for this structure would result in an extremely specific index search; but there is no way at all to find out whether foo appears as a key. On the other hand, a jsonb_ops index would create three index items representing foo , bar , and baz separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the equivalent jsonb_path_ops search, especially if there are a very large number of rows containing any single one of the three index items.", "/versions/14/sections/1/paragraphs/4": "A disadvantage of the jsonb_path_ops approach is that it produces no index entries for JSON structures not containing any values, such as {\"a\": {}} . If a search for documents containing such a structure is requested, it will require a full-index scan, which is quite slow. jsonb_path_ops is therefore ill-suited for applications that often perform such searches.", "/versions/14/sections/1/paragraphs/5": "Of the two operator classes for type jsonb , jsonb_ops is the default. jsonb_path_ops supports fewer operators but offers better performance for those operators. See Section 8.14.4 for details.", "/versions/14/tables/0/rows/0/purpose": "search", "/versions/14/tables/0/rows/1/purpose": "search", "/versions/14/tables/0/rows/2/purpose": "search", "/versions/14/tables/2/rows/0/default": "no", "/versions/14/tables/0/columns/0/label": "Operator overload", "/versions/14/tables/0/columns/1/label": "Strategy", "/versions/14/tables/0/columns/2/label": "Purpose", "/versions/14/tables/0/columns/3/label": "Ordering family", "/versions/14/tables/0/columns/4/label": "Membership scope", "/versions/14/tables/0/columns/5/label": "Source description", "/versions/14/tables/1/columns/0/label": "Support number", "/versions/14/tables/1/columns/1/label": "Left type", "/versions/14/tables/1/columns/2/label": "Right type", "/versions/14/tables/1/columns/3/label": "Function signature", "/versions/14/tables/1/columns/4/label": "Result type", "/versions/14/tables/2/columns/0/label": "Class", "/versions/14/tables/2/columns/1/label": "Input type", "/versions/14/tables/2/columns/2/label": "Key type", "/versions/14/tables/2/columns/3/label": "Default", "/versions/14/tables/0/rows/0/description": "contains", "/versions/14/tables/0/rows/1/description": "jsonpath exists", "/versions/14/tables/0/rows/2/description": "jsonpath match", "/versions/14/tables/1/rows/1/result_type": "internal", "/versions/14/tables/1/rows/2/result_type": "internal"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "037ae76d99c0d8f838fa5bd7da8c0b813e3338a8814d227a134dcedd18c3e984", "canonical_center_text_hash": "752092fabdc4aedcf76daba4a572db86fd2c0bc6e06b687622bac090f9c32457"}, "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "comparison_data": {"kind": "family", "classes": [{"name": "jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb"}], "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}], "attributes": {"name": "jsonb_path_ops", "method": "gin"}, "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "char"}]}, "comparison_hash": "75553622acc147519cf864610fd7eb6a8584d10e722fa3c8d4e03e6db4c3438f", "manual_language": "zh", "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "char"}], "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/14/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "15": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "family": {"name": "jsonb_path_ops", "method": "gin"}, "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=15", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=15", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=15", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=15", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=15", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "classes": [{"name": "jsonb_path_ops", "slug": "class-gin-jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb", "source_oid": "", "family_slug": "family-gin-jsonb_path_ops"}], "related": [{"url": "/wiki/indexam/gin/?v=15", "label": "GIN \u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "label": "15.19", "major": "15", "channel": "stable", "revision": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89", "source_sha256": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89", "manual_fingerprint": "f39c61e9facb5b9404c7d6d1cf494d83af0cc46146554a7fc40724eb882d24a9", "catalog_fingerprint": "1c332a5ccec7bfdd8ca19b55a0279b5bd6cb1dd5dcc6c5587a98a491a9b566a5"}, "sources": [{"url": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, {"url": "/docs/15/indexes-opclass.html", "path": "indexes-opclass.html", "label": "PostgreSQL 15 English manual: indexes-opclass.html", "sha256": "57685c0a60cb570754be680551a6947556a03b6ff16a4a511483bdcac143c6da"}, {"url": "/docs/15/catalog-pg-opfamily.html", "path": "catalog-pg-opfamily.html", "label": "PostgreSQL 15 English manual: catalog-pg-opfamily.html", "sha256": "f64fe11b448841cb4016489062de017e275de583a429b06c1824f545835ef300"}, {"url": "/docs/15/catalog-pg-amop.html", "path": "catalog-pg-amop.html", "label": "PostgreSQL 15 English manual: catalog-pg-amop.html", "sha256": "53ced8770f19710869151ab02a9a6f0d97380981ca4bfe83752092bfb74a9e0c"}, {"url": "/docs/15/catalog-pg-amproc.html", "path": "catalog-pg-amproc.html", "label": "PostgreSQL 15 English manual: catalog-pg-amproc.html", "sha256": "cdcce97c140ef4b73e0abc870c6a7f0d8ebda9f31d4c02b3f5444f50828d7f37"}, {"url": "/docs/15/datatype-json.html", "path": "datatype-json.html", "label": "PostgreSQL 15 English manual: datatype-json.html", "sha256": "e1417cc3494afd00fc835ca1cefb6b097138828baff7b822b171ff372d030b81"}, {"url": "/docs/15/gin-builtin-opclasses.html", "path": "gin-builtin-opclasses.html", "label": "PostgreSQL 15 English manual: gin-builtin-opclasses.html", "sha256": "72e7dbe7933ab0a1dfe69d39080716ff737ff6e3614735d73e92ebcb80c94cd8"}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/15/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "15", "build_id": 101, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "5b72836e9b884335c4bec570b7b91e0389688f21b43f97a096ce39dbc50fcd50", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:6bce1a2df9170cb1146a1411c5547190856638221a6539e618ee1016c9f493ad", "translated_from_revision": null}, "body_sha256": "fadbdc31473eba467ec0bd4bf317c73598fe9587e12c25854df9ee2ae6718ede", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "facts_zh": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "center_zh": {"title": "gin/jsonb_path_ops (family)", "locale": "zh-Hans", "source": {"key": "family-gin-jsonb_path_ops", "locale": "zh-Hans", "version": "15", "text_hash": "729a5fd973733380fd944ba899fac74ebffd6b8c6dc687164f895262d04e1659", "collection": "opclass", "dataset_hash": "7c31b524dfe136022d39a6ae8dcfac6b3bbd5f8fdaf422536599981252aff0c9", "source_database": "center", "source_revision": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "payload": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=15", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=15", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=15", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=15", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=15", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/15/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "15", "build_id": 101, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "5b72836e9b884335c4bec570b7b91e0389688f21b43f97a096ce39dbc50fcd50", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:6bce1a2df9170cb1146a1411c5547190856638221a6539e618ee1016c9f493ad", "translated_from_revision": null}, "body_sha256": "fadbdc31473eba467ec0bd4bf317c73598fe9587e12c25854df9ee2ae6718ede", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em class=\"firstterm\">\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code class=\"type\">int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code class=\"literal\">int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code class=\"type\">int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code class=\"literal\">COLLATE</code>\u3001<code class=\"literal\">ASC</code>/<code class=\"literal\">DESC</code> \u548c/\u6216 <code class=\"literal\">NULLS FIRST</code>/<code class=\"literal\">NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/15/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "version": "15", "link_map": {"/zh/docs/15/indexes-opclass.html": "/docs/15/indexes-opclass.html"}, "body_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/15/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "body_sha256": "8b97c18015b2dd8fefa1c1213eda807bbbee26ce9086854c4523c69a8135fcb5", "content_hash": "729a5fd973733380fd944ba899fac74ebffd6b8c6dc687164f895262d04e1659", "source_database": "center", "source_revision": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "description": "contains", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403e-jsonb-jsonb", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath exists", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403f-jsonb-jsonpath", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath match", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-4040-jsonb-jsonpath", "sort_family_slug": ""}], "signature": "gin/jsonb_path_ops", "tables_zh": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=15", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=15", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=15", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=15", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=15", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=15", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "source_oid": "4037", "description": ["jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002"], "sections_zh": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "localization": {"status": "complete", "sources": [{"url": "/docs/15/catalog-pg-amop.html", "method": "same-major semantic node", "sha256": "722b907f43f8178f67214192f7587c04c86bbab3759c44150d611dead287836f", "language": "zh", "matched_nodes": ["#CATALOG-PG-AMOP/p[2]/em[1]"]}, {"url": "/docs/15/datatype-json.html", "method": "same-major semantic node", "sha256": "1de5ac3fcff666e4a6ac070ff5320df19ce2a518ff29c894afc9071d51b938ff", "language": "zh", "matched_nodes": ["#DATATYPE-JSON/div[19]/p[23]", "#DATATYPE-JSON/div[19]/p[24]", "#DATATYPE-JSON/div[19]/p[25]", "#DATATYPE-JSON/div[19]/p[5]"]}, {"url": "/docs/15/gin-builtin-opclasses.html", "method": "same-major semantic node", "sha256": "0678d38bb6bf9030faf827b7ffbe1f49735af7b6790bebf914b22a6f8d63d2b3", "language": "zh", "matched_nodes": ["#GIN-BUILTIN-OPCLASSES/p[4]"]}, {"url": "/docs/15/indexes-opclass.html", "method": "same-major semantic node", "sha256": "99e792c28f2215316661a351044aa90cd191477d266005d4849696ce85bb89ed", "language": "zh", "matched_nodes": ["#INDEXES-OPCLASS/p[3]", "#INDEXES-OPCLASS/p[5]", "#INDEXES-OPCLASS/p[6]"]}, {"url": "/docs/15/xfunc-c.html", "method": "same-major semantic node", "sha256": "525a67d45851e1ac7a414aeb9e309bc6f6ccd6c93cc6c70954c06bdb0e5279bd", "language": "zh", "matched_nodes": ["#XFUNC-C/p[3]/span[1]/span[0]"]}], "language": "zh", "original_text": {"/versions/15/description/0": "GIN operator family containing 1 classes, 3 operator strategies and 5 support functions in this source build.", "/versions/15/facts/0/label": "Object kind", "/versions/15/facts/0/value": "Operator family", "/versions/15/facts/1/label": "Index AM", "/versions/15/tables/0/title": "Family operator strategies", "/versions/15/tables/1/title": "Family support functions", "/versions/15/tables/2/title": "Classes in this family", "/versions/15/related/0/label": "GIN Index AM", "/versions/15/sections/0/title": "Operator classes and families", "/versions/15/sections/1/title": "Specific manual guidance", "/versions/15/tables/0/rows/0/scope": "Family member", "/versions/15/tables/0/rows/1/scope": "Family member", "/versions/15/tables/0/rows/2/scope": "Family member", "/versions/15/sections/0/paragraphs/0": "An index definition can specify an operator class for each column of an index.", "/versions/15/sections/0/paragraphs/1": "The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).", "/versions/15/sections/0/paragraphs/2": "There are also some built-in operator classes besides the default ones:", "/versions/15/sections/1/paragraphs/0": "The non-default GIN operator class jsonb_path_ops does not support the key-exists operators, but it does support @> , @? and @@ . An example of creating an index with this operator class is:", "/versions/15/sections/1/paragraphs/1": "For these operators, a GIN index extracts clauses of the form accessors_chain = constant out of the jsonpath pattern, and does the index search based on the keys and values mentioned in these clauses. The accessors chain may include . key , [*] , and [ index ] accessors. The jsonb_ops operator class also supports .* and .** accessors, but the jsonb_path_ops operator class does not.", "/versions/15/sections/1/paragraphs/2": "Although the jsonb_path_ops operator class supports only queries with the @> , @? and @@ operators, it has notable performance advantages over the default operator class jsonb_ops . A jsonb_path_ops index is usually much smaller than a jsonb_ops index over the same data, and the specificity of searches is better, particularly when queries contain keys that appear frequently in the data. Therefore search operations typically perform better than with the default operator class.", "/versions/15/sections/1/paragraphs/3": "The technical difference between a jsonb_ops and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the data. [7] Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it; for example to index {\"foo\": {\"bar\": \"baz\"}} , a single index item would be created incorporating all three of foo , bar , and baz into the hash value. Thus a containment query looking for this structure would result in an extremely specific index search; but there is no way at all to find out whether foo appears as a key. On the other hand, a jsonb_ops index would create three index items representing foo , bar , and baz separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the equivalent jsonb_path_ops search, especially if there are a very large number of rows containing any single one of the three index items.", "/versions/15/sections/1/paragraphs/4": "A disadvantage of the jsonb_path_ops approach is that it produces no index entries for JSON structures not containing any values, such as {\"a\": {}} . If a search for documents containing such a structure is requested, it will require a full-index scan, which is quite slow. jsonb_path_ops is therefore ill-suited for applications that often perform such searches.", "/versions/15/sections/1/paragraphs/5": "Of the two operator classes for type jsonb , jsonb_ops is the default. jsonb_path_ops supports fewer operators but offers better performance for those operators. See Section 8.14.4 for details.", "/versions/15/tables/0/rows/0/purpose": "search", "/versions/15/tables/0/rows/1/purpose": "search", "/versions/15/tables/0/rows/2/purpose": "search", "/versions/15/tables/2/rows/0/default": "no", "/versions/15/tables/0/columns/0/label": "Operator overload", "/versions/15/tables/0/columns/1/label": "Strategy", "/versions/15/tables/0/columns/2/label": "Purpose", "/versions/15/tables/0/columns/3/label": "Ordering family", "/versions/15/tables/0/columns/4/label": "Membership scope", "/versions/15/tables/0/columns/5/label": "Source description", "/versions/15/tables/1/columns/0/label": "Support number", "/versions/15/tables/1/columns/1/label": "Left type", "/versions/15/tables/1/columns/2/label": "Right type", "/versions/15/tables/1/columns/3/label": "Function signature", "/versions/15/tables/1/columns/4/label": "Result type", "/versions/15/tables/2/columns/0/label": "Class", "/versions/15/tables/2/columns/1/label": "Input type", "/versions/15/tables/2/columns/2/label": "Key type", "/versions/15/tables/2/columns/3/label": "Default", "/versions/15/tables/0/rows/0/description": "contains", "/versions/15/tables/0/rows/1/description": "jsonpath exists", "/versions/15/tables/0/rows/2/description": "jsonpath match", "/versions/15/tables/1/rows/1/result_type": "internal", "/versions/15/tables/1/rows/2/result_type": "internal"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "d439b0f402cd3a80435ee7ae1d13bc07a12a279ad2283784c9e5ef4b57300691", "canonical_center_text_hash": "729a5fd973733380fd944ba899fac74ebffd6b8c6dc687164f895262d04e1659"}, "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "comparison_data": {"kind": "family", "classes": [{"name": "jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb"}], "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}], "attributes": {"name": "jsonb_path_ops", "method": "gin"}, "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "char"}]}, "comparison_hash": "75553622acc147519cf864610fd7eb6a8584d10e722fa3c8d4e03e6db4c3438f", "manual_language": "zh", "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "char"}], "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/15/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "16": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "family": {"name": "jsonb_path_ops", "method": "gin"}, "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=16", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=16", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=16", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=16", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=16", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "classes": [{"name": "jsonb_path_ops", "slug": "class-gin-jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb", "source_oid": "", "family_slug": "family-gin-jsonb_path_ops"}], "related": [{"url": "/wiki/indexam/gin/?v=16", "label": "GIN \u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "label": "16.15", "major": "16", "channel": "stable", "revision": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed", "source_sha256": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed", "manual_fingerprint": "846fb006e9d590387203c1c65f671240bc5c30604c4e3084cf572817aacc19d0", "catalog_fingerprint": "70797d889dd8aeed77ae81092f99ab380e1109b54b0b7ca6fbf400e0a2111a70"}, "sources": [{"url": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, {"url": "/docs/16/indexes-opclass.html", "path": "indexes-opclass.html", "label": "PostgreSQL 16 English manual: indexes-opclass.html", "sha256": "a524c924c56d14615e7ea68aaaddd7c62abf7d153a0e291c191e0f4e962ffbae"}, {"url": "/docs/16/catalog-pg-opfamily.html", "path": "catalog-pg-opfamily.html", "label": "PostgreSQL 16 English manual: catalog-pg-opfamily.html", "sha256": "71b9139e78f463b6d1146ecc748e9142aedb70d82e003d27b43e95d9b6108b9d"}, {"url": "/docs/16/catalog-pg-amop.html", "path": "catalog-pg-amop.html", "label": "PostgreSQL 16 English manual: catalog-pg-amop.html", "sha256": "f580ac4a34d5f9d567834684e0c41b7df32a952e20a2fc11a9ce0964c2df7e9a"}, {"url": "/docs/16/catalog-pg-amproc.html", "path": "catalog-pg-amproc.html", "label": "PostgreSQL 16 English manual: catalog-pg-amproc.html", "sha256": "ce78e17af3e627c9f4a1b517d77b8eb2e071ba2e963f8b196bf9535ca98c388a"}, {"url": "/docs/16/datatype-json.html", "path": "datatype-json.html", "label": "PostgreSQL 16 English manual: datatype-json.html", "sha256": "90f19f79719396642cc87897deba8954c9ec9533a01cb8bb49823f5690886dfb"}, {"url": "/docs/16/gin-builtin-opclasses.html", "path": "gin-builtin-opclasses.html", "label": "PostgreSQL 16 English manual: gin-builtin-opclasses.html", "sha256": "02531d19f7da2f5b910421dad412cc1f966134bf4253369fc88a2528076156e1"}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/16/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "16", "build_id": 103, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "995f7336b416c1d12be62a7bba561733a2c46a1cf7150e83016556887dbb439d", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:80579a071736780f9c4022bb5148e1fb1256f1a33591306af67816e9e9bf3a9b", "translated_from_revision": null}, "body_sha256": "c3ce23fabce644bf893aed25b9e2bc7346ff45db626a9882cb345474ee7a65ae", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "facts_zh": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "center_zh": {"title": "gin/jsonb_path_ops (family)", "locale": "zh-Hans", "source": {"key": "family-gin-jsonb_path_ops", "locale": "zh-Hans", "version": "16", "text_hash": "b02349cdbde5d0a54e96e924f427401ef6be8e89afe95d09ec7c1ee623c6ceca", "collection": "opclass", "dataset_hash": "7c31b524dfe136022d39a6ae8dcfac6b3bbd5f8fdaf422536599981252aff0c9", "source_database": "center", "source_revision": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "payload": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=16", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=16", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=16", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=16", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=16", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/16/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "16", "build_id": 103, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "995f7336b416c1d12be62a7bba561733a2c46a1cf7150e83016556887dbb439d", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:80579a071736780f9c4022bb5148e1fb1256f1a33591306af67816e9e9bf3a9b", "translated_from_revision": null}, "body_sha256": "c3ce23fabce644bf893aed25b9e2bc7346ff45db626a9882cb345474ee7a65ae", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em class=\"firstterm\">\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code class=\"type\">int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code class=\"literal\">int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code class=\"type\">int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code class=\"literal\">COLLATE</code>\u3001<code class=\"literal\">ASC</code>/<code class=\"literal\">DESC</code> \u548c/\u6216 <code class=\"literal\">NULLS FIRST</code>/<code class=\"literal\">NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/16/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "version": "16", "link_map": {"/zh/docs/16/indexes-opclass.html": "/docs/16/indexes-opclass.html"}, "body_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/16/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "body_sha256": "57da04aeaa8e0a2993163271808c701afde69c3a31c07988754a5118ebf35e24", "content_hash": "b02349cdbde5d0a54e96e924f427401ef6be8e89afe95d09ec7c1ee623c6ceca", "source_database": "center", "source_revision": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "description": "contains", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403e-jsonb-jsonb", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath exists", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403f-jsonb-jsonpath", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath match", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-4040-jsonb-jsonpath", "sort_family_slug": ""}], "signature": "gin/jsonb_path_ops", "tables_zh": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=16", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=16", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=16", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=16", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=16", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=16", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "source_oid": "4037", "description": ["jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002"], "sections_zh": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain = constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002", "\u5728\u7528\u4e8e\u7c7b\u578b jsonb \u7684\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u4e2d\uff0c jsonb_ops \u662f\u9ed8\u8ba4\u9879\u3002 jsonb_path_ops \u652f\u6301\u7684\u64cd\u4f5c\u7b26\u8f83\u5c11\uff0c\u4f46\u5bf9\u8fd9\u4e9b\u64cd\u4f5c\u7b26\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u3002\u8be6\u89c1 \u7b2c 8.14.4 \u8282 \u3002"]}], "localization": {"status": "complete", "sources": [{"url": "/docs/16/catalog-pg-amop.html", "method": "same-major semantic node", "sha256": "704b1a6817cd451566b69b08f4210b2fb192934810322e22cb9a2980f7d93af4", "language": "zh", "matched_nodes": ["#CATALOG-PG-AMOP/p[2]/em[1]"]}, {"url": "/docs/16/datatype-json.html", "method": "same-major semantic node", "sha256": "4d3ca6065016169a03abc9b3a57654fda5765ebb94074fa4eb578485f6807205", "language": "zh", "matched_nodes": ["#DATATYPE-JSON/div[19]/p[23]", "#DATATYPE-JSON/div[19]/p[24]", "#DATATYPE-JSON/div[19]/p[25]", "#DATATYPE-JSON/div[19]/p[5]"]}, {"url": "/docs/16/gin-builtin-opclasses.html", "method": "same-major semantic node", "sha256": "0ab81bcaa811e9231178543d1b7d15876a071eada5200a44f53e8a0acfa09af7", "language": "zh", "matched_nodes": ["#GIN-BUILTIN-OPCLASSES/p[4]"]}, {"url": "/docs/16/indexes-opclass.html", "method": "same-major semantic node", "sha256": "da59bf9cb7d8a9ec0aeab1f5d3593429eec79ce6a1715eb47434832287159c3c", "language": "zh", "matched_nodes": ["#INDEXES-OPCLASS/p[3]", "#INDEXES-OPCLASS/p[5]", "#INDEXES-OPCLASS/p[6]"]}, {"url": "/docs/16/xfunc-c.html", "method": "same-major semantic node", "sha256": "8809acadf9ad2b1e79b23f2446b430168f986eaa6d17e9b2e887266bb462299e", "language": "zh", "matched_nodes": ["#XFUNC-C/p[3]/span[1]/span[0]"]}], "language": "zh", "original_text": {"/versions/16/description/0": "GIN operator family containing 1 classes, 3 operator strategies and 5 support functions in this source build.", "/versions/16/facts/0/label": "Object kind", "/versions/16/facts/0/value": "Operator family", "/versions/16/facts/1/label": "Index AM", "/versions/16/tables/0/title": "Family operator strategies", "/versions/16/tables/1/title": "Family support functions", "/versions/16/tables/2/title": "Classes in this family", "/versions/16/related/0/label": "GIN Index AM", "/versions/16/sections/0/title": "Operator classes and families", "/versions/16/sections/1/title": "Specific manual guidance", "/versions/16/tables/0/rows/0/scope": "Family member", "/versions/16/tables/0/rows/1/scope": "Family member", "/versions/16/tables/0/rows/2/scope": "Family member", "/versions/16/sections/0/paragraphs/0": "An index definition can specify an operator class for each column of an index.", "/versions/16/sections/0/paragraphs/1": "The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).", "/versions/16/sections/0/paragraphs/2": "There are also some built-in operator classes besides the default ones:", "/versions/16/sections/1/paragraphs/0": "The non-default GIN operator class jsonb_path_ops does not support the key-exists operators, but it does support @> , @? and @@ . An example of creating an index with this operator class is:", "/versions/16/sections/1/paragraphs/1": "For these operators, a GIN index extracts clauses of the form accessors_chain = constant out of the jsonpath pattern, and does the index search based on the keys and values mentioned in these clauses. The accessors chain may include . key , [*] , and [ index ] accessors. The jsonb_ops operator class also supports .* and .** accessors, but the jsonb_path_ops operator class does not.", "/versions/16/sections/1/paragraphs/2": "Although the jsonb_path_ops operator class supports only queries with the @> , @? and @@ operators, it has notable performance advantages over the default operator class jsonb_ops . A jsonb_path_ops index is usually much smaller than a jsonb_ops index over the same data, and the specificity of searches is better, particularly when queries contain keys that appear frequently in the data. Therefore search operations typically perform better than with the default operator class.", "/versions/16/sections/1/paragraphs/3": "The technical difference between a jsonb_ops and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the data. [7] Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it; for example to index {\"foo\": {\"bar\": \"baz\"}} , a single index item would be created incorporating all three of foo , bar , and baz into the hash value. Thus a containment query looking for this structure would result in an extremely specific index search; but there is no way at all to find out whether foo appears as a key. On the other hand, a jsonb_ops index would create three index items representing foo , bar , and baz separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the equivalent jsonb_path_ops search, especially if there are a very large number of rows containing any single one of the three index items.", "/versions/16/sections/1/paragraphs/4": "A disadvantage of the jsonb_path_ops approach is that it produces no index entries for JSON structures not containing any values, such as {\"a\": {}} . If a search for documents containing such a structure is requested, it will require a full-index scan, which is quite slow. jsonb_path_ops is therefore ill-suited for applications that often perform such searches.", "/versions/16/sections/1/paragraphs/5": "Of the two operator classes for type jsonb , jsonb_ops is the default. jsonb_path_ops supports fewer operators but offers better performance for those operators. See Section 8.14.4 for details.", "/versions/16/tables/0/rows/0/purpose": "search", "/versions/16/tables/0/rows/1/purpose": "search", "/versions/16/tables/0/rows/2/purpose": "search", "/versions/16/tables/2/rows/0/default": "no", "/versions/16/tables/0/columns/0/label": "Operator overload", "/versions/16/tables/0/columns/1/label": "Strategy", "/versions/16/tables/0/columns/2/label": "Purpose", "/versions/16/tables/0/columns/3/label": "Ordering family", "/versions/16/tables/0/columns/4/label": "Membership scope", "/versions/16/tables/0/columns/5/label": "Source description", "/versions/16/tables/1/columns/0/label": "Support number", "/versions/16/tables/1/columns/1/label": "Left type", "/versions/16/tables/1/columns/2/label": "Right type", "/versions/16/tables/1/columns/3/label": "Function signature", "/versions/16/tables/1/columns/4/label": "Result type", "/versions/16/tables/2/columns/0/label": "Class", "/versions/16/tables/2/columns/1/label": "Input type", "/versions/16/tables/2/columns/2/label": "Key type", "/versions/16/tables/2/columns/3/label": "Default", "/versions/16/tables/0/rows/0/description": "contains", "/versions/16/tables/0/rows/1/description": "jsonpath exists", "/versions/16/tables/0/rows/2/description": "jsonpath match", "/versions/16/tables/1/rows/1/result_type": "internal", "/versions/16/tables/1/rows/2/result_type": "internal"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "f04c964972c5838730ebf949214c7e28b43eb1d4c811f5548362222f72ad0694", "canonical_center_text_hash": "b02349cdbde5d0a54e96e924f427401ef6be8e89afe95d09ec7c1ee623c6ceca"}, "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "comparison_data": {"kind": "family", "classes": [{"name": "jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb"}], "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}], "attributes": {"name": "jsonb_path_ops", "method": "gin"}, "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "char"}]}, "comparison_hash": "75553622acc147519cf864610fd7eb6a8584d10e722fa3c8d4e03e6db4c3438f", "manual_language": "zh", "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "char"}], "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/16/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "17": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "family": {"name": "jsonb_path_ops", "method": "gin"}, "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=17", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=17", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=17", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=17", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=17", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "classes": [{"name": "jsonb_path_ops", "slug": "class-gin-jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb", "source_oid": "", "family_slug": "family-gin-jsonb_path_ops"}], "related": [{"url": "/wiki/indexam/gin/?v=17", "label": "GIN \u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "label": "17.11", "major": "17", "channel": "stable", "revision": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979", "source_sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979", "manual_fingerprint": "b55870f8e80e1114a92ac7bfc97f4a6fa0dee8e75935895252bb6e5b866cf187", "catalog_fingerprint": "e888e3474202df1c60a8e7b6bf9f2d83b3866a52d119521659b7a82787d3829d"}, "sources": [{"url": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, {"url": "/docs/17/indexes-opclass.html", "path": "indexes-opclass.html", "label": "PostgreSQL 17 English manual: indexes-opclass.html", "sha256": "dcdeb2d461b79e5c679d29f2a6d3ad038c788ba5a6d094e63d17353352db3ef2"}, {"url": "/docs/17/catalog-pg-opfamily.html", "path": "catalog-pg-opfamily.html", "label": "PostgreSQL 17 English manual: catalog-pg-opfamily.html", "sha256": "f7825b4e69f5073f44322085111577a0747a214b367c599e87491f75bc2a05ef"}, {"url": "/docs/17/catalog-pg-amop.html", "path": "catalog-pg-amop.html", "label": "PostgreSQL 17 English manual: catalog-pg-amop.html", "sha256": "19b2fb110b348860f7fbcb6e0e0544e341f5645113c23f50920a54434d432359"}, {"url": "/docs/17/catalog-pg-amproc.html", "path": "catalog-pg-amproc.html", "label": "PostgreSQL 17 English manual: catalog-pg-amproc.html", "sha256": "c1e9a6c78cb61e434eba6e22547c50a677d0c414049fd515263bec770b16ff55"}, {"url": "/docs/17/datatype-json.html", "path": "datatype-json.html", "label": "PostgreSQL 17 English manual: datatype-json.html", "sha256": "487815d1e18383b47e2937af75bde1712b919bf1d7d2f93d24fd1ea790dbd0a6"}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/17/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "17", "build_id": 105, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "75e451363348ab54434776b1f03440b4f11a01c89d6014709e3211b8ad70ba7f", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:7340767258d21c21b36f373f1fff6bab2be18e0daca13a865129db6105c09efd", "translated_from_revision": null}, "body_sha256": "87a46d593ff5558a9473950009d3e0a8aa73b504bac0b5f5660c9e788ebe1aa4", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "facts_zh": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "center_zh": {"title": "gin/jsonb_path_ops (family)", "locale": "zh-Hans", "source": {"key": "family-gin-jsonb_path_ops", "locale": "zh-Hans", "version": "17", "text_hash": "5ea9e54a36efd8b6b22715207138ea39a21afb94630be138f4448431c206eddb", "collection": "opclass", "dataset_hash": "7c31b524dfe136022d39a6ae8dcfac6b3bbd5f8fdaf422536599981252aff0c9", "source_database": "center", "source_revision": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "payload": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=17", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=17", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=17", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=17", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=17", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/17/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "17", "build_id": 105, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "75e451363348ab54434776b1f03440b4f11a01c89d6014709e3211b8ad70ba7f", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:7340767258d21c21b36f373f1fff6bab2be18e0daca13a865129db6105c09efd", "translated_from_revision": null}, "body_sha256": "87a46d593ff5558a9473950009d3e0a8aa73b504bac0b5f5660c9e788ebe1aa4", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em class=\"firstterm\">\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code class=\"type\">int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code class=\"literal\">int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code class=\"type\">int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code class=\"literal\">COLLATE</code>\u3001<code class=\"literal\">ASC</code>/<code class=\"literal\">DESC</code> \u548c/\u6216 <code class=\"literal\">NULLS FIRST</code>/<code class=\"literal\">NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/17/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "version": "17", "link_map": {"/zh/docs/17/indexes-opclass.html": "/docs/17/indexes-opclass.html"}, "body_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/17/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "body_sha256": "e9355edc133281aa07fcb8515bb923e7791ffd70e37ad4a509af7ff83a2d23b2", "content_hash": "5ea9e54a36efd8b6b22715207138ea39a21afb94630be138f4448431c206eddb", "source_database": "center", "source_revision": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "description": "contains", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403e-jsonb-jsonb", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath exists", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403f-jsonb-jsonpath", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath match", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-4040-jsonb-jsonpath", "sort_family_slug": ""}], "signature": "gin/jsonb_path_ops", "tables_zh": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=17", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=17", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=17", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=17", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=17", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=17", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "source_oid": "4037", "description": ["jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002"], "sections_zh": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "localization": {"status": "complete", "sources": [{"url": "/docs/17/catalog-pg-amop.html", "method": "same-major semantic node", "sha256": "79658772dd07ff10c4a4a472853e5a9bcba832796f5f9d2c0c77a87da769e5f6", "language": "zh", "matched_nodes": ["#CATALOG-PG-AMOP/p[2]/em[1]"]}, {"url": "/docs/17/datatype-json.html", "method": "same-major semantic node", "sha256": "8d2627b39aa9ad8449221de824f0c89af32197e8db7972fbc03b43dfcd0e9a93", "language": "zh", "matched_nodes": ["#DATATYPE-JSON/div[19]/p[23]", "#DATATYPE-JSON/div[19]/p[24]", "#DATATYPE-JSON/div[19]/p[25]", "#DATATYPE-JSON/div[19]/p[5]"]}, {"url": "/docs/17/indexes-opclass.html", "method": "same-major semantic node", "sha256": "66b33ea1fd240b6fae08ded914d718d50dfeba9d5be16dac835d0472b9cc9e4a", "language": "zh", "matched_nodes": ["#INDEXES-OPCLASS/p[3]", "#INDEXES-OPCLASS/p[5]", "#INDEXES-OPCLASS/p[6]"]}, {"url": "/docs/17/xfunc-c.html", "method": "same-major semantic node", "sha256": "990e09637f0fb7a154eb0f5e8cb7b319a7603214d08975bd973130527b705f1f", "language": "zh", "matched_nodes": ["#XFUNC-C/p[3]/span[1]/span[0]"]}], "language": "zh", "original_text": {"/versions/17/description/0": "GIN operator family containing 1 classes, 3 operator strategies and 5 support functions in this source build.", "/versions/17/facts/0/label": "Object kind", "/versions/17/facts/0/value": "Operator family", "/versions/17/facts/1/label": "Index AM", "/versions/17/tables/0/title": "Family operator strategies", "/versions/17/tables/1/title": "Family support functions", "/versions/17/tables/2/title": "Classes in this family", "/versions/17/related/0/label": "GIN Index AM", "/versions/17/sections/0/title": "Operator classes and families", "/versions/17/sections/1/title": "Specific manual guidance", "/versions/17/tables/0/rows/0/scope": "Family member", "/versions/17/tables/0/rows/1/scope": "Family member", "/versions/17/tables/0/rows/2/scope": "Family member", "/versions/17/sections/0/paragraphs/0": "An index definition can specify an operator class for each column of an index.", "/versions/17/sections/0/paragraphs/1": "The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).", "/versions/17/sections/0/paragraphs/2": "There are also some built-in operator classes besides the default ones:", "/versions/17/sections/1/paragraphs/0": "The non-default GIN operator class jsonb_path_ops does not support the key-exists operators, but it does support @> , @? and @@ . An example of creating an index with this operator class is:", "/versions/17/sections/1/paragraphs/1": "For these operators, a GIN index extracts clauses of the form accessors_chain == constant out of the jsonpath pattern, and does the index search based on the keys and values mentioned in these clauses. The accessors chain may include . key , [*] , and [ index ] accessors. The jsonb_ops operator class also supports .* and .** accessors, but the jsonb_path_ops operator class does not.", "/versions/17/sections/1/paragraphs/2": "Although the jsonb_path_ops operator class supports only queries with the @> , @? and @@ operators, it has notable performance advantages over the default operator class jsonb_ops . A jsonb_path_ops index is usually much smaller than a jsonb_ops index over the same data, and the specificity of searches is better, particularly when queries contain keys that appear frequently in the data. Therefore search operations typically perform better than with the default operator class.", "/versions/17/sections/1/paragraphs/3": "The technical difference between a jsonb_ops and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the data. [7] Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it; for example to index {\"foo\": {\"bar\": \"baz\"}} , a single index item would be created incorporating all three of foo , bar , and baz into the hash value. Thus a containment query looking for this structure would result in an extremely specific index search; but there is no way at all to find out whether foo appears as a key. On the other hand, a jsonb_ops index would create three index items representing foo , bar , and baz separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the equivalent jsonb_path_ops search, especially if there are a very large number of rows containing any single one of the three index items.", "/versions/17/sections/1/paragraphs/4": "A disadvantage of the jsonb_path_ops approach is that it produces no index entries for JSON structures not containing any values, such as {\"a\": {}} . If a search for documents containing such a structure is requested, it will require a full-index scan, which is quite slow. jsonb_path_ops is therefore ill-suited for applications that often perform such searches.", "/versions/17/tables/0/rows/0/purpose": "search", "/versions/17/tables/0/rows/1/purpose": "search", "/versions/17/tables/0/rows/2/purpose": "search", "/versions/17/tables/2/rows/0/default": "no", "/versions/17/tables/0/columns/0/label": "Operator overload", "/versions/17/tables/0/columns/1/label": "Strategy", "/versions/17/tables/0/columns/2/label": "Purpose", "/versions/17/tables/0/columns/3/label": "Ordering family", "/versions/17/tables/0/columns/4/label": "Membership scope", "/versions/17/tables/0/columns/5/label": "Source description", "/versions/17/tables/1/columns/0/label": "Support number", "/versions/17/tables/1/columns/1/label": "Left type", "/versions/17/tables/1/columns/2/label": "Right type", "/versions/17/tables/1/columns/3/label": "Function signature", "/versions/17/tables/1/columns/4/label": "Result type", "/versions/17/tables/2/columns/0/label": "Class", "/versions/17/tables/2/columns/1/label": "Input type", "/versions/17/tables/2/columns/2/label": "Key type", "/versions/17/tables/2/columns/3/label": "Default", "/versions/17/tables/0/rows/0/description": "contains", "/versions/17/tables/0/rows/1/description": "jsonpath exists", "/versions/17/tables/0/rows/2/description": "jsonpath match", "/versions/17/tables/1/rows/1/result_type": "internal", "/versions/17/tables/1/rows/2/result_type": "internal"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "8c938ee01e1fcef0ca5a5960007c8a0540f30c3b7d1730eba24c41ab845049de", "canonical_center_text_hash": "5ea9e54a36efd8b6b22715207138ea39a21afb94630be138f4448431c206eddb"}, "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "comparison_data": {"kind": "family", "classes": [{"name": "jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb"}], "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}], "attributes": {"name": "jsonb_path_ops", "method": "gin"}, "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "char"}]}, "comparison_hash": "75553622acc147519cf864610fd7eb6a8584d10e722fa3c8d4e03e6db4c3438f", "manual_language": "zh", "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "char"}], "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/17/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "18": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "family": {"name": "jsonb_path_ops", "method": "gin"}, "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=18", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=18", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=18", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=18", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=18", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "classes": [{"name": "jsonb_path_ops", "slug": "class-gin-jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb", "source_oid": "", "family_slug": "family-gin-jsonb_path_ops"}], "related": [{"url": "/wiki/indexam/gin/?v=18", "label": "GIN \u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f", "manual_fingerprint": "fefce9e478eb2afe5e17e869492bbedc67dce23d317f0a5257240113d6496ebc", "catalog_fingerprint": "deec62e0f0c649d9d0d058ddd0b16bf41afffd569c3fd73949ff0971ce5cabd6"}, "sources": [{"url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, {"url": "/docs/18/indexes-opclass.html", "path": "indexes-opclass.html", "label": "PostgreSQL 18 English manual: indexes-opclass.html", "sha256": "07de06abf3a2aff2a891a2789def434d9b76705e54d45ca5338dc13451ae2962"}, {"url": "/docs/18/catalog-pg-opfamily.html", "path": "catalog-pg-opfamily.html", "label": "PostgreSQL 18 English manual: catalog-pg-opfamily.html", "sha256": "d4a2b7c2bcb5350b0c1f0111b61e4566f46fd97f48802d3ced2421a7aea60b80"}, {"url": "/docs/18/catalog-pg-amop.html", "path": "catalog-pg-amop.html", "label": "PostgreSQL 18 English manual: catalog-pg-amop.html", "sha256": "e65b90ee78eaf4b4da97ce5b08b972cee2e2660b882ec107be22eca47201f7d1"}, {"url": "/docs/18/catalog-pg-amproc.html", "path": "catalog-pg-amproc.html", "label": "PostgreSQL 18 English manual: catalog-pg-amproc.html", "sha256": "0a09afbde0ba8da9899bf770b86d8301bee116057b16ebe7db0e4a7fca2e91c6"}, {"url": "/docs/18/datatype-json.html", "path": "datatype-json.html", "label": "PostgreSQL 18 English manual: datatype-json.html", "sha256": "650162a05b660146b500a205d523374d00aee117a6a6240d30262be51b6e33e5"}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/18/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "18", "build_id": 107, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "cce6c9b1d4fbb418823aa7be2585facae45f45a5f75c43bd26170c1383c2a4b5", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b", "translated_from_revision": null}, "body_sha256": "b5a291ebea0d932fb2ba5975f7f7c641f4c15fa08329ef98893cd4a97dfb8f17", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "facts_zh": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "center_zh": {"title": "gin/jsonb_path_ops (family)", "locale": "zh-Hans", "source": {"key": "family-gin-jsonb_path_ops", "locale": "zh-Hans", "version": "18", "text_hash": "f6ec0b8873f12e58a9880151094816894aefb1cc5cd03129851b47efc9f204b0", "collection": "opclass", "dataset_hash": "7c31b524dfe136022d39a6ae8dcfac6b3bbd5f8fdaf422536599981252aff0c9", "source_database": "center", "source_revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "payload": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=18", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=18", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=18", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=18", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=18", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/18/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "18", "build_id": 107, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "cce6c9b1d4fbb418823aa7be2585facae45f45a5f75c43bd26170c1383c2a4b5", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b", "translated_from_revision": null}, "body_sha256": "b5a291ebea0d932fb2ba5975f7f7c641f4c15fa08329ef98893cd4a97dfb8f17", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em class=\"firstterm\">\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code class=\"type\">int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code class=\"literal\">int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code class=\"type\">int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code class=\"literal\">COLLATE</code>\u3001<code class=\"literal\">ASC</code>/<code class=\"literal\">DESC</code> \u548c/\u6216 <code class=\"literal\">NULLS FIRST</code>/<code class=\"literal\">NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/18/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "version": "18", "link_map": {"/zh/docs/18/indexes-opclass.html": "/docs/18/indexes-opclass.html"}, "body_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/18/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "body_sha256": "d70184248688e08915c515c7b6cfeff5d5c97c0eddf99c37828ef6d53332922a", "content_hash": "f6ec0b8873f12e58a9880151094816894aefb1cc5cd03129851b47efc9f204b0", "source_database": "center", "source_revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "description": "contains", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403e-jsonb-jsonb", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath exists", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403f-jsonb-jsonpath", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath match", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-4040-jsonb-jsonpath", "sort_family_slug": ""}], "signature": "gin/jsonb_path_ops", "tables_zh": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=18", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=18", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=18", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=18", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=18", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "source_oid": "4037", "description": ["jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002"], "sections_zh": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "localization": {"status": "complete", "sources": [{"url": "/docs/18/catalog-pg-amop.html", "method": "same-major semantic node", "sha256": "c46185aa5f574dacd289a0b3876023793406b4cf58dee7eeebb86436d0577bdc", "language": "zh", "matched_nodes": ["#CATALOG-PG-AMOP/p[2]/em[1]"]}, {"url": "/docs/18/datatype-json.html", "method": "same-major semantic node", "sha256": "b9e8f98a0b5f2a4ec7b5197d02ab40c0ac0635a678c32728aaadd43cb4cd3766", "language": "zh", "matched_nodes": ["#DATATYPE-JSON/div[19]/p[23]", "#DATATYPE-JSON/div[19]/p[24]", "#DATATYPE-JSON/div[19]/p[25]", "#DATATYPE-JSON/div[19]/p[5]"]}, {"url": "/docs/18/indexes-opclass.html", "method": "same-major semantic node", "sha256": "d2d3789266054f227a79e8de0e96355c10b20598c2958745751fea464d457f8d", "language": "zh", "matched_nodes": ["#INDEXES-OPCLASS/p[3]", "#INDEXES-OPCLASS/p[5]", "#INDEXES-OPCLASS/p[6]"]}, {"url": "/docs/18/xfunc-c.html", "method": "same-major semantic node", "sha256": "4b35ab16ac85cc22b5c37555941784a2fd0a1b66b507e9dfff9a239102c15e77", "language": "zh", "matched_nodes": ["#XFUNC-C/p[3]/span[1]/span[0]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "GIN operator family containing 1 classes, 3 operator strategies and 5 support functions in this source build.", "/versions/18/facts/0/label": "Object kind", "/versions/18/facts/0/value": "Operator family", "/versions/18/facts/1/label": "Index AM", "/versions/18/tables/0/title": "Family operator strategies", "/versions/18/tables/1/title": "Family support functions", "/versions/18/tables/2/title": "Classes in this family", "/versions/18/related/0/label": "GIN Index AM", "/versions/18/sections/0/title": "Operator classes and families", "/versions/18/sections/1/title": "Specific manual guidance", "/versions/18/tables/0/rows/0/scope": "Family member", "/versions/18/tables/0/rows/1/scope": "Family member", "/versions/18/tables/0/rows/2/scope": "Family member", "/versions/18/sections/0/paragraphs/0": "An index definition can specify an operator class for each column of an index.", "/versions/18/sections/0/paragraphs/1": "The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).", "/versions/18/sections/0/paragraphs/2": "There are also some built-in operator classes besides the default ones:", "/versions/18/sections/1/paragraphs/0": "The non-default GIN operator class jsonb_path_ops does not support the key-exists operators, but it does support @> , @? and @@ . An example of creating an index with this operator class is:", "/versions/18/sections/1/paragraphs/1": "For these operators, a GIN index extracts clauses of the form accessors_chain == constant out of the jsonpath pattern, and does the index search based on the keys and values mentioned in these clauses. The accessors chain may include . key , [*] , and [ index ] accessors. The jsonb_ops operator class also supports .* and .** accessors, but the jsonb_path_ops operator class does not.", "/versions/18/sections/1/paragraphs/2": "Although the jsonb_path_ops operator class supports only queries with the @> , @? and @@ operators, it has notable performance advantages over the default operator class jsonb_ops . A jsonb_path_ops index is usually much smaller than a jsonb_ops index over the same data, and the specificity of searches is better, particularly when queries contain keys that appear frequently in the data. Therefore search operations typically perform better than with the default operator class.", "/versions/18/sections/1/paragraphs/3": "The technical difference between a jsonb_ops and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the data. [7] Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it; for example to index {\"foo\": {\"bar\": \"baz\"}} , a single index item would be created incorporating all three of foo , bar , and baz into the hash value. Thus a containment query looking for this structure would result in an extremely specific index search; but there is no way at all to find out whether foo appears as a key. On the other hand, a jsonb_ops index would create three index items representing foo , bar , and baz separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the equivalent jsonb_path_ops search, especially if there are a very large number of rows containing any single one of the three index items.", "/versions/18/sections/1/paragraphs/4": "A disadvantage of the jsonb_path_ops approach is that it produces no index entries for JSON structures not containing any values, such as {\"a\": {}} . If a search for documents containing such a structure is requested, it will require a full-index scan, which is quite slow. jsonb_path_ops is therefore ill-suited for applications that often perform such searches.", "/versions/18/tables/0/rows/0/purpose": "search", "/versions/18/tables/0/rows/1/purpose": "search", "/versions/18/tables/0/rows/2/purpose": "search", "/versions/18/tables/2/rows/0/default": "no", "/versions/18/tables/0/columns/0/label": "Operator overload", "/versions/18/tables/0/columns/1/label": "Strategy", "/versions/18/tables/0/columns/2/label": "Purpose", "/versions/18/tables/0/columns/3/label": "Ordering family", "/versions/18/tables/0/columns/4/label": "Membership scope", "/versions/18/tables/0/columns/5/label": "Source description", "/versions/18/tables/1/columns/0/label": "Support number", "/versions/18/tables/1/columns/1/label": "Left type", "/versions/18/tables/1/columns/2/label": "Right type", "/versions/18/tables/1/columns/3/label": "Function signature", "/versions/18/tables/1/columns/4/label": "Result type", "/versions/18/tables/2/columns/0/label": "Class", "/versions/18/tables/2/columns/1/label": "Input type", "/versions/18/tables/2/columns/2/label": "Key type", "/versions/18/tables/2/columns/3/label": "Default", "/versions/18/tables/0/rows/0/description": "contains", "/versions/18/tables/0/rows/1/description": "jsonpath exists", "/versions/18/tables/0/rows/2/description": "jsonpath match", "/versions/18/tables/1/rows/1/result_type": "internal", "/versions/18/tables/1/rows/2/result_type": "internal"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "d9301fba3b942fdd2abaf5fc07e9a3db4da81957dbe5f0ebe2f6a9b69709b5fc", "canonical_center_text_hash": "f6ec0b8873f12e58a9880151094816894aefb1cc5cd03129851b47efc9f204b0"}, "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "comparison_data": {"kind": "family", "classes": [{"name": "jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb"}], "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}], "attributes": {"name": "jsonb_path_ops", "method": "gin"}, "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "char"}]}, "comparison_hash": "75553622acc147519cf864610fd7eb6a8584d10e722fa3c8d4e03e6db4c3438f", "manual_language": "zh", "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "char"}], "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/18/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "center_zh_rendered": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/docs/18/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "19": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "family": {"name": "jsonb_path_ops", "method": "gin"}, "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=19", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=19", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=19", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=19", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=19", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "classes": [{"name": "jsonb_path_ops", "slug": "class-gin-jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb", "source_oid": "", "family_slug": "family-gin-jsonb_path_ops"}], "related": [{"url": "/wiki/indexam/gin/?v=19", "label": "GIN \u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v19rc1/postgresql-19rc1.tar.bz2", "label": "19rc1", "major": "19", "channel": "preview", "revision": "af105fc8e960fc836a09fc2cd7f582b49fd17675d9d36631abe3a565bfd7d701", "source_sha256": "af105fc8e960fc836a09fc2cd7f582b49fd17675d9d36631abe3a565bfd7d701", "manual_fingerprint": "63afc6091780ed5e52920ff9ef5adb6aa7dfcc82f8f413ed36ad46095788488d", "catalog_fingerprint": "da7a8a4e03b72cd120b91ffdff4265e065ccad9eab9964fc3eb1279a58464eb8"}, "sources": [{"url": "https://ftp.postgresql.org/pub/source/v19rc1/postgresql-19rc1.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "af105fc8e960fc836a09fc2cd7f582b49fd17675d9d36631abe3a565bfd7d701"}, {"url": "/docs/19/indexes-opclass.html", "path": "indexes-opclass.html", "label": "PostgreSQL 19 English manual: indexes-opclass.html", "sha256": "067b0ab52538156edc926c386cbdbd14038c2cf0b7da2333198643f531ca8fcf"}, {"url": "/docs/19/catalog-pg-opfamily.html", "path": "catalog-pg-opfamily.html", "label": "PostgreSQL 19 English manual: catalog-pg-opfamily.html", "sha256": "ad3b5d691bac66f3ea2068f7b58076634b4a61737a34c2484879f46554c880f7"}, {"url": "/docs/19/catalog-pg-amop.html", "path": "catalog-pg-amop.html", "label": "PostgreSQL 19 English manual: catalog-pg-amop.html", "sha256": "ff953e362a227387990b27226aff52dfd10f5f25b408d1bac8fa3e50bb45d00f"}, {"url": "/docs/19/catalog-pg-amproc.html", "path": "catalog-pg-amproc.html", "label": "PostgreSQL 19 English manual: catalog-pg-amproc.html", "sha256": "7a4705b9c5a0552c9232931179257747b96da8d195008bfc68304c53fc8be766"}, {"url": "/docs/19/datatype-json.html", "path": "datatype-json.html", "label": "PostgreSQL 19 English manual: datatype-json.html", "sha256": "63fe95385c31d639c4e84176bc5a4faf9fa6fe9e2f90eb155f49e94f92fb5749"}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/19/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "19", "build_id": 109, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "9efd572f75ebc4499f3c73a8a6442fe2177a8511456f4a8a4a85ae2ae05951de", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "sha256:af105fc8e960fc836a09fc2cd7f582b49fd17675d9d36631abe3a565bfd7d701", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:65fda1f1b62a89992b84014c9157e61b67dbe8190e93945826efec668fad038c", "translated_from_revision": "sha256:af105fc8e960fc836a09fc2cd7f582b49fd17675d9d36631abe3a565bfd7d701"}, "body_sha256": "682b50bd5466911428b0b6ef850430520f086840551c7da63480287006517d7c", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "af105fc8e960fc836a09fc2cd7f582b49fd17675d9d36631abe3a565bfd7d701"}, "facts_zh": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "center_zh": {"title": "gin/jsonb_path_ops (family)", "locale": "zh-Hans", "source": {"key": "family-gin-jsonb_path_ops", "locale": "zh-Hans", "version": "19", "text_hash": "913083dabf058355fe99260286c63cec55595422b3cc35c3e87c37303e213370", "collection": "opclass", "dataset_hash": "7c31b524dfe136022d39a6ae8dcfac6b3bbd5f8fdaf422536599981252aff0c9", "source_database": "center", "source_revision": "af105fc8e960fc836a09fc2cd7f582b49fd17675d9d36631abe3a565bfd7d701"}, "payload": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=19", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=19", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=19", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=19", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=19", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/19/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "19", "build_id": 109, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "9efd572f75ebc4499f3c73a8a6442fe2177a8511456f4a8a4a85ae2ae05951de", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "sha256:af105fc8e960fc836a09fc2cd7f582b49fd17675d9d36631abe3a565bfd7d701", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:65fda1f1b62a89992b84014c9157e61b67dbe8190e93945826efec668fad038c", "translated_from_revision": "sha256:af105fc8e960fc836a09fc2cd7f582b49fd17675d9d36631abe3a565bfd7d701"}, "body_sha256": "682b50bd5466911428b0b6ef850430520f086840551c7da63480287006517d7c", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "af105fc8e960fc836a09fc2cd7f582b49fd17675d9d36631abe3a565bfd7d701"}, "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em class=\"firstterm\">\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code class=\"type\">int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code class=\"literal\">int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code class=\"type\">int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code class=\"literal\">COLLATE</code>\u3001<code class=\"literal\">ASC</code>/<code class=\"literal\">DESC</code> \u548c/\u6216 <code class=\"literal\">NULLS FIRST</code>/<code class=\"literal\">NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/19/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "version": "19", "link_map": {"/zh/docs/19/indexes-opclass.html": "/docs/19/indexes-opclass.html"}, "body_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/19/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "body_sha256": "8b6e637599d9a28d8b3390d554f901f45eed2206b4d5ead21f9a9c312099530d", "content_hash": "913083dabf058355fe99260286c63cec55595422b3cc35c3e87c37303e213370", "source_database": "center", "source_revision": "af105fc8e960fc836a09fc2cd7f582b49fd17675d9d36631abe3a565bfd7d701"}, "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "description": "contains", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403e-jsonb-jsonb", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath exists", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403f-jsonb-jsonpath", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath match", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-4040-jsonb-jsonpath", "sort_family_slug": ""}], "signature": "gin/jsonb_path_ops", "tables_zh": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=19", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=19", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=19", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=19", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=19", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=19", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "source_oid": "4037", "description": ["jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002"], "sections_zh": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "localization": {"status": "complete", "sources": [{"url": "/docs/19/catalog-pg-amop.html", "method": "same-major semantic node", "sha256": "8685135a1f22b71dfcd182e77ed97d14ceb21f011d1b58b2b168130423c68d5c", "language": "zh", "matched_nodes": ["#CATALOG-PG-AMOP/p[2]/em[1]"]}, {"url": "/docs/19/datatype-json.html", "method": "same-major semantic node", "sha256": "3e9557f5a65838e08890f25b0cc62147ef278263efb1c2462b7906308771ae60", "language": "zh", "matched_nodes": ["#DATATYPE-JSON/div[19]/p[23]", "#DATATYPE-JSON/div[19]/p[24]", "#DATATYPE-JSON/div[19]/p[25]", "#DATATYPE-JSON/div[19]/p[5]"]}, {"url": "/docs/19/indexes-opclass.html", "method": "same-major semantic node", "sha256": "4b7641f1380b0a251d73741ec707584129005d66bc7a9e701ec660c45294044f", "language": "zh", "matched_nodes": ["#INDEXES-OPCLASS/p[3]", "#INDEXES-OPCLASS/p[5]", "#INDEXES-OPCLASS/p[6]"]}, {"url": "/docs/19/xfunc-c.html", "method": "same-major semantic node", "sha256": "280b87b6c75df1c65f4fa4342c909e5e22ef756458232ac785459c8176101153", "language": "zh", "matched_nodes": ["#XFUNC-C/p[3]/span[1]/span[0]"]}], "language": "zh", "original_text": {"/versions/19/description/0": "GIN operator family containing 1 classes, 3 operator strategies and 5 support functions in this source build.", "/versions/19/facts/0/label": "Object kind", "/versions/19/facts/0/value": "Operator family", "/versions/19/facts/1/label": "Index AM", "/versions/19/tables/0/title": "Family operator strategies", "/versions/19/tables/1/title": "Family support functions", "/versions/19/tables/2/title": "Classes in this family", "/versions/19/related/0/label": "GIN Index AM", "/versions/19/sections/0/title": "Operator classes and families", "/versions/19/sections/1/title": "Specific manual guidance", "/versions/19/tables/0/rows/0/scope": "Family member", "/versions/19/tables/0/rows/1/scope": "Family member", "/versions/19/tables/0/rows/2/scope": "Family member", "/versions/19/sections/0/paragraphs/0": "An index definition can specify an operator class for each column of an index.", "/versions/19/sections/0/paragraphs/1": "The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).", "/versions/19/sections/0/paragraphs/2": "There are also some built-in operator classes besides the default ones:", "/versions/19/sections/1/paragraphs/0": "The non-default GIN operator class jsonb_path_ops does not support the key-exists operators, but it does support @> , @? and @@ . An example of creating an index with this operator class is:", "/versions/19/sections/1/paragraphs/1": "For these operators, a GIN index extracts clauses of the form accessors_chain == constant out of the jsonpath pattern, and does the index search based on the keys and values mentioned in these clauses. The accessors chain may include . key , [*] , and [ index ] accessors. The jsonb_ops operator class also supports .* and .** accessors, but the jsonb_path_ops operator class does not.", "/versions/19/sections/1/paragraphs/2": "Although the jsonb_path_ops operator class supports only queries with the @> , @? and @@ operators, it has notable performance advantages over the default operator class jsonb_ops . A jsonb_path_ops index is usually much smaller than a jsonb_ops index over the same data, and the specificity of searches is better, particularly when queries contain keys that appear frequently in the data. Therefore search operations typically perform better than with the default operator class.", "/versions/19/sections/1/paragraphs/3": "The technical difference between a jsonb_ops and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the data. [7] Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it; for example to index {\"foo\": {\"bar\": \"baz\"}} , a single index item would be created incorporating all three of foo , bar , and baz into the hash value. Thus a containment query looking for this structure would result in an extremely specific index search; but there is no way at all to find out whether foo appears as a key. On the other hand, a jsonb_ops index would create three index items representing foo , bar , and baz separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the equivalent jsonb_path_ops search, especially if there are a very large number of rows containing any single one of the three index items.", "/versions/19/sections/1/paragraphs/4": "A disadvantage of the jsonb_path_ops approach is that it produces no index entries for JSON structures not containing any values, such as {\"a\": {}} . If a search for documents containing such a structure is requested, it will require a full-index scan, which is quite slow. jsonb_path_ops is therefore ill-suited for applications that often perform such searches.", "/versions/19/tables/0/rows/0/purpose": "search", "/versions/19/tables/0/rows/1/purpose": "search", "/versions/19/tables/0/rows/2/purpose": "search", "/versions/19/tables/2/rows/0/default": "no", "/versions/19/tables/0/columns/0/label": "Operator overload", "/versions/19/tables/0/columns/1/label": "Strategy", "/versions/19/tables/0/columns/2/label": "Purpose", "/versions/19/tables/0/columns/3/label": "Ordering family", "/versions/19/tables/0/columns/4/label": "Membership scope", "/versions/19/tables/0/columns/5/label": "Source description", "/versions/19/tables/1/columns/0/label": "Support number", "/versions/19/tables/1/columns/1/label": "Left type", "/versions/19/tables/1/columns/2/label": "Right type", "/versions/19/tables/1/columns/3/label": "Function signature", "/versions/19/tables/1/columns/4/label": "Result type", "/versions/19/tables/2/columns/0/label": "Class", "/versions/19/tables/2/columns/1/label": "Input type", "/versions/19/tables/2/columns/2/label": "Key type", "/versions/19/tables/2/columns/3/label": "Default", "/versions/19/tables/0/rows/0/description": "contains", "/versions/19/tables/0/rows/1/description": "jsonpath exists", "/versions/19/tables/0/rows/2/description": "jsonpath match", "/versions/19/tables/1/rows/1/result_type": "internal", "/versions/19/tables/1/rows/2/result_type": "internal"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "20b9088da46ac0e5b0f7f068c1451867fd74e15c4aabff9174e99c694b3bae66", "canonical_center_text_hash": "913083dabf058355fe99260286c63cec55595422b3cc35c3e87c37303e213370"}, "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "comparison_data": {"kind": "family", "classes": [{"name": "jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb"}], "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}], "attributes": {"name": "jsonb_path_ops", "method": "gin"}, "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "char"}]}, "comparison_hash": "75553622acc147519cf864610fd7eb6a8584d10e722fa3c8d4e03e6db4c3438f", "manual_language": "zh", "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "char"}], "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/19/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "source_revalidation": {"kind": "static-same-version-source-and-manual-replay", "audit": "wiki-audit-20261023", "runtime_rerun": false, "compared_fields": "entity membership and source-derived facts; presentation markup normalized", "source_revision": "af105fc8e960fc836a09fc2cd7f582b49fd17675d9d36631abe3a565bfd7d701", "previous_source_revision": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}}, "20": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "family": {"name": "jsonb_path_ops", "method": "gin"}, "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=20", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=20", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=20", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=20", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=20", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "classes": [{"name": "jsonb_path_ops", "slug": "class-gin-jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb", "source_oid": "", "family_slug": "family-gin-jsonb_path_ops"}], "related": [{"url": "/wiki/indexam/gin/?v=20", "label": "GIN \u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5"}], "release": {"ref": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "20devel", "major": "20", "channel": "devel", "revision": "49c73aa4c9cacef8ca979276a28ac416c08e9e54c9baee4ae5fd116a35fa13ac", "source_sha256": "49c73aa4c9cacef8ca979276a28ac416c08e9e54c9baee4ae5fd116a35fa13ac", "manual_fingerprint": "4afd3a8e29953000e176877e161458a2febaeaac5a5e16986595d3acc2418c7d", "catalog_fingerprint": "e519e6916a731ce8fb9bca3edb12410227f73e01ccd43fb6f5fb98276f08985f"}, "sources": [{"url": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "49c73aa4c9cacef8ca979276a28ac416c08e9e54c9baee4ae5fd116a35fa13ac"}, {"url": "/docs/devel/indexes-opclass.html", "path": "indexes-opclass.html", "label": "PostgreSQL 20 English manual: indexes-opclass.html", "sha256": "d1b53bbc0ea0321a3274870fa9b3337bc1c60a840d8f83acfe0521e049fffbe4"}, {"url": "/docs/devel/catalog-pg-opfamily.html", "path": "catalog-pg-opfamily.html", "label": "PostgreSQL 20 English manual: catalog-pg-opfamily.html", "sha256": "3aed86f773d2ee43ce6978b520058ef65ecb80f60aca614a1e1b6ef3246f4f98"}, {"url": "/docs/devel/catalog-pg-amop.html", "path": "catalog-pg-amop.html", "label": "PostgreSQL 20 English manual: catalog-pg-amop.html", "sha256": "21308426099a60febe495b5e6edd040a5b0f7cb87269121a33549a930433d19f"}, {"url": "/docs/devel/catalog-pg-amproc.html", "path": "catalog-pg-amproc.html", "label": "PostgreSQL 20 English manual: catalog-pg-amproc.html", "sha256": "4e33c91349b72e274384010c3e265fdb6a18554f81257b4b24dffc114136c3ee"}, {"url": "/docs/devel/datatype-json.html", "path": "datatype-json.html", "label": "PostgreSQL 20 English manual: datatype-json.html", "sha256": "94af21b24af7cc49cce878dd5aeda38a93e785bb314949d5bd497ab907eab47d"}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/devel/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "20", "build_id": 111, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "81b38d06f59275055ef9cbe975ce20d1d1bec73ae47a5d4b395b209aede5ea80", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "sha256:49c73aa4c9cacef8ca979276a28ac416c08e9e54c9baee4ae5fd116a35fa13ac", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:98c980963b401d40bd50df72b909e7523e3148b8fdb48edd897de2efb67e5235", "translated_from_revision": "sha256:49c73aa4c9cacef8ca979276a28ac416c08e9e54c9baee4ae5fd116a35fa13ac"}, "body_sha256": "43ea74404a82553023d547a2c0b98e1909bb2a08b3b1cad2b9cf036b0026fa52", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "49c73aa4c9cacef8ca979276a28ac416c08e9e54c9baee4ae5fd116a35fa13ac"}, "facts_zh": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "center_zh": {"title": "gin/jsonb_path_ops (family)", "locale": "zh-Hans", "source": {"key": "family-gin-jsonb_path_ops", "locale": "zh-Hans", "version": "20", "text_hash": "37154ad922d5f195fa4a73ee73e904552d430090d35b5f64f16e22148f1c834b", "collection": "opclass", "dataset_hash": "7c31b524dfe136022d39a6ae8dcfac6b3bbd5f8fdaf422536599981252aff0c9", "source_database": "center", "source_revision": "49c73aa4c9cacef8ca979276a28ac416c08e9e54c9baee4ae5fd116a35fa13ac"}, "payload": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=20", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=20", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=20", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=20", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=20", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/devel/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "20", "build_id": 111, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "81b38d06f59275055ef9cbe975ce20d1d1bec73ae47a5d4b395b209aede5ea80", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "sha256:49c73aa4c9cacef8ca979276a28ac416c08e9e54c9baee4ae5fd116a35fa13ac", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:98c980963b401d40bd50df72b909e7523e3148b8fdb48edd897de2efb67e5235", "translated_from_revision": "sha256:49c73aa4c9cacef8ca979276a28ac416c08e9e54c9baee4ae5fd116a35fa13ac"}, "body_sha256": "43ea74404a82553023d547a2c0b98e1909bb2a08b3b1cad2b9cf036b0026fa52", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "49c73aa4c9cacef8ca979276a28ac416c08e9e54c9baee4ae5fd116a35fa13ac"}, "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em class=\"firstterm\">\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code class=\"type\">int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code class=\"literal\">int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code class=\"type\">int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code class=\"literal\">COLLATE</code>\u3001<code class=\"literal\">ASC</code>/<code class=\"literal\">DESC</code> \u548c/\u6216 <code class=\"literal\">NULLS FIRST</code>/<code class=\"literal\">NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/devel/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "version": "20", "link_map": {"/zh/docs/devel/indexes-opclass.html": "/docs/devel/indexes-opclass.html"}, "body_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/devel/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "body_sha256": "5f9993c97fd2cdbde4237f2c2f9eb2bffb6ed706c41ba3a268f7a96c646e542f", "content_hash": "37154ad922d5f195fa4a73ee73e904552d430090d35b5f64f16e22148f1c834b", "source_database": "center", "source_revision": "49c73aa4c9cacef8ca979276a28ac416c08e9e54c9baee4ae5fd116a35fa13ac"}, "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "description": "contains", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403e-jsonb-jsonb", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath exists", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403f-jsonb-jsonpath", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath match", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-4040-jsonb-jsonpath", "sort_family_slug": ""}], "signature": "gin/jsonb_path_ops", "tables_zh": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=20", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=20", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=20", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=20", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=20", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=20", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "source_oid": "4037", "description": ["jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002"], "sections_zh": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "localization": {"status": "complete", "sources": [{"url": "/docs/devel/catalog-pg-amop.html", "method": "same-major semantic node", "sha256": "e899b3d8b206f52e8dc0ac4b6019e55022abcf901a9d6cf93edf588bc4354664", "language": "zh", "matched_nodes": ["#CATALOG-PG-AMOP/p[2]/em[1]"]}, {"url": "/docs/devel/datatype-json.html", "method": "same-major semantic node", "sha256": "0bfc34c3ea3eb808f83865871c3fdad1265f64037c9a9aab3fecc96f1d1632d1", "language": "zh", "matched_nodes": ["#DATATYPE-JSON/div[19]/p[23]", "#DATATYPE-JSON/div[19]/p[24]", "#DATATYPE-JSON/div[19]/p[25]", "#DATATYPE-JSON/div[19]/p[5]"]}, {"url": "/docs/devel/indexes-opclass.html", "method": "same-major semantic node", "sha256": "166b0550fdb1c3e8c1fbd979c5e41c060ed4cfcdc2d6ba4733ec27d22f45a62d", "language": "zh", "matched_nodes": ["#INDEXES-OPCLASS/p[3]", "#INDEXES-OPCLASS/p[5]", "#INDEXES-OPCLASS/p[6]"]}, {"url": "/docs/devel/xfunc-c.html", "method": "same-major semantic node", "sha256": "19a7606d054b83bc9a0d8643e200db180e0d278d67acfdd6d5f84e3b3a3e4db7", "language": "zh", "matched_nodes": ["#XFUNC-C/p[3]/span[1]/span[0]"]}], "language": "zh", "original_text": {"/summary": "GIN operator family containing 1 classes, 3 operator strategies and 5 support functions in this source build.", "/category": "GIN families", "/versions/20/description/0": "GIN operator family containing 1 classes, 3 operator strategies and 5 support functions in this source build.", "/versions/20/facts/0/label": "Object kind", "/versions/20/facts/0/value": "Operator family", "/versions/20/facts/1/label": "Index AM", "/versions/20/tables/0/title": "Family operator strategies", "/versions/20/tables/1/title": "Family support functions", "/versions/20/tables/2/title": "Classes in this family", "/versions/20/related/0/label": "GIN Index AM", "/versions/20/sections/0/title": "Operator classes and families", "/versions/20/sections/1/title": "Specific manual guidance", "/versions/20/tables/0/rows/0/scope": "Family member", "/versions/20/tables/0/rows/1/scope": "Family member", "/versions/20/tables/0/rows/2/scope": "Family member", "/versions/20/sections/0/paragraphs/0": "An index definition can specify an operator class for each column of an index.", "/versions/20/sections/0/paragraphs/1": "The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).", "/versions/20/sections/0/paragraphs/2": "There are also some built-in operator classes besides the default ones:", "/versions/20/sections/1/paragraphs/0": "The non-default GIN operator class jsonb_path_ops does not support the key-exists operators, but it does support @> , @? and @@ . An example of creating an index with this operator class is:", "/versions/20/sections/1/paragraphs/1": "For these operators, a GIN index extracts clauses of the form accessors_chain == constant out of the jsonpath pattern, and does the index search based on the keys and values mentioned in these clauses. The accessors chain may include . key , [*] , and [ index ] accessors. The jsonb_ops operator class also supports .* and .** accessors, but the jsonb_path_ops operator class does not.", "/versions/20/sections/1/paragraphs/2": "Although the jsonb_path_ops operator class supports only queries with the @> , @? and @@ operators, it has notable performance advantages over the default operator class jsonb_ops . A jsonb_path_ops index is usually much smaller than a jsonb_ops index over the same data, and the specificity of searches is better, particularly when queries contain keys that appear frequently in the data. Therefore search operations typically perform better than with the default operator class.", "/versions/20/sections/1/paragraphs/3": "The technical difference between a jsonb_ops and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the data. [7] Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it; for example to index {\"foo\": {\"bar\": \"baz\"}} , a single index item would be created incorporating all three of foo , bar , and baz into the hash value. Thus a containment query looking for this structure would result in an extremely specific index search; but there is no way at all to find out whether foo appears as a key. On the other hand, a jsonb_ops index would create three index items representing foo , bar , and baz separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the equivalent jsonb_path_ops search, especially if there are a very large number of rows containing any single one of the three index items.", "/versions/20/sections/1/paragraphs/4": "A disadvantage of the jsonb_path_ops approach is that it produces no index entries for JSON structures not containing any values, such as {\"a\": {}} . If a search for documents containing such a structure is requested, it will require a full-index scan, which is quite slow. jsonb_path_ops is therefore ill-suited for applications that often perform such searches.", "/versions/20/tables/0/rows/0/purpose": "search", "/versions/20/tables/0/rows/1/purpose": "search", "/versions/20/tables/0/rows/2/purpose": "search", "/versions/20/tables/2/rows/0/default": "no", "/versions/20/tables/0/columns/0/label": "Operator overload", "/versions/20/tables/0/columns/1/label": "Strategy", "/versions/20/tables/0/columns/2/label": "Purpose", "/versions/20/tables/0/columns/3/label": "Ordering family", "/versions/20/tables/0/columns/4/label": "Membership scope", "/versions/20/tables/0/columns/5/label": "Source description", "/versions/20/tables/1/columns/0/label": "Support number", "/versions/20/tables/1/columns/1/label": "Left type", "/versions/20/tables/1/columns/2/label": "Right type", "/versions/20/tables/1/columns/3/label": "Function signature", "/versions/20/tables/1/columns/4/label": "Result type", "/versions/20/tables/2/columns/0/label": "Class", "/versions/20/tables/2/columns/1/label": "Input type", "/versions/20/tables/2/columns/2/label": "Key type", "/versions/20/tables/2/columns/3/label": "Default", "/versions/20/tables/0/rows/0/description": "contains", "/versions/20/tables/0/rows/1/description": "jsonpath exists", "/versions/20/tables/0/rows/2/description": "jsonpath match", "/versions/20/tables/1/rows/1/result_type": "internal", "/versions/20/tables/1/rows/2/result_type": "internal"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "2e7b5b58620ebbd2ffd8ca95a9bcd79b0b1bc00af3da8651773ff7e977d83805", "canonical_center_text_hash": "37154ad922d5f195fa4a73ee73e904552d430090d35b5f64f16e22148f1c834b"}, "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "comparison_data": {"kind": "family", "classes": [{"name": "jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb"}], "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}], "attributes": {"name": "jsonb_path_ops", "method": "gin"}, "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "char"}]}, "comparison_hash": "75553622acc147519cf864610fd7eb6a8584d10e722fa3c8d4e03e6db4c3438f", "manual_language": "zh", "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "char"}], "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/devel/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "source_revalidation": {"kind": "static-same-version-source-and-manual-replay", "audit": "wiki-audit-20261023", "runtime_rerun": false, "compared_fields": "entity membership and source-derived facts; presentation markup normalized", "source_revision": "49c73aa4c9cacef8ca979276a28ac416c08e9e54c9baee4ae5fd116a35fa13ac", "previous_source_revision": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}}}}, "snapshot": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "family": {"name": "jsonb_path_ops", "method": "gin"}, "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=18", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=18", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=18", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=18", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=18", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "aliases": ["jsonb_path_ops", "gin/jsonb_path_ops"], "classes": [{"name": "jsonb_path_ops", "slug": "class-gin-jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb", "source_oid": "", "family_slug": "family-gin-jsonb_path_ops"}], "related": [{"url": "/wiki/indexam/gin/?v=18", "label": "GIN \u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f", "manual_fingerprint": "fefce9e478eb2afe5e17e869492bbedc67dce23d317f0a5257240113d6496ebc", "catalog_fingerprint": "deec62e0f0c649d9d0d058ddd0b16bf41afffd569c3fd73949ff0971ce5cabd6"}, "sources": [{"url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, {"url": "/docs/18/indexes-opclass.html", "path": "indexes-opclass.html", "label": "PostgreSQL 18 English manual: indexes-opclass.html", "sha256": "07de06abf3a2aff2a891a2789def434d9b76705e54d45ca5338dc13451ae2962"}, {"url": "/docs/18/catalog-pg-opfamily.html", "path": "catalog-pg-opfamily.html", "label": "PostgreSQL 18 English manual: catalog-pg-opfamily.html", "sha256": "d4a2b7c2bcb5350b0c1f0111b61e4566f46fd97f48802d3ced2421a7aea60b80"}, {"url": "/docs/18/catalog-pg-amop.html", "path": "catalog-pg-amop.html", "label": "PostgreSQL 18 English manual: catalog-pg-amop.html", "sha256": "e65b90ee78eaf4b4da97ce5b08b972cee2e2660b882ec107be22eca47201f7d1"}, {"url": "/docs/18/catalog-pg-amproc.html", "path": "catalog-pg-amproc.html", "label": "PostgreSQL 18 English manual: catalog-pg-amproc.html", "sha256": "0a09afbde0ba8da9899bf770b86d8301bee116057b16ebe7db0e4a7fca2e91c6"}, {"url": "/docs/18/datatype-json.html", "path": "datatype-json.html", "label": "PostgreSQL 18 English manual: datatype-json.html", "sha256": "650162a05b660146b500a205d523374d00aee117a6a6240d30262be51b6e33e5"}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/18/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "18", "build_id": 107, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "cce6c9b1d4fbb418823aa7be2585facae45f45a5f75c43bd26170c1383c2a4b5", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b", "translated_from_revision": null}, "body_sha256": "b5a291ebea0d932fb2ba5975f7f7c641f4c15fa08329ef98893cd4a97dfb8f17", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "facts_zh": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "center_zh": {"title": "gin/jsonb_path_ops (family)", "locale": "zh-Hans", "source": {"key": "family-gin-jsonb_path_ops", "locale": "zh-Hans", "version": "18", "text_hash": "f6ec0b8873f12e58a9880151094816894aefb1cc5cd03129851b47efc9f204b0", "collection": "opclass", "dataset_hash": "7c31b524dfe136022d39a6ae8dcfac6b3bbd5f8fdaf422536599981252aff0c9", "source_database": "center", "source_revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "payload": {"facts": [{"label": "\u5bf9\u8c61\u79cd\u7c7b", "value": "\u64cd\u4f5c\u7b26\u5bb6\u65cf"}, {"label": "\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5", "value": "GIN"}], "tables": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=18", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=18", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=18", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=18", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=18", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "zh_from": {"kind": "same-version-chinese-manual-with-source-derived-structured-summary", "manual": {"url": "/zh/docs/18/indexes-opclass.html", "anchor": "", "locale": "zh-Hans", "version": "18", "build_id": 107, "page_key": "indexes-opclass.html", "extraction": "concept-introduction", "source_hash": "cce6c9b1d4fbb418823aa7be2585facae45f45a5f75c43bd26170c1383c2a4b5", "fragment_sha256": "dad5545190ebde655fce48dfc13cd02d2863166fac7cf0c2b28b059c9e419ae4", "source_revision": "unknown:rendered-translation-baseline", "translation_revision": "git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b", "translated_from_revision": null}, "body_sha256": "b5a291ebea0d932fb2ba5975f7f7c641f4c15fa08329ef98893cd4a97dfb8f17", "runtime_rerun": false, "authored_translation": "source-derived-structured-summary", "source_facts_revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sections": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em class=\"firstterm\">\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code class=\"type\">int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code class=\"literal\">int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code class=\"type\">int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code class=\"literal\">COLLATE</code>\u3001<code class=\"literal\">ASC</code>/<code class=\"literal\">DESC</code> \u548c/\u6216 <code class=\"literal\">NULLS FIRST</code>/<code class=\"literal\">NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/18/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "summary": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "version": "18", "link_map": {"/zh/docs/18/indexes-opclass.html": "/docs/18/indexes-opclass.html"}, "body_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/18/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "body_sha256": "d70184248688e08915c515c7b6cfeff5d5c97c0eddf99c37828ef6d53332922a", "content_hash": "f6ec0b8873f12e58a9880151094816894aefb1cc5cd03129851b47efc9f204b0", "source_database": "center", "source_revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "description": "contains", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403e-jsonb-jsonb", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath exists", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-403f-jsonb-jsonpath", "sort_family_slug": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "description": "jsonpath match", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool", "sort_family": "", "operator_slug": "op-4040-jsonb-jsonpath", "sort_family_slug": ""}], "signature": "gin/jsonb_path_ops", "tables_zh": [{"key": "operators", "rows": [{"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403e-jsonb-jsonb/?v=18", "text": "@>(jsonb,jsonb)"}, "strategy": "7", "description": "\u5305\u542b", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-403f-jsonb-jsonpath/?v=18", "text": "@?(jsonb,jsonpath)"}, "strategy": "15", "description": "jsonpath \u5b58\u5728\u6027\u68c0\u67e5", "sort_family": ""}, {"scope": "\u5bb6\u65cf\u6210\u5458", "purpose": "\u641c\u7d22", "operator": {"url": "/wiki/operator/op-4040-jsonb-jsonpath/?v=18", "text": "@@(jsonb,jsonpath)"}, "strategy": "16", "description": "jsonpath \u5339\u914d", "sort_family": ""}], "title": "\u5bb6\u65cf\u4e2d\u7684\u64cd\u4f5c\u7b26\u7b56\u7565", "columns": [{"key": "operator", "label": "\u64cd\u4f5c\u7b26\u91cd\u8f7d"}, {"key": "strategy", "label": "\u7b56\u7565"}, {"key": "purpose", "label": "\u7528\u9014"}, {"key": "sort_family", "label": "\u6392\u5e8f\u5bb6\u65cf"}, {"key": "scope", "label": "\u6210\u5458\u8303\u56f4"}, {"key": "description", "label": "\u6e90\u7801\u8bf4\u660e"}]}, {"key": "support-functions", "rows": [{"number": "1", "function": "btint4cmp(int4,int4)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "int4"}, {"number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "internal"}, {"number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "internal"}, {"number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "bool"}, {"number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "right_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}, "result_type": "char"}], "title": "\u5bb6\u65cf\u652f\u6301\u51fd\u6570", "columns": [{"key": "number", "label": "\u652f\u6301\u51fd\u6570\u7f16\u53f7"}, {"key": "left_type", "label": "\u5de6\u4fa7\u7c7b\u578b"}, {"key": "right_type", "label": "\u53f3\u4fa7\u7c7b\u578b"}, {"key": "function", "label": "\u51fd\u6570\u7b7e\u540d"}, {"key": "result_type", "label": "\u8fd4\u56de\u7c7b\u578b"}]}, {"key": "classes", "rows": [{"class": {"url": "/wiki/opclass/class-gin-jsonb_path_ops/?v=18", "text": "jsonb_path_ops"}, "default": "\u5426", "key_type": {"url": "/wiki/type/int4/?v=18", "text": "int4"}, "input_type": {"url": "/wiki/type/jsonb/?v=18", "text": "jsonb"}}], "title": "\u672c\u5bb6\u65cf\u7684\u64cd\u4f5c\u7b26\u7c7b", "columns": [{"key": "class", "label": "\u64cd\u4f5c\u7b26\u7c7b"}, {"key": "input_type", "label": "\u8f93\u5165\u7c7b\u578b"}, {"key": "key_type", "label": "\u952e\u7c7b\u578b"}, {"key": "default", "label": "\u9ed8\u8ba4\u503c"}]}], "source_oid": "4037", "description": ["jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002"], "sections_zh": [{"title": "\u64cd\u4f5c\u7b26\u7c7b\u4e0e\u5bb6\u65cf", "paragraphs": ["\u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a \u64cd\u4f5c\u7b26\u7c7b \u3002", "\u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b int4 \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 int4_ops \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 int4 \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 COLLATE \u3001 ASC / DESC \u548c/\u6216 NULLS FIRST / NULLS LAST \u6765\u4fee\u6539\uff09\u3002", "\u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a"]}, {"title": "\u4e13\u9898\u624b\u518c\u8bf4\u660e", "paragraphs": ["\u975e\u9ed8\u8ba4\u7684 GIN \u64cd\u4f5c\u7b26\u7c7b jsonb_path_ops \u4e0d\u652f\u6301\u952e\u5b58\u5728\u64cd\u4f5c\u7b26\uff0c\u4f46\u652f\u6301 @> \u3001 @? \u548c @@ \u3002\u4f7f\u7528\u6b64\u64cd\u4f5c\u7b26\u7c7b\u521b\u5efa\u7d22\u5f15\u7684\u4f8b\u5b50\u5982\u4e0b\uff1a", "\u5bf9\u4e8e\u8fd9\u4e9b\u8fd0\u7b97\u7b26\uff0cGIN \u7d22\u5f15\u4f1a\u4ece jsonpath \u6a21\u5f0f\u4e2d\u63d0\u53d6 accessors_chain == constant \u5f62\u5f0f\u7684\u5b50\u53e5\uff0c\u5e76\u6839\u636e\u5176\u4e2d\u63d0\u5230\u7684\u952e\u548c\u503c\u8fdb\u884c\u7d22\u5f15\u641c\u7d22\u3002\u8bbf\u95ee\u5668\u94fe\u53ef\u4ee5\u5305\u542b . key\u3001[*] \u548c [ index ] \u8bbf\u95ee\u5668\u3002jsonb_ops \u8fd0\u7b97\u7b26\u7c7b\u8fd8\u652f\u6301 .* \u548c .** \u8bbf\u95ee\u5668\uff0c\u800c jsonb_path_ops \u8fd0\u7b97\u7b26\u7c7b\u4e0d\u652f\u6301\u3002", "\u867d\u7136 jsonb_path_ops \u64cd\u4f5c\u7b26\u7c7b\u53ea\u652f\u6301\u5e26\u6709 @> \u3001 @? \u548c @@ \u64cd\u4f5c\u7b26\u7684\u67e5\u8be2\uff0c\u4f46\u76f8\u8f83\u4e8e\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b jsonb_ops \uff0c\u5b83\u5177\u6709\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u3002 jsonb_path_ops \u7d22\u5f15\u901a\u5e38\u6bd4\u76f8\u540c\u6570\u636e\u4e0a\u7684 jsonb_ops \u7d22\u5f15\u5c0f\u5f97\u591a\uff0c\u800c\u4e14\u641c\u7d22\u4e5f\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u5c24\u5176\u662f\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u6570\u636e\u91cc\u9891\u7e41\u51fa\u73b0\u7684\u952e\u65f6\u3002\u56e0\u6b64\uff0c\u641c\u7d22\u64cd\u4f5c\u901a\u5e38\u6bd4\u4f7f\u7528\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u65f6\u6027\u80fd\u66f4\u4f73\u3002", "jsonb_ops \u4e0e jsonb_path_ops GIN \u7d22\u5f15\u4e4b\u95f4\u7684\u6280\u672f\u5dee\u5f02\u5728\u4e8e\uff0c\u524d\u8005\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u952e\u548c\u503c\u5206\u522b\u521b\u5efa\u72ec\u7acb\u7684\u7d22\u5f15\u9879\uff0c\u800c\u540e\u8005\u53ea\u4f1a\u4e3a\u6570\u636e\u4e2d\u7684\u6bcf\u4e2a\u503c\u521b\u5efa\u7d22\u5f15\u9879\u3002 [7] \u57fa\u672c\u4e0a\uff0c\u6bcf\u4e2a jsonb_path_ops \u7d22\u5f15\u9879\u90fd\u662f\u8be5\u503c\u8fde\u540c\u901a\u5411\u8be5\u503c\u7684\u952e\u4e00\u8d77\u8ba1\u7b97\u51fa\u7684 hash\u3002\u4f8b\u5982\uff0c\u8981\u7d22\u5f15 {\"foo\": {\"bar\": \"baz\"}} \uff0c\u4f1a\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684\u7d22\u5f15\u9879\uff0c\u5176 hash \u503c\u4e2d\u540c\u65f6\u7eb3\u5165 foo \u3001 bar \u548c baz \u8fd9\u4e09\u8005\u3002\u56e0\u6b64\uff0c\u67e5\u627e\u8fd9\u4e00\u7ed3\u6784\u7684\u5305\u542b\u67e5\u8be2\u4f1a\u5f97\u5230\u4e00\u6b21\u975e\u5e38\u7cbe\u786e\u7684\u7d22\u5f15\u641c\u7d22\uff1b\u4f46\u5b8c\u5168\u6ca1\u6709\u529e\u6cd5\u636e\u6b64\u627e\u51fa foo \u662f\u5426\u4f5c\u4e3a\u952e\u51fa\u73b0\u3002\u53e6\u4e00\u65b9\u9762\uff0c jsonb_ops \u7d22\u5f15\u4f1a\u5206\u522b\u521b\u5efa\u4e09\u4e2a\u7d22\u5f15\u9879\u6765\u8868\u793a foo \u3001 bar \u548c baz \uff1b\u7136\u540e\u4e3a\u4e86\u6267\u884c\u5305\u542b\u67e5\u8be2\uff0c\u5b83\u4f1a\u67e5\u627e\u5305\u542b\u8fd9\u4e09\u4e2a\u9879\u7684\u884c\u3002\u5c3d\u7ba1 GIN \u7d22\u5f15\u53ef\u4ee5\u76f8\u5f53\u9ad8\u6548\u5730\u6267\u884c\u8fd9\u79cd AND \u641c\u7d22\uff0c\u4f46\u5b83\u4ecd\u7136\u4f1a\u6bd4\u7b49\u6548\u7684 jsonb_path_ops \u641c\u7d22\u66f4\u4e0d\u7cbe\u786e\u3001\u4e5f\u66f4\u6162\uff0c\u5c24\u5176\u662f\u5728\u5305\u542b\u8fd9\u4e09\u4e2a\u7d22\u5f15\u9879\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u884c\u6570\u975e\u5e38\u591a\u65f6\u3002", "jsonb_path_ops \u65b9\u6cd5\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\uff0c\u5b83\u4e0d\u4f1a\u4e3a\u4e0d\u5305\u542b\u4efb\u4f55\u503c\u7684 JSON \u7ed3\u6784\u4ea7\u751f\u7d22\u5f15\u9879\uff0c\u4f8b\u5982 {\"a\": {}} \u3002\u5982\u679c\u8bf7\u6c42\u67e5\u627e\u5305\u542b\u6b64\u7c7b\u7ed3\u6784\u7684\u6587\u6863\uff0c\u5c31\u9700\u8981\u6267\u884c\u4e00\u6b21\u5168\u7d22\u5f15\u626b\u63cf\uff0c\u8fd9\u4f1a\u76f8\u5f53\u6162\u3002\u56e0\u6b64\uff0c jsonb_path_ops \u5e76\u4e0d\u9002\u5408\u7ecf\u5e38\u6267\u884c\u6b64\u7c7b\u641c\u7d22\u7684\u5e94\u7528\u3002"]}], "localization": {"status": "complete", "sources": [{"url": "/docs/18/catalog-pg-amop.html", "method": "same-major semantic node", "sha256": "c46185aa5f574dacd289a0b3876023793406b4cf58dee7eeebb86436d0577bdc", "language": "zh", "matched_nodes": ["#CATALOG-PG-AMOP/p[2]/em[1]"]}, {"url": "/docs/18/datatype-json.html", "method": "same-major semantic node", "sha256": "b9e8f98a0b5f2a4ec7b5197d02ab40c0ac0635a678c32728aaadd43cb4cd3766", "language": "zh", "matched_nodes": ["#DATATYPE-JSON/div[19]/p[23]", "#DATATYPE-JSON/div[19]/p[24]", "#DATATYPE-JSON/div[19]/p[25]", "#DATATYPE-JSON/div[19]/p[5]"]}, {"url": "/docs/18/indexes-opclass.html", "method": "same-major semantic node", "sha256": "d2d3789266054f227a79e8de0e96355c10b20598c2958745751fea464d457f8d", "language": "zh", "matched_nodes": ["#INDEXES-OPCLASS/p[3]", "#INDEXES-OPCLASS/p[5]", "#INDEXES-OPCLASS/p[6]"]}, {"url": "/docs/18/xfunc-c.html", "method": "same-major semantic node", "sha256": "4b35ab16ac85cc22b5c37555941784a2fd0a1b66b507e9dfff9a239102c15e77", "language": "zh", "matched_nodes": ["#XFUNC-C/p[3]/span[1]/span[0]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "GIN operator family containing 1 classes, 3 operator strategies and 5 support functions in this source build.", "/versions/18/facts/0/label": "Object kind", "/versions/18/facts/0/value": "Operator family", "/versions/18/facts/1/label": "Index AM", "/versions/18/tables/0/title": "Family operator strategies", "/versions/18/tables/1/title": "Family support functions", "/versions/18/tables/2/title": "Classes in this family", "/versions/18/related/0/label": "GIN Index AM", "/versions/18/sections/0/title": "Operator classes and families", "/versions/18/sections/1/title": "Specific manual guidance", "/versions/18/tables/0/rows/0/scope": "Family member", "/versions/18/tables/0/rows/1/scope": "Family member", "/versions/18/tables/0/rows/2/scope": "Family member", "/versions/18/sections/0/paragraphs/0": "An index definition can specify an operator class for each column of an index.", "/versions/18/sections/0/paragraphs/1": "The operator class identifies the operators to be used by the index for that column. For example, a B-tree index on the type int4 would use the int4_ops class; this operator class includes comparison functions for values of type int4 . In practice the default operator class for the column's data type is usually sufficient. The main reason for having operator classes is that for some data types, there could be more than one meaningful index behavior. For example, we might want to sort a complex-number data type either by absolute value or by real part. We could do this by defining two operator classes for the data type and then selecting the proper class when making an index. The operator class determines the basic sort ordering (which can then be modified by adding sort options COLLATE , ASC / DESC and/or NULLS FIRST / NULLS LAST ).", "/versions/18/sections/0/paragraphs/2": "There are also some built-in operator classes besides the default ones:", "/versions/18/sections/1/paragraphs/0": "The non-default GIN operator class jsonb_path_ops does not support the key-exists operators, but it does support @> , @? and @@ . An example of creating an index with this operator class is:", "/versions/18/sections/1/paragraphs/1": "For these operators, a GIN index extracts clauses of the form accessors_chain == constant out of the jsonpath pattern, and does the index search based on the keys and values mentioned in these clauses. The accessors chain may include . key , [*] , and [ index ] accessors. The jsonb_ops operator class also supports .* and .** accessors, but the jsonb_path_ops operator class does not.", "/versions/18/sections/1/paragraphs/2": "Although the jsonb_path_ops operator class supports only queries with the @> , @? and @@ operators, it has notable performance advantages over the default operator class jsonb_ops . A jsonb_path_ops index is usually much smaller than a jsonb_ops index over the same data, and the specificity of searches is better, particularly when queries contain keys that appear frequently in the data. Therefore search operations typically perform better than with the default operator class.", "/versions/18/sections/1/paragraphs/3": "The technical difference between a jsonb_ops and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the data. [7] Basically, each jsonb_path_ops index item is a hash of the value and the key(s) leading to it; for example to index {\"foo\": {\"bar\": \"baz\"}} , a single index item would be created incorporating all three of foo , bar , and baz into the hash value. Thus a containment query looking for this structure would result in an extremely specific index search; but there is no way at all to find out whether foo appears as a key. On the other hand, a jsonb_ops index would create three index items representing foo , bar , and baz separately; then to do the containment query, it would look for rows containing all three of these items. While GIN indexes can perform such an AND search fairly efficiently, it will still be less specific and slower than the equivalent jsonb_path_ops search, especially if there are a very large number of rows containing any single one of the three index items.", "/versions/18/sections/1/paragraphs/4": "A disadvantage of the jsonb_path_ops approach is that it produces no index entries for JSON structures not containing any values, such as {\"a\": {}} . If a search for documents containing such a structure is requested, it will require a full-index scan, which is quite slow. jsonb_path_ops is therefore ill-suited for applications that often perform such searches.", "/versions/18/tables/0/rows/0/purpose": "search", "/versions/18/tables/0/rows/1/purpose": "search", "/versions/18/tables/0/rows/2/purpose": "search", "/versions/18/tables/2/rows/0/default": "no", "/versions/18/tables/0/columns/0/label": "Operator overload", "/versions/18/tables/0/columns/1/label": "Strategy", "/versions/18/tables/0/columns/2/label": "Purpose", "/versions/18/tables/0/columns/3/label": "Ordering family", "/versions/18/tables/0/columns/4/label": "Membership scope", "/versions/18/tables/0/columns/5/label": "Source description", "/versions/18/tables/1/columns/0/label": "Support number", "/versions/18/tables/1/columns/1/label": "Left type", "/versions/18/tables/1/columns/2/label": "Right type", "/versions/18/tables/1/columns/3/label": "Function signature", "/versions/18/tables/1/columns/4/label": "Result type", "/versions/18/tables/2/columns/0/label": "Class", "/versions/18/tables/2/columns/1/label": "Input type", "/versions/18/tables/2/columns/2/label": "Key type", "/versions/18/tables/2/columns/3/label": "Default", "/versions/18/tables/0/rows/0/description": "contains", "/versions/18/tables/0/rows/1/description": "jsonpath exists", "/versions/18/tables/0/rows/2/description": "jsonpath match", "/versions/18/tables/1/rows/1/result_type": "internal", "/versions/18/tables/1/rows/2/result_type": "internal"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "d9301fba3b942fdd2abaf5fc07e9a3db4da81957dbe5f0ebe2f6a9b69709b5fc", "canonical_center_text_hash": "f6ec0b8873f12e58a9880151094816894aefb1cc5cd03129851b47efc9f204b0"}, "description_zh": "jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002", "comparison_data": {"kind": "family", "classes": [{"name": "jsonb_path_ops", "family": "jsonb_path_ops", "method": "gin", "default": "f", "key_type": "int4", "input_type": "jsonb"}], "operators": [{"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@>(jsonb,jsonb)", "strategy": "7", "left_type": "jsonb", "right_type": "jsonb", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@?(jsonb,jsonpath)", "strategy": "15", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}, {"family": "jsonb_path_ops", "method": "gin", "purpose": "search", "operator": "@@(jsonb,jsonpath)", "strategy": "16", "left_type": "jsonb", "right_type": "jsonpath", "sort_family": ""}], "attributes": {"name": "jsonb_path_ops", "method": "gin"}, "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "result_type": "char"}]}, "comparison_hash": "75553622acc147519cf864610fd7eb6a8584d10e722fa3c8d4e03e6db4c3438f", "manual_language": "zh", "support_functions": [{"family": "jsonb_path_ops", "method": "gin", "number": "1", "function": "btint4cmp(int4,int4)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "int4"}, {"family": "jsonb_path_ops", "method": "gin", "number": "2", "function": "gin_extract_jsonb_path(jsonb,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "3", "function": "gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "internal"}, {"family": "jsonb_path_ops", "method": "gin", "number": "4", "function": "gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "bool"}, {"family": "jsonb_path_ops", "method": "gin", "number": "6", "function": "gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)", "left_type": "jsonb", "right_type": "jsonb", "family_slug": "family-gin-jsonb_path_ops", "result_type": "char"}], "description_zh_html": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/zh/docs/18/indexes-opclass.html\" rel=\"nofollow\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>", "center_zh_rendered": "<p>jsonb_path_ops \u662f gin \u7684\u8fd0\u7b97\u7b26\u65cf\u3002</p><dl><dt>\u540d\u79f0</dt><dd><code>jsonb_path_ops</code></dd><dt>\u7d22\u5f15\u8bbf\u95ee\u65b9\u6cd5</dt><dd><code>gin</code></dd></dl><h3>\u7b56\u7565\u8fd0\u7b97\u7b26</h3><table><thead><tr><th>\u7b56\u7565\u7f16\u53f7</th><th>\u7528\u9014</th><th>\u8fd0\u7b97\u7b26</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u6392\u5e8f\u8fd0\u7b97\u7b26\u65cf</th></tr></thead><tbody><tr><td><code>7</code></td><td><code>\u641c\u7d22</code></td><td><code>@&gt;(jsonb,jsonb)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code></code></td></tr><tr><td><code>15</code></td><td><code>\u641c\u7d22</code></td><td><code>@?(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr><tr><td><code>16</code></td><td><code>\u641c\u7d22</code></td><td><code>@@(jsonb,jsonpath)</code></td><td><code>jsonb</code></td><td><code>jsonpath</code></td><td><code></code></td></tr></tbody></table><h3>\u652f\u6301\u51fd\u6570</h3><table><thead><tr><th>\u652f\u6301\u51fd\u6570\u7f16\u53f7</th><th>\u5b9e\u73b0\u51fd\u6570</th><th>\u5de6\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u53f3\u64cd\u4f5c\u6570\u7c7b\u578b</th><th>\u7ed3\u679c\u7c7b\u578b</th></tr></thead><tbody><tr><td><code>1</code></td><td><code>btint4cmp(int4,int4)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>int4</code></td></tr><tr><td><code>2</code></td><td><code>gin_extract_jsonb_path(jsonb,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>3</code></td><td><code>gin_extract_jsonb_query_path(jsonb,internal,int2,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>internal</code></td></tr><tr><td><code>4</code></td><td><code>gin_consistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>bool</code></td></tr><tr><td><code>6</code></td><td><code>gin_triconsistent_jsonb_path(internal,int2,jsonb,int4,internal,internal,internal)</code></td><td><code>jsonb</code></td><td><code>jsonb</code></td><td><code>char</code></td></tr></tbody></table><h3>\u540c\u7248\u672c\u4e2d\u6587\u624b\u518c\u8282\u9009</h3><p>\n   \u4e00\u4e2a\u7d22\u5f15\u5b9a\u4e49\u53ef\u4ee5\u4e3a\u7d22\u5f15\u7684\u6bcf\u4e00\u5217\u6307\u5b9a\u4e00\u4e2a<em>\u64cd\u4f5c\u7b26\u7c7b</em>\u3002\n</p><p>\n   \u64cd\u4f5c\u7b26\u7c7b\u6807\u8bc6\u8be5\u7d22\u5f15\u5728\u8be5\u5217\u4e0a\u8981\u4f7f\u7528\u54ea\u4e9b\u64cd\u4f5c\u7b26\u3002\u4f8b\u5982\uff0c\u7c7b\u578b <code>int4</code> \u4e0a\u7684\u4e00\u4e2a B-\u6811\u7d22\u5f15\u4f1a\u4f7f\u7528 <code>int4_ops</code> \u7c7b\uff1b\u8fd9\u4e2a\u64cd\u4f5c\u7b26\u7c7b\u5305\u542b\u5bf9 <code>int4</code> \u503c\u8fdb\u884c\u6bd4\u8f83\u6240\u9700\u7684\u51fd\u6570\u3002\u5b9e\u8df5\u4e2d\uff0c\u5217\u6570\u636e\u7c7b\u578b\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u901a\u5e38\u5df2\u7ecf\u8db3\u591f\u3002\u4e4b\u6240\u4ee5\u5b58\u5728\u64cd\u4f5c\u7b26\u7c7b\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u5bf9\u67d0\u4e9b\u6570\u636e\u7c7b\u578b\u6765\u8bf4\uff0c\u53ef\u80fd\u5b58\u5728\u591a\u79cd\u6709\u610f\u4e49\u7684\u7d22\u5f15\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u6309\u7edd\u5bf9\u503c\u6392\u5e8f\u4e00\u79cd\u590d\u6570\u6570\u636e\u7c7b\u578b\uff0c\u4e5f\u53ef\u80fd\u5e0c\u671b\u6309\u5b9e\u90e8\u6392\u5e8f\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e3a\u8be5\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e24\u4e2a\u64cd\u4f5c\u7b26\u7c7b\uff0c\u5e76\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9009\u62e9\u5408\u9002\u7684\u90a3\u4e2a\u6765\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u64cd\u4f5c\u7b26\u7c7b\u51b3\u5b9a\u4e86\u57fa\u7840\u6392\u5e8f\u987a\u5e8f\uff08\u4e4b\u540e\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u6392\u5e8f\u9009\u9879 <code>COLLATE</code>\u3001<code>ASC</code>/<code>DESC</code> \u548c/\u6216 <code>NULLS FIRST</code>/<code>NULLS LAST</code> \u6765\u4fee\u6539\uff09\u3002\n  </p><p>\n   \u9664\u4e86\u9ed8\u8ba4\u64cd\u4f5c\u7b26\u7c7b\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5185\u7f6e\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n   </p><p>\n    \u4e0b\u9762\u7684\u67e5\u8be2\u4f1a\u663e\u793a\u6240\u6709\u5df2\u5b9a\u4e49\u7684\u64cd\u4f5c\u7b26\u7c7b\uff1a\n\n</p><p><a href=\"/docs/18/indexes-opclass.html\">\u67e5\u770b\u5b8c\u6574\u4e2d\u6587\u624b\u518c\u4e0e\u4e0a\u4e0b\u6587</a>\u3002</p>"}, "comparison": {"left": "17", "right": "18", "status": "unchanged", "diff": ""}}