{"Entry":{"collection":"language","key":"plpythonu","name":"plpythonu","aliases":[],"metadata":{"aliases":[],"category":"PL/Python","content_hash":"693d93f9b9d299b09ef9a44d2c6ccfe17e9c08bab94dea98e070f02569836a3a","imported_at":"2026-09-30T00:40:44.366309+08:00","name":"plpythonu","name_zh":"","slug":"plpythonu","summary":"PL/PythonU untrusted procedural language"}},"Definition":{"Collection":"language","Key":"plpythonu","SourceDatabase":"center","Version":"14","SourceTable":"procedural_language","SourceKey":"plpythonu","SourceRevision":"a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897","Facts":{"aliases":[],"attributes":{"comment":"PL/PythonU untrusted procedural language","default_version":"1.0","family":"PL/Python","handler":"plpython_call_handler","inline_handler":"plpython_inline_handler","kind":"Bundled procedural-language variant","library":"$libdir/plpython2","module_pathname":"$libdir/plpython2","trusted":"f","validator":"plpython_validator"},"comparison_data":{"default_version":"1.0","family":"PL/Python","handler":"plpython_call_handler","inline_handler":"plpython_inline_handler","kind":"Bundled procedural-language variant","library":"$libdir/plpython2","trusted":"f","validator":"plpython_validator"},"comparison_hash":"4664ce2e8831b4283a479a5974c64e65ba0c0be65d66e50ede487408aea4c640","description":["PL/PythonU untrusted procedural language"],"facts":[{"label":"Kind","value":"Bundled procedural-language variant"},{"label":"Family","value":"PL/Python"},{"label":"Trusted","value":"f"},{"label":"Handler","value":"plpython_call_handler"},{"label":"Inline handler","value":"plpython_inline_handler"},{"label":"Validator","value":"plpython_validator"},{"label":"Library","value":"$libdir/plpython2"},{"label":"Default version","value":"1.0"},{"label":"Module pathname","value":"$libdir/plpython2"},{"label":"Comment","value":"PL/PythonU 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 46. 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 plpythonu\u003c/code\u003e (but see also \u003ca class=\"xref\" href=\"/docs/14/plpython-python23.html\" title=\"46.1. Python 2 vs. Python 3\"\u003eSection 46.1\u003c/a\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\"\u003eplpythonu\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\"\u003eplpythonu\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/14/plpython.html","related":[{"label":"plpython-data","url":"/docs/14/plpython-data.html"},{"label":"plpython-database","url":"/docs/14/plpython-database.html"},{"label":"plpython-do","url":"/docs/14/plpython-do.html"},{"label":"plpython-envar","url":"/docs/14/plpython-envar.html"},{"label":"plpython-funcs","url":"/docs/14/plpython-funcs.html"},{"label":"plpython-python23","url":"/docs/14/plpython-python23.html"},{"label":"plpython-sharing","url":"/docs/14/plpython-sharing.html"},{"label":"plpython-subtransaction","url":"/docs/14/plpython-subtransaction.html"},{"label":"plpython-transactions","url":"/docs/14/plpython-transactions.html"},{"label":"plpython-trigger","url":"/docs/14/plpython-trigger.html"},{"label":"plpython-util","url":"/docs/14/plpython-util.html"}],"release":{"catalog_fingerprint":"b272e6a82e4c46efda81c3a6a4cdf7de6a83dfff7f02f226a392fbe9acdd3adb","channel":"stable","label":"14.24","major":"14","ref":"https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2","revision":"a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897","source_sha256":"a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"},"sections":[{"code":"/* src/pl/plpython/plpythonu--1.0.sql */\n\nCREATE FUNCTION plpython_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython_inline_handler(internal) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython_validator(oid) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE plpythonu\n  HANDLER plpython_call_handler\n  INLINE plpython_inline_handler\n  VALIDATOR plpython_validator;\n\nCOMMENT ON LANGUAGE plpythonu IS 'PL/PythonU 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/plpythonu--1.0.sql":"70bad78157392ad1efe970053f5d54bae45a61e10670a373cca5432f2b91dce3","src/pl/plpython/plpythonu.control":"1fa1af3f24d2dab852f17dc3c63e5a6c6ef92a835599202fa270252dce59d285"},"sources":[{"label":"Matching PostgreSQL source archive","sha256":"a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897","url":"https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2"},{"label":"PostgreSQL 14 English manual","path":"plpython.html","sha256":"3c84c78db04798bdd98ee4320a8d26749337373d29e6f05c0a76997f03b73b61","url":"/docs/14/plpython.html"}],"tables":[]},"ManualEvidence":{"manual_path":"/docs/14/plpython.html","release":{"catalog_fingerprint":"b272e6a82e4c46efda81c3a6a4cdf7de6a83dfff7f02f226a392fbe9acdd3adb","channel":"stable","label":"14.24","major":"14","ref":"https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2","revision":"a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897","source_sha256":"a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"},"sources":[{"label":"Matching PostgreSQL source archive","sha256":"a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897","url":"https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2"},{"label":"PostgreSQL 14 English manual","path":"plpython.html","sha256":"3c84c78db04798bdd98ee4320a8d26749337373d29e6f05c0a76997f03b73b61","url":"/docs/14/plpython.html"}]},"MeasuredEvidence":{}},"Text":{"Collection":"language","Key":"plpythonu","SourceDatabase":"center","Version":"14","Locale":"en","Title":"plpythonu","Summary":"PL/PythonU untrusted procedural language","BodyHTML":"\u003cdiv id=\"PLPYTHON\"\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003ch2\u003eChapter 46. 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 plpythonu\u003c/code\u003e (but see also \u003ca href=\"/docs/14/plpython-python23.html\" rel=\"nofollow\"\u003eSection 46.1\u003c/a\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\u003eplpythonu\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\u003eplpythonu\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":"a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897","ContentHash":"656a80a4562eee288dde81e66f1fd49a525c01fd850cafc8fe98558cff152bec","Payload":{"description":["PL/PythonU 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 46. 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 plpythonu\u003c/code\u003e (but see also \u003ca class=\"xref\" href=\"/docs/14/plpython-python23.html\" title=\"46.1. Python 2 vs. Python 3\"\u003eSection 46.1\u003c/a\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\"\u003eplpythonu\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\"\u003eplpythonu\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/14/plpython-data.html"},{"label":"plpython-database","url":"/docs/14/plpython-database.html"},{"label":"plpython-do","url":"/docs/14/plpython-do.html"},{"label":"plpython-envar","url":"/docs/14/plpython-envar.html"},{"label":"plpython-funcs","url":"/docs/14/plpython-funcs.html"},{"label":"plpython-python23","url":"/docs/14/plpython-python23.html"},{"label":"plpython-sharing","url":"/docs/14/plpython-sharing.html"},{"label":"plpython-subtransaction","url":"/docs/14/plpython-subtransaction.html"},{"label":"plpython-transactions","url":"/docs/14/plpython-transactions.html"},{"label":"plpython-trigger","url":"/docs/14/plpython-trigger.html"},{"label":"plpython-util","url":"/docs/14/plpython-util.html"}],"sections":[{"code":"/* src/pl/plpython/plpythonu--1.0.sql */\n\nCREATE FUNCTION plpython_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython_inline_handler(internal) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython_validator(oid) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE plpythonu\n  HANDLER plpython_call_handler\n  INLINE plpython_inline_handler\n  VALIDATOR plpython_validator;\n\nCOMMENT ON LANGUAGE plpythonu IS 'PL/PythonU 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"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
