{"Entry":{"collection":"language","key":"plpython3u","name":"plpython3u","aliases":[],"metadata":{"aliases":[],"category":"PL/Python","content_hash":"4a42d4815798ca42912c83a7e6775b01f6c17fc81fbc082e5aa433ec6e481930","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"],"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"}],"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"}],"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":[]},"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":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
