{"Entry":{"collection":"language","key":"plpython2u","name":"plpython2u","aliases":[],"metadata":{"aliases":[],"category":"PL/Python","content_hash":"ebd9cea4d3f9fb8b51336dc4f22ad8dcc12214803b7a70d7bb19eb32fc8c63f0","imported_at":"2026-09-30T00:40:44.357411+08:00","name":"plpython2u","name_zh":"","slug":"plpython2u","summary":"PL/Python2U untrusted procedural language"}},"Definition":{"Collection":"language","Key":"plpython2u","SourceDatabase":"center","Version":"14","SourceTable":"procedural_language","SourceKey":"plpython2u","SourceRevision":"a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897","Facts":{"aliases":[],"attributes":{"comment":"PL/Python2U untrusted procedural language","default_version":"1.0","family":"PL/Python","handler":"plpython2_call_handler","inline_handler":"plpython2_inline_handler","kind":"Bundled procedural-language variant","library":"$libdir/plpython2","module_pathname":"$libdir/plpython2","trusted":"f","validator":"plpython2_validator"},"comparison_data":{"default_version":"1.0","family":"PL/Python","handler":"plpython2_call_handler","inline_handler":"plpython2_inline_handler","kind":"Bundled procedural-language variant","library":"$libdir/plpython2","trusted":"f","validator":"plpython2_validator"},"comparison_hash":"97802e2b3133abfc2be638d7f109df527604bcc726c8a2ce9fdc47a82b753410","description":["PL/Python2U untrusted procedural language"],"facts":[{"label":"Kind","value":"Bundled procedural-language variant"},{"label":"Family","value":"PL/Python"},{"label":"Trusted","value":"f"},{"label":"Handler","value":"plpython2_call_handler"},{"label":"Inline handler","value":"plpython2_inline_handler"},{"label":"Validator","value":"plpython2_validator"},{"label":"Library","value":"$libdir/plpython2"},{"label":"Default version","value":"1.0"},{"label":"Module pathname","value":"$libdir/plpython2"},{"label":"Comment","value":"PL/Python2U 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/plpython2u--1.0.sql */\n\nCREATE FUNCTION plpython2_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython2_inline_handler(internal) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython2_validator(oid) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE plpython2u\n  HANDLER plpython2_call_handler\n  INLINE plpython2_inline_handler\n  VALIDATOR plpython2_validator;\n\nCOMMENT ON LANGUAGE plpython2u IS 'PL/Python2U 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/plpython2u--1.0.sql":"2e7dcdbf0cb5eddc11ffce175e5e0c89e27076ac26ab2764ca5a90180db99a70","src/pl/plpython/plpython2u.control":"c09792a1d7b0e512559e1c4c72b0c3e1ab0bf37b85dd5c8ebec16e0c3b333209"},"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":"plpython2u","SourceDatabase":"center","Version":"14","Locale":"en","Title":"plpython2u","Summary":"PL/Python2U 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":"0f78dd2ba4410bd1105144857de9970c940380e22ab8a359a454df127c921894","Payload":{"description":["PL/Python2U 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/plpython2u--1.0.sql */\n\nCREATE FUNCTION plpython2_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython2_inline_handler(internal) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE FUNCTION plpython2_validator(oid) RETURNS void\n  STRICT LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE plpython2u\n  HANDLER plpython2_call_handler\n  INLINE plpython2_inline_handler\n  VALIDATOR plpython2_validator;\n\nCOMMENT ON LANGUAGE plpython2u IS 'PL/Python2U 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}
