{"Entry":{"collection":"language","key":"plpython3u","name":"plpython3u","aliases":[],"metadata":{"aliases":[],"category":"PL/Python","content_hash":"4a42d4815798ca42912c83a7e6775b01f6c17fc81fbc082e5aa433ec6e481930","derived_content_hash":"5cd1d8b81edde37e1ff8316b62e900e862fde3194adeb8ca4d64c18b05f52a37","imported_at":"2026-09-30T00:40:44.361351+08:00","name":"plpython3u","name_zh":"","slug":"plpython3u","summary":"PL/Python3U untrusted procedural language"}},"Definition":{"Collection":"language","Key":"plpython3u","SourceDatabase":"center","Version":"18","SourceTable":"procedural_language","SourceKey":"plpython3u","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","Facts":{"aliases":[],"attributes":{"comment":"PL/Python3U untrusted procedural language","default_version":"1.0","family":"PL/Python","handler":"plpython3_call_handler","inline_handler":"plpython3_inline_handler","kind":"Bundled procedural-language variant","library":"$libdir/plpython3","module_pathname":"$libdir/plpython3","trusted":"f","validator":"plpython3_validator"},"comparison_data":{"default_version":"1.0","family":"PL/Python","handler":"plpython3_call_handler","inline_handler":"plpython3_inline_handler","kind":"Bundled procedural-language variant","library":"$libdir/plpython3","trusted":"f","validator":"plpython3_validator"},"comparison_hash":"5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd","description":["PL/Python3U untrusted procedural language"],"description_zh":"过程语言 plpython3u。","description_zh_html":"\u003cp\u003e过程语言 plpython3u。\u003c/p\u003e\u003cdl\u003e\u003cdt\u003e运算符族\u003c/dt\u003e\u003cdd\u003e\u003ccode\u003ePL/Python\u003c/code\u003e\u003c/dd\u003e\u003cdt\u003e处理函数\u003c/dt\u003e\u003cdd\u003e\u003ccode\u003eplpython3_call_handler\u003c/code\u003e\u003c/dd\u003e\u003cdt\u003e库\u003c/dt\u003e\u003cdd\u003e\u003ccode\u003e$libdir/plpython3\u003c/code\u003e\u003c/dd\u003e\u003cdt\u003e受信任\u003c/dt\u003e\u003cdd\u003e\u003ccode\u003e否\u003c/code\u003e\u003c/dd\u003e\u003cdt\u003e验证函数\u003c/dt\u003e\u003cdd\u003e\u003ccode\u003eplpython3_validator\u003c/code\u003e\u003c/dd\u003e\u003cdt\u003e内联处理函数\u003c/dt\u003e\u003cdd\u003e\u003ccode\u003eplpython3_inline_handler\u003c/code\u003e\u003c/dd\u003e\u003cdt\u003e默认版本\u003c/dt\u003e\u003cdd\u003e\u003ccode\u003e1.0\u003c/code\u003e\u003c/dd\u003e\u003cdt\u003e模块路径\u003c/dt\u003e\u003cdd\u003e\u003ccode\u003e$libdir/plpython3\u003c/code\u003e\u003c/dd\u003e\u003c/dl\u003e\u003ch3\u003e同版本中文手册节选\u003c/h3\u003e\u003cp\u003e\n\u003cspan class=\"application\"\u003ePL/Python\u003c/span\u003e 过程语言允许使用 \u003ca class=\"ulink\" href=\"https://www.python.org\"\u003ePython 语言\u003c/a\u003e编写 \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 函数和过程。\n \u003c/p\u003e\u003cp\u003e\n  要在特定数据库中安装 PL/Python，可使用 \u003ccode class=\"literal\"\u003eCREATE EXTENSION plpython3u\u003c/code\u003e。\n \u003c/p\u003e\u003cp\u003e\n  PL/Python 只能作为一种\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e不受信任的\u003c/span\u003e”\u003c/span\u003e语言使用，这意味着它不提供任何机制来限制用户能在其中做什么，因此其名称为 \u003ccode class=\"literal\"\u003eplpython3u\u003c/code\u003e。如果将来能在 Python 中开发出安全的执行机制，受信任的变体 \u003ccode class=\"literal\"\u003eplpython\u003c/code\u003e 可能会出现。使用不受信任的 PL/Python 编写函数时，函数编写者必须确保该函数不会被用来做任何不希望发生的事情，因为它能够做到任何以数据库管理员身份登录的用户所能做的事情。只有超级用户才能在 \u003ccode class=\"literal\"\u003eplpython3u\u003c/code\u003e 这类不受信任的语言中创建函数。\n \u003c/p\u003e\u003cp\u003e\u003ca href=\"/zh/docs/18/plpython.html\"\u003e查看完整中文手册与上下文\u003c/a\u003e。\u003c/p\u003e","facts":[{"label":"Kind","value":"Bundled procedural-language variant"},{"label":"Family","value":"PL/Python"},{"label":"Trusted","value":"f"},{"label":"Handler","value":"plpython3_call_handler"},{"label":"Inline handler","value":"plpython3_inline_handler"},{"label":"Validator","value":"plpython3_validator"},{"label":"Library","value":"$libdir/plpython3"},{"label":"Default version","value":"1.0"},{"label":"Module pathname","value":"$libdir/plpython3"},{"label":"Comment","value":"PL/Python3U untrusted procedural language"}],"facts_zh":[{"label":"种类","value":"随源码提供的过程语言变体"},{"label":"操作符家族","value":"PL/Python"},{"label":"可信","value":"f"},{"label":"处理函数","value":"plpython3_call_handler"},{"label":"内联代码处理函数","value":"plpython3_inline_handler"},{"label":"校验函数","value":"plpython3_validator"},{"label":"库","value":"$libdir/plpython3"},{"label":"默认版本","value":"1.0"},{"label":"模块路径","value":"$libdir/plpython3"},{"label":"注释","value":"PL/Python3U 非可信过程语言"}],"manual_html":"\u003cdiv class=\"chapter\" id=\"PLPYTHON\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2 class=\"title\"\u003eChapter 44. PL/Python — Python Procedural Language\u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\n\u003cp\u003eThe \u003cspan class=\"application\"\u003ePL/Python\u003c/span\u003e procedural language allows \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e functions and procedures to be written in the \u003ca class=\"ulink\" href=\"https://www.python.org\"\u003ePython language\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eTo install PL/Python in a particular database, use \u003ccode class=\"literal\"\u003eCREATE EXTENSION plpython3u\u003c/code\u003e.\u003c/p\u003e\n\u003cdiv class=\"tip\"\u003e\n\u003ch3 class=\"title\"\u003eTip\u003c/h3\u003e\n\u003cp\u003eIf a language is installed into \u003ccode class=\"literal\"\u003etemplate1\u003c/code\u003e, all subsequently created databases will have the language installed automatically.\u003c/p\u003e\n\u003c/div\u003e\n\u003cp\u003ePL/Python is only available as an \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003euntrusted\u003c/span\u003e”\u003c/span\u003e language, meaning it does not offer any way of restricting what users can do in it and is therefore named \u003ccode class=\"literal\"\u003eplpython3u\u003c/code\u003e. A trusted variant \u003ccode class=\"literal\"\u003eplpython\u003c/code\u003e might become available in the future if a secure execution mechanism is developed in Python. The writer of a function in untrusted PL/Python must take care that the function cannot be used to do anything unwanted, since it will be able to do anything that could be done by a user logged in as the database administrator. Only superusers can create functions in untrusted languages such as \u003ccode class=\"literal\"\u003eplpython3u\u003c/code\u003e.\u003c/p\u003e\n\u003cdiv class=\"note\"\u003e\n\u003ch3 class=\"title\"\u003eNote\u003c/h3\u003e\n\u003cp\u003eUsers of source packages must specially enable the build of PL/Python during the installation process. (Refer to the installation instructions for more information.) Users of binary packages might find PL/Python in a separate subpackage.\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e","manual_path":"/docs/18/plpython.html","related":[{"label":"plpython-data","url":"/docs/18/plpython-data.html"},{"label":"plpython-database","url":"/docs/18/plpython-database.html"},{"label":"plpython-do","url":"/docs/18/plpython-do.html"},{"label":"plpython-envar","url":"/docs/18/plpython-envar.html"},{"label":"plpython-funcs","url":"/docs/18/plpython-funcs.html"},{"label":"plpython-python23","url":"/docs/18/plpython-python23.html"},{"label":"plpython-sharing","url":"/docs/18/plpython-sharing.html"},{"label":"plpython-subtransaction","url":"/docs/18/plpython-subtransaction.html"},{"label":"plpython-transactions","url":"/docs/18/plpython-transactions.html"},{"label":"plpython-trigger","url":"/docs/18/plpython-trigger.html"},{"label":"plpython-util","url":"/docs/18/plpython-util.html"}],"release":{"catalog_fingerprint":"65c93d6048ef30e61023a84f9680fa6a92b1c383b7eb226741170077eb078502","channel":"stable","label":"18.6","major":"18","ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sections":[{"code":"/* src/pl/plpython/plpython3u--1.0.sql */\n\nCREATE FUNCTION plpython3_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython3_inline_handler(internal) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython3_validator(oid) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE plpython3u\n  HANDLER plpython3_call_handler\n  INLINE plpython3_inline_handler\n  VALIDATOR plpython3_validator;\n\nCOMMENT ON LANGUAGE plpython3u IS 'PL/Python3U untrusted procedural language';","paragraphs":["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."],"title":"Installation definition from the matching source archive"}],"sections_zh":[{"code":"/* src/pl/plpython/plpython3u--1.0.sql */\n\nCREATE FUNCTION plpython3_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython3_inline_handler(internal) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython3_validator(oid) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE plpython3u\n  HANDLER plpython3_call_handler\n  INLINE plpython3_inline_handler\n  VALIDATOR plpython3_validator;\n\nCOMMENT ON LANGUAGE plpython3u IS 'PL/Python3U untrusted procedural language';","paragraphs":["此扩展随源码提供；收录它并不表示已安装该语言或外部运行时。"],"title":"同构建源码中的安装定义"}],"signature":"","source_files":{"src/pl/plpython/plpython3u--1.0.sql":"7c4588b4f1176b3bbec5f5b3fd851931fda88652ee3b3985cde4f88d75b11a65","src/pl/plpython/plpython3u.control":"efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114"},"sources":[{"label":"Matching PostgreSQL source archive","sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"label":"PostgreSQL 18 English manual","path":"plpython.html","sha256":"71a8ee61599ffebaf8d3b7369b3722728367c00fb6a108f3f16e7a93124d5a90","url":"/docs/18/plpython.html"}],"tables":[],"tables_zh":[],"zh_from":{"authored_translation":"source-derived-structured-summary","body_sha256":"30725348edd9976db1f6c3fc0061a3479a90255d1273e0b8612413688c110ff0","kind":"same-version-chinese-manual-with-source-derived-structured-summary","manual":{"anchor":"","build_id":107,"extraction":"concept-introduction","fragment_sha256":"8b04aa478898a81737a8e35d5c5cf7713c05d1579aa84334648c654b9a505686","locale":"zh-Hans","page_key":"plpython.html","source_hash":"dd1f961b5de9b5c4a7c334828a5f7d73685b7960044f48c14cdac6548eab4084","source_revision":"unknown:rendered-translation-baseline","translated_from_revision":null,"translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","url":"/zh/docs/18/plpython.html","version":"18"},"runtime_rerun":false,"source_facts_revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}},"ManualEvidence":{"manual_path":"/docs/18/plpython.html","release":{"catalog_fingerprint":"65c93d6048ef30e61023a84f9680fa6a92b1c383b7eb226741170077eb078502","channel":"stable","label":"18.6","major":"18","ref":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2","revision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","source_sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"},"sources":[{"label":"Matching PostgreSQL source archive","sha256":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","url":"https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2"},{"label":"PostgreSQL 18 English manual","path":"plpython.html","sha256":"71a8ee61599ffebaf8d3b7369b3722728367c00fb6a108f3f16e7a93124d5a90","url":"/docs/18/plpython.html"}]},"MeasuredEvidence":{}},"Text":{"Collection":"language","Key":"plpython3u","SourceDatabase":"center","Version":"18","Locale":"en","Title":"plpython3u","Summary":"PL/Python3U untrusted procedural language","BodyHTML":"\u003cdiv id=\"PLPYTHON\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2\u003eChapter 44. PL/Python — Python Procedural Language\u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\n\u003cp\u003eThe \u003cspan\u003ePL/Python\u003c/span\u003e procedural language allows \u003cspan\u003ePostgreSQL\u003c/span\u003e functions and procedures to be written in the \u003ca href=\"https://www.python.org\" rel=\"nofollow\"\u003ePython language\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eTo install PL/Python in a particular database, use \u003ccode\u003eCREATE EXTENSION plpython3u\u003c/code\u003e.\u003c/p\u003e\n\u003cdiv\u003e\n\u003ch3\u003eTip\u003c/h3\u003e\n\u003cp\u003eIf a language is installed into \u003ccode\u003etemplate1\u003c/code\u003e, all subsequently created databases will have the language installed automatically.\u003c/p\u003e\n\u003c/div\u003e\n\u003cp\u003ePL/Python is only available as an \u003cspan\u003e“\u003cspan\u003euntrusted\u003c/span\u003e”\u003c/span\u003e language, meaning it does not offer any way of restricting what users can do in it and is therefore named \u003ccode\u003eplpython3u\u003c/code\u003e. A trusted variant \u003ccode\u003eplpython\u003c/code\u003e might become available in the future if a secure execution mechanism is developed in Python. The writer of a function in untrusted PL/Python must take care that the function cannot be used to do anything unwanted, since it will be able to do anything that could be done by a user logged in as the database administrator. Only superusers can create functions in untrusted languages such as \u003ccode\u003eplpython3u\u003c/code\u003e.\u003c/p\u003e\n\u003cdiv\u003e\n\u003ch3\u003eNote\u003c/h3\u003e\n\u003cp\u003eUsers of source packages must specially enable the build of PL/Python during the installation process. (Refer to the installation instructions for more information.) Users of binary packages might find PL/Python in a separate subpackage.\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e","SourceRevision":"555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f","ContentHash":"8026b121ed7bfe061c66703ba30f5b2425a04d98caedbaf4bab9cb676c328a26","Payload":{"description":["PL/Python3U untrusted procedural language"],"manual_html":"\u003cdiv class=\"chapter\" id=\"PLPYTHON\"\u003e\n\u003cdiv class=\"titlepage\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2 class=\"title\"\u003eChapter 44. PL/Python — Python Procedural Language\u003c/h2\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\n\u003cp\u003eThe \u003cspan class=\"application\"\u003ePL/Python\u003c/span\u003e procedural language allows \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e functions and procedures to be written in the \u003ca class=\"ulink\" href=\"https://www.python.org\"\u003ePython language\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eTo install PL/Python in a particular database, use \u003ccode class=\"literal\"\u003eCREATE EXTENSION plpython3u\u003c/code\u003e.\u003c/p\u003e\n\u003cdiv class=\"tip\"\u003e\n\u003ch3 class=\"title\"\u003eTip\u003c/h3\u003e\n\u003cp\u003eIf a language is installed into \u003ccode class=\"literal\"\u003etemplate1\u003c/code\u003e, all subsequently created databases will have the language installed automatically.\u003c/p\u003e\n\u003c/div\u003e\n\u003cp\u003ePL/Python is only available as an \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003euntrusted\u003c/span\u003e”\u003c/span\u003e language, meaning it does not offer any way of restricting what users can do in it and is therefore named \u003ccode class=\"literal\"\u003eplpython3u\u003c/code\u003e. A trusted variant \u003ccode class=\"literal\"\u003eplpython\u003c/code\u003e might become available in the future if a secure execution mechanism is developed in Python. The writer of a function in untrusted PL/Python must take care that the function cannot be used to do anything unwanted, since it will be able to do anything that could be done by a user logged in as the database administrator. Only superusers can create functions in untrusted languages such as \u003ccode class=\"literal\"\u003eplpython3u\u003c/code\u003e.\u003c/p\u003e\n\u003cdiv class=\"note\"\u003e\n\u003ch3 class=\"title\"\u003eNote\u003c/h3\u003e\n\u003cp\u003eUsers of source packages must specially enable the build of PL/Python during the installation process. (Refer to the installation instructions for more information.) Users of binary packages might find PL/Python in a separate subpackage.\u003c/p\u003e\n\u003c/div\u003e\n\u003c/div\u003e","related":[{"label":"plpython-data","url":"/docs/18/plpython-data.html"},{"label":"plpython-database","url":"/docs/18/plpython-database.html"},{"label":"plpython-do","url":"/docs/18/plpython-do.html"},{"label":"plpython-envar","url":"/docs/18/plpython-envar.html"},{"label":"plpython-funcs","url":"/docs/18/plpython-funcs.html"},{"label":"plpython-python23","url":"/docs/18/plpython-python23.html"},{"label":"plpython-sharing","url":"/docs/18/plpython-sharing.html"},{"label":"plpython-subtransaction","url":"/docs/18/plpython-subtransaction.html"},{"label":"plpython-transactions","url":"/docs/18/plpython-transactions.html"},{"label":"plpython-trigger","url":"/docs/18/plpython-trigger.html"},{"label":"plpython-util","url":"/docs/18/plpython-util.html"}],"sections":[{"code":"/* src/pl/plpython/plpython3u--1.0.sql */\n\nCREATE FUNCTION plpython3_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython3_inline_handler(internal) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython3_validator(oid) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE plpython3u\n  HANDLER plpython3_call_handler\n  INLINE plpython3_inline_handler\n  VALIDATOR plpython3_validator;\n\nCOMMENT ON LANGUAGE plpython3u IS 'PL/Python3U untrusted procedural language';","paragraphs":["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."],"title":"Installation definition from the matching source archive"}],"tables":[]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
