{"kind": "language", "major": "18", "item": {"slug": "plpython3u", "name": "plpython3u", "name_zh": "", "category": "PL/Python", "summary": "PL/Python3U untrusted procedural language", "aliases": [], "content_hash": "4a42d4815798ca42912c83a7e6775b01f6c17fc81fbc082e5aa433ec6e481930", "versions": {"10": {"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"}], "tables": [], "aliases": [], "related": [{"url": "/docs/10/plpython-data.html", "label": "plpython-data"}, {"url": "/docs/10/plpython-database.html", "label": "plpython-database"}, {"url": "/docs/10/plpython-do.html", "label": "plpython-do"}, {"url": "/docs/10/plpython-envar.html", "label": "plpython-envar"}, {"url": "/docs/10/plpython-funcs.html", "label": "plpython-funcs"}, {"url": "/docs/10/plpython-python23.html", "label": "plpython-python23"}, {"url": "/docs/10/plpython-sharing.html", "label": "plpython-sharing"}, {"url": "/docs/10/plpython-subtransaction.html", "label": "plpython-subtransaction"}, {"url": "/docs/10/plpython-trigger.html", "label": "plpython-trigger"}, {"url": "/docs/10/plpython-util.html", "label": "plpython-util"}], "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", "catalog_fingerprint": "691be281b476dde4374d7f805b2bacc2e75bdef40f1e9d3d42e91f97fe95cfd0"}, "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/plpython.html", "path": "plpython.html", "label": "PostgreSQL 10 English manual", "sha256": "777855a2e6a6df222fc5e19074d038225bdeba971ad195673ff034adb58aeff1"}], "sections": [{"code": "/* src/pl/plpython/plpython3u--1.0.sql */\n\n/*\n * Currently, all the interesting stuff is done by CREATE LANGUAGE.\n * Later we will probably \"dumb down\" that command and put more of the\n * knowledge into this script.\n */\n\nCREATE PROCEDURAL LANGUAGE plpython3u;\n\nCOMMENT ON PROCEDURAL LANGUAGE plpython3u IS 'PL/Python3U untrusted procedural language';", "title": "Installation definition from the matching source archive", "paragraphs": ["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."]}], "signature": "", "attributes": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "comment": "PL/Python3U untrusted procedural language", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0", "module_pathname": "$libdir/plpython3"}, "description": ["PL/Python3U untrusted procedural language"], "manual_html": "<div class=\"chapter\" id=\"PLPYTHON\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">Chapter\u00a045.\u00a0PL/Python - Python Procedural Language</h2>\n</div>\n</div>\n</div>\n\n\n<p>The <span class=\"application\">PL/Python</span> procedural language allows <span class=\"productname\">PostgreSQL</span> functions to be written in the <a class=\"ulink\" href=\"http://www.python.org\">Python language</a>.</p>\n<p>To install PL/Python in a particular database, use <code class=\"literal\">CREATE EXTENSION plpythonu</code> (but see also <a class=\"xref\" href=\"/docs/10/plpython-python23.html\" title=\"45.1.\u00a0Python 2 vs. Python 3\">Section\u00a045.1</a>).</p>\n<div class=\"tip\">\n<h3 class=\"title\">Tip</h3>\n<p>If a language is installed into <code class=\"literal\">template1</code>, all subsequently created databases will have the language installed automatically.</p>\n</div>\n<p>PL/Python is only available as an <span class=\"quote\">\u201c<span class=\"quote\">untrusted</span>\u201d</span> language, meaning it does not offer any way of restricting what users can do in it and is therefore named <code class=\"literal\">plpythonu</code>. A trusted variant <code class=\"literal\">plpython</code> 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 <code class=\"literal\">plpythonu</code>.</p>\n<div class=\"note\">\n<h3 class=\"title\">Note</h3>\n<p>Users 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.</p>\n</div>\n</div>", "manual_path": "/docs/10/plpython.html", "source_files": {"src/pl/plpython/plpython3u.control": "efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114", "src/pl/plpython/plpython3u--1.0.sql": "efd75d202f9855b1cab3bc611f185813194c53902056037864632afc37dc3fb3"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0"}, "comparison_hash": "5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd"}, "11": {"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"}], "tables": [], "aliases": [], "related": [{"url": "/docs/11/plpython-data.html", "label": "plpython-data"}, {"url": "/docs/11/plpython-database.html", "label": "plpython-database"}, {"url": "/docs/11/plpython-do.html", "label": "plpython-do"}, {"url": "/docs/11/plpython-envar.html", "label": "plpython-envar"}, {"url": "/docs/11/plpython-funcs.html", "label": "plpython-funcs"}, {"url": "/docs/11/plpython-python23.html", "label": "plpython-python23"}, {"url": "/docs/11/plpython-sharing.html", "label": "plpython-sharing"}, {"url": "/docs/11/plpython-subtransaction.html", "label": "plpython-subtransaction"}, {"url": "/docs/11/plpython-transactions.html", "label": "plpython-transactions"}, {"url": "/docs/11/plpython-trigger.html", "label": "plpython-trigger"}, {"url": "/docs/11/plpython-util.html", "label": "plpython-util"}], "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", "catalog_fingerprint": "8f21f4444b7f68923f4762af0eb7937fa2907026e91249483e79050de012c901"}, "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/plpython.html", "path": "plpython.html", "label": "PostgreSQL 11 English manual", "sha256": "6612b4c6b8dba6b9955dcd42a8c833715fe386b40b40aac2c9ea3743516726c1"}], "sections": [{"code": "/* src/pl/plpython/plpython3u--1.0.sql */\n\n/*\n * Currently, all the interesting stuff is done by CREATE LANGUAGE.\n * Later we will probably \"dumb down\" that command and put more of the\n * knowledge into this script.\n */\n\nCREATE PROCEDURAL LANGUAGE plpython3u;\n\nCOMMENT ON PROCEDURAL LANGUAGE plpython3u IS 'PL/Python3U untrusted procedural language';", "title": "Installation definition from the matching source archive", "paragraphs": ["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."]}], "signature": "", "attributes": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "comment": "PL/Python3U untrusted procedural language", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0", "module_pathname": "$libdir/plpython3"}, "description": ["PL/Python3U untrusted procedural language"], "manual_html": "<div class=\"chapter\" id=\"PLPYTHON\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">Chapter\u00a046.\u00a0PL/Python - Python Procedural Language</h2>\n</div>\n</div>\n</div>\n\n<p>The <span class=\"application\">PL/Python</span> procedural language allows <span class=\"productname\">PostgreSQL</span> functions and procedures to be written in the <a class=\"ulink\" href=\"https://www.python.org\">Python language</a>.</p>\n<p>To install PL/Python in a particular database, use <code class=\"literal\">CREATE EXTENSION plpythonu</code> (but see also <a class=\"xref\" href=\"/docs/11/plpython-python23.html\" title=\"46.1.\u00a0Python 2 vs. Python 3\">Section\u00a046.1</a>).</p>\n<div class=\"tip\">\n<h3 class=\"title\">Tip</h3>\n<p>If a language is installed into <code class=\"literal\">template1</code>, all subsequently created databases will have the language installed automatically.</p>\n</div>\n<p>PL/Python is only available as an <span class=\"quote\">\u201c<span class=\"quote\">untrusted</span>\u201d</span> language, meaning it does not offer any way of restricting what users can do in it and is therefore named <code class=\"literal\">plpythonu</code>. A trusted variant <code class=\"literal\">plpython</code> 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 <code class=\"literal\">plpythonu</code>.</p>\n<div class=\"note\">\n<h3 class=\"title\">Note</h3>\n<p>Users 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.</p>\n</div>\n</div>", "manual_path": "/docs/11/plpython.html", "source_files": {"src/pl/plpython/plpython3u.control": "efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114", "src/pl/plpython/plpython3u--1.0.sql": "efd75d202f9855b1cab3bc611f185813194c53902056037864632afc37dc3fb3"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0"}, "comparison_hash": "5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd"}, "12": {"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"}], "tables": [], "aliases": [], "related": [{"url": "/docs/12/plpython-data.html", "label": "plpython-data"}, {"url": "/docs/12/plpython-database.html", "label": "plpython-database"}, {"url": "/docs/12/plpython-do.html", "label": "plpython-do"}, {"url": "/docs/12/plpython-envar.html", "label": "plpython-envar"}, {"url": "/docs/12/plpython-funcs.html", "label": "plpython-funcs"}, {"url": "/docs/12/plpython-python23.html", "label": "plpython-python23"}, {"url": "/docs/12/plpython-sharing.html", "label": "plpython-sharing"}, {"url": "/docs/12/plpython-subtransaction.html", "label": "plpython-subtransaction"}, {"url": "/docs/12/plpython-transactions.html", "label": "plpython-transactions"}, {"url": "/docs/12/plpython-trigger.html", "label": "plpython-trigger"}, {"url": "/docs/12/plpython-util.html", "label": "plpython-util"}], "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", "catalog_fingerprint": "9f857f4ee4875f9c7de6bfc9df4b757dec8b3a0bb88eadb519c7bd267bd56149"}, "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/plpython.html", "path": "plpython.html", "label": "PostgreSQL 12 English manual", "sha256": "0f4eac1e31aff3e6ae5dc99e7bc6c34c50ab44222ab12d1c578a86ea5af19a33"}], "sections": [{"code": "/* src/pl/plpython/plpython3u--1.0.sql */\n\n/*\n * Currently, all the interesting stuff is done by CREATE LANGUAGE.\n * Later we will probably \"dumb down\" that command and put more of the\n * knowledge into this script.\n */\n\nCREATE LANGUAGE plpython3u;\n\nCOMMENT ON LANGUAGE plpython3u IS 'PL/Python3U untrusted procedural language';", "title": "Installation definition from the matching source archive", "paragraphs": ["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."]}], "signature": "", "attributes": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "comment": "PL/Python3U untrusted procedural language", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0", "module_pathname": "$libdir/plpython3"}, "description": ["PL/Python3U untrusted procedural language"], "manual_html": "<div class=\"chapter\" id=\"PLPYTHON\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">Chapter\u00a045.\u00a0PL/Python - Python Procedural Language</h2>\n</div>\n</div>\n</div>\n\n<p>The <span class=\"application\">PL/Python</span> procedural language allows <span class=\"productname\">PostgreSQL</span> functions and procedures to be written in the <a class=\"ulink\" href=\"https://www.python.org\">Python language</a>.</p>\n<p>To install PL/Python in a particular database, use <code class=\"literal\">CREATE EXTENSION plpythonu</code> (but see also <a class=\"xref\" href=\"/docs/12/plpython-python23.html\" title=\"45.1.\u00a0Python 2 vs. Python 3\">Section\u00a045.1</a>).</p>\n<div class=\"tip\">\n<h3 class=\"title\">Tip</h3>\n<p>If a language is installed into <code class=\"literal\">template1</code>, all subsequently created databases will have the language installed automatically.</p>\n</div>\n<p>PL/Python is only available as an <span class=\"quote\">\u201c<span class=\"quote\">untrusted</span>\u201d</span> language, meaning it does not offer any way of restricting what users can do in it and is therefore named <code class=\"literal\">plpythonu</code>. A trusted variant <code class=\"literal\">plpython</code> 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 <code class=\"literal\">plpythonu</code>.</p>\n<div class=\"note\">\n<h3 class=\"title\">Note</h3>\n<p>Users 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.</p>\n</div>\n</div>", "manual_path": "/docs/12/plpython.html", "source_files": {"src/pl/plpython/plpython3u.control": "efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114", "src/pl/plpython/plpython3u--1.0.sql": "fb7eb4dcf90bb30a1c2333c0a05bff5c24eb63bc1849c7bca4acd6c909524c5a"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0"}, "comparison_hash": "5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd"}, "13": {"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"}], "tables": [], "aliases": [], "related": [{"url": "/docs/13/plpython-data.html", "label": "plpython-data"}, {"url": "/docs/13/plpython-database.html", "label": "plpython-database"}, {"url": "/docs/13/plpython-do.html", "label": "plpython-do"}, {"url": "/docs/13/plpython-envar.html", "label": "plpython-envar"}, {"url": "/docs/13/plpython-funcs.html", "label": "plpython-funcs"}, {"url": "/docs/13/plpython-python23.html", "label": "plpython-python23"}, {"url": "/docs/13/plpython-sharing.html", "label": "plpython-sharing"}, {"url": "/docs/13/plpython-subtransaction.html", "label": "plpython-subtransaction"}, {"url": "/docs/13/plpython-transactions.html", "label": "plpython-transactions"}, {"url": "/docs/13/plpython-trigger.html", "label": "plpython-trigger"}, {"url": "/docs/13/plpython-util.html", "label": "plpython-util"}], "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", "catalog_fingerprint": "c7015c845255c9d721c547c8ab9ef37825d332588c9691d982e6906b7d571002"}, "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/plpython.html", "path": "plpython.html", "label": "PostgreSQL 13 English manual", "sha256": "5aee74b10a6edbfc58ef0eaea73e5b33975c31f01bdb30741676c261023e88c4"}], "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';", "title": "Installation definition from the matching source archive", "paragraphs": ["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."]}], "signature": "", "attributes": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "comment": "PL/Python3U untrusted procedural language", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0", "module_pathname": "$libdir/plpython3"}, "description": ["PL/Python3U untrusted procedural language"], "manual_html": "<div class=\"chapter\" id=\"PLPYTHON\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">Chapter\u00a045.\u00a0PL/Python \u2014 Python Procedural Language</h2>\n</div>\n</div>\n</div>\n\n<p>The <span class=\"application\">PL/Python</span> procedural language allows <span class=\"productname\">PostgreSQL</span> functions and procedures to be written in the <a class=\"ulink\" href=\"https://www.python.org\">Python language</a>.</p>\n<p>To install PL/Python in a particular database, use <code class=\"literal\">CREATE EXTENSION plpythonu</code> (but see also <a class=\"xref\" href=\"/docs/13/plpython-python23.html\" title=\"45.1.\u00a0Python 2 vs. Python 3\">Section\u00a045.1</a>).</p>\n<div class=\"tip\">\n<h3 class=\"title\">Tip</h3>\n<p>If a language is installed into <code class=\"literal\">template1</code>, all subsequently created databases will have the language installed automatically.</p>\n</div>\n<p>PL/Python is only available as an <span class=\"quote\">\u201c<span class=\"quote\">untrusted</span>\u201d</span> language, meaning it does not offer any way of restricting what users can do in it and is therefore named <code class=\"literal\">plpythonu</code>. A trusted variant <code class=\"literal\">plpython</code> 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 <code class=\"literal\">plpythonu</code>.</p>\n<div class=\"note\">\n<h3 class=\"title\">Note</h3>\n<p>Users 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.</p>\n</div>\n</div>", "manual_path": "/docs/13/plpython.html", "source_files": {"src/pl/plpython/plpython3u.control": "efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114", "src/pl/plpython/plpython3u--1.0.sql": "7c4588b4f1176b3bbec5f5b3fd851931fda88652ee3b3985cde4f88d75b11a65"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0"}, "comparison_hash": "5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd"}, "14": {"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"}], "tables": [], "aliases": [], "related": [{"url": "/docs/14/plpython-data.html", "label": "plpython-data"}, {"url": "/docs/14/plpython-database.html", "label": "plpython-database"}, {"url": "/docs/14/plpython-do.html", "label": "plpython-do"}, {"url": "/docs/14/plpython-envar.html", "label": "plpython-envar"}, {"url": "/docs/14/plpython-funcs.html", "label": "plpython-funcs"}, {"url": "/docs/14/plpython-python23.html", "label": "plpython-python23"}, {"url": "/docs/14/plpython-sharing.html", "label": "plpython-sharing"}, {"url": "/docs/14/plpython-subtransaction.html", "label": "plpython-subtransaction"}, {"url": "/docs/14/plpython-transactions.html", "label": "plpython-transactions"}, {"url": "/docs/14/plpython-trigger.html", "label": "plpython-trigger"}, {"url": "/docs/14/plpython-util.html", "label": "plpython-util"}], "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", "catalog_fingerprint": "b272e6a82e4c46efda81c3a6a4cdf7de6a83dfff7f02f226a392fbe9acdd3adb"}, "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/plpython.html", "path": "plpython.html", "label": "PostgreSQL 14 English manual", "sha256": "3c84c78db04798bdd98ee4320a8d26749337373d29e6f05c0a76997f03b73b61"}], "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';", "title": "Installation definition from the matching source archive", "paragraphs": ["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."]}], "signature": "", "attributes": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "comment": "PL/Python3U untrusted procedural language", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0", "module_pathname": "$libdir/plpython3"}, "description": ["PL/Python3U untrusted procedural language"], "manual_html": "<div class=\"chapter\" id=\"PLPYTHON\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">Chapter\u00a046.\u00a0PL/Python \u2014 Python Procedural Language</h2>\n</div>\n</div>\n</div>\n\n<p>The <span class=\"application\">PL/Python</span> procedural language allows <span class=\"productname\">PostgreSQL</span> functions and procedures to be written in the <a class=\"ulink\" href=\"https://www.python.org\">Python language</a>.</p>\n<p>To install PL/Python in a particular database, use <code class=\"literal\">CREATE EXTENSION plpythonu</code> (but see also <a class=\"xref\" href=\"/docs/14/plpython-python23.html\" title=\"46.1.\u00a0Python 2 vs. Python 3\">Section\u00a046.1</a>).</p>\n<div class=\"tip\">\n<h3 class=\"title\">Tip</h3>\n<p>If a language is installed into <code class=\"literal\">template1</code>, all subsequently created databases will have the language installed automatically.</p>\n</div>\n<p>PL/Python is only available as an <span class=\"quote\">\u201c<span class=\"quote\">untrusted</span>\u201d</span> language, meaning it does not offer any way of restricting what users can do in it and is therefore named <code class=\"literal\">plpythonu</code>. A trusted variant <code class=\"literal\">plpython</code> 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 <code class=\"literal\">plpythonu</code>.</p>\n<div class=\"note\">\n<h3 class=\"title\">Note</h3>\n<p>Users 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.</p>\n</div>\n</div>", "manual_path": "/docs/14/plpython.html", "source_files": {"src/pl/plpython/plpython3u.control": "efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114", "src/pl/plpython/plpython3u--1.0.sql": "7c4588b4f1176b3bbec5f5b3fd851931fda88652ee3b3985cde4f88d75b11a65"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0"}, "comparison_hash": "5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd"}, "15": {"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"}], "tables": [], "aliases": [], "related": [{"url": "/docs/15/plpython-data.html", "label": "plpython-data"}, {"url": "/docs/15/plpython-database.html", "label": "plpython-database"}, {"url": "/docs/15/plpython-do.html", "label": "plpython-do"}, {"url": "/docs/15/plpython-envar.html", "label": "plpython-envar"}, {"url": "/docs/15/plpython-funcs.html", "label": "plpython-funcs"}, {"url": "/docs/15/plpython-python23.html", "label": "plpython-python23"}, {"url": "/docs/15/plpython-sharing.html", "label": "plpython-sharing"}, {"url": "/docs/15/plpython-subtransaction.html", "label": "plpython-subtransaction"}, {"url": "/docs/15/plpython-transactions.html", "label": "plpython-transactions"}, {"url": "/docs/15/plpython-trigger.html", "label": "plpython-trigger"}, {"url": "/docs/15/plpython-util.html", "label": "plpython-util"}], "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", "catalog_fingerprint": "fefe3c425147a86defada190c9b0663cfe02caa1724f5dede93e46457572252d"}, "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/plpython.html", "path": "plpython.html", "label": "PostgreSQL 15 English manual", "sha256": "045256d5e475fdad5e4ef2ac0d139864649e493313cb27cd6a78548902c72e8d"}], "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';", "title": "Installation definition from the matching source archive", "paragraphs": ["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."]}], "signature": "", "attributes": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "comment": "PL/Python3U untrusted procedural language", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0", "module_pathname": "$libdir/plpython3"}, "description": ["PL/Python3U untrusted procedural language"], "manual_html": "<div class=\"chapter\" id=\"PLPYTHON\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">Chapter\u00a046.\u00a0PL/Python \u2014 Python Procedural Language</h2>\n</div>\n</div>\n</div>\n\n<p>The <span class=\"application\">PL/Python</span> procedural language allows <span class=\"productname\">PostgreSQL</span> functions and procedures to be written in the <a class=\"ulink\" href=\"https://www.python.org\">Python language</a>.</p>\n<p>To install PL/Python in a particular database, use <code class=\"literal\">CREATE EXTENSION plpython3u</code>.</p>\n<div class=\"tip\">\n<h3 class=\"title\">Tip</h3>\n<p>If a language is installed into <code class=\"literal\">template1</code>, all subsequently created databases will have the language installed automatically.</p>\n</div>\n<p>PL/Python is only available as an <span class=\"quote\">\u201c<span class=\"quote\">untrusted</span>\u201d</span> language, meaning it does not offer any way of restricting what users can do in it and is therefore named <code class=\"literal\">plpython3u</code>. A trusted variant <code class=\"literal\">plpython</code> 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 <code class=\"literal\">plpython3u</code>.</p>\n<div class=\"note\">\n<h3 class=\"title\">Note</h3>\n<p>Users 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.</p>\n</div>\n</div>", "manual_path": "/docs/15/plpython.html", "source_files": {"src/pl/plpython/plpython3u.control": "efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114", "src/pl/plpython/plpython3u--1.0.sql": "7c4588b4f1176b3bbec5f5b3fd851931fda88652ee3b3985cde4f88d75b11a65"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0"}, "comparison_hash": "5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd"}, "16": {"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"}], "tables": [], "aliases": [], "related": [{"url": "/docs/16/plpython-data.html", "label": "plpython-data"}, {"url": "/docs/16/plpython-database.html", "label": "plpython-database"}, {"url": "/docs/16/plpython-do.html", "label": "plpython-do"}, {"url": "/docs/16/plpython-envar.html", "label": "plpython-envar"}, {"url": "/docs/16/plpython-funcs.html", "label": "plpython-funcs"}, {"url": "/docs/16/plpython-python23.html", "label": "plpython-python23"}, {"url": "/docs/16/plpython-sharing.html", "label": "plpython-sharing"}, {"url": "/docs/16/plpython-subtransaction.html", "label": "plpython-subtransaction"}, {"url": "/docs/16/plpython-transactions.html", "label": "plpython-transactions"}, {"url": "/docs/16/plpython-trigger.html", "label": "plpython-trigger"}, {"url": "/docs/16/plpython-util.html", "label": "plpython-util"}], "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", "catalog_fingerprint": "fa133458dc8f52e15083b4f59b7a582e2e378b608d3ac5c53054df458a374e23"}, "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/plpython.html", "path": "plpython.html", "label": "PostgreSQL 16 English manual", "sha256": "c798fdce53ce5c73d31b3232729b7058c4319247ce26680c8613b72e8c0df2b7"}], "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';", "title": "Installation definition from the matching source archive", "paragraphs": ["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."]}], "signature": "", "attributes": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "comment": "PL/Python3U untrusted procedural language", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0", "module_pathname": "$libdir/plpython3"}, "description": ["PL/Python3U untrusted procedural language"], "manual_html": "<div class=\"chapter\" id=\"PLPYTHON\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">Chapter\u00a046.\u00a0PL/Python \u2014 Python Procedural Language</h2>\n</div>\n</div>\n</div>\n\n<p>The <span class=\"application\">PL/Python</span> procedural language allows <span class=\"productname\">PostgreSQL</span> functions and procedures to be written in the <a class=\"ulink\" href=\"https://www.python.org\">Python language</a>.</p>\n<p>To install PL/Python in a particular database, use <code class=\"literal\">CREATE EXTENSION plpython3u</code>.</p>\n<div class=\"tip\">\n<h3 class=\"title\">Tip</h3>\n<p>If a language is installed into <code class=\"literal\">template1</code>, all subsequently created databases will have the language installed automatically.</p>\n</div>\n<p>PL/Python is only available as an <span class=\"quote\">\u201c<span class=\"quote\">untrusted</span>\u201d</span> language, meaning it does not offer any way of restricting what users can do in it and is therefore named <code class=\"literal\">plpython3u</code>. A trusted variant <code class=\"literal\">plpython</code> 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 <code class=\"literal\">plpython3u</code>.</p>\n<div class=\"note\">\n<h3 class=\"title\">Note</h3>\n<p>Users 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.</p>\n</div>\n</div>", "manual_path": "/docs/16/plpython.html", "source_files": {"src/pl/plpython/plpython3u.control": "efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114", "src/pl/plpython/plpython3u--1.0.sql": "7c4588b4f1176b3bbec5f5b3fd851931fda88652ee3b3985cde4f88d75b11a65"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0"}, "comparison_hash": "5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd"}, "17": {"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"}], "tables": [], "aliases": [], "related": [{"url": "/docs/17/plpython-data.html", "label": "plpython-data"}, {"url": "/docs/17/plpython-database.html", "label": "plpython-database"}, {"url": "/docs/17/plpython-do.html", "label": "plpython-do"}, {"url": "/docs/17/plpython-envar.html", "label": "plpython-envar"}, {"url": "/docs/17/plpython-funcs.html", "label": "plpython-funcs"}, {"url": "/docs/17/plpython-python23.html", "label": "plpython-python23"}, {"url": "/docs/17/plpython-sharing.html", "label": "plpython-sharing"}, {"url": "/docs/17/plpython-subtransaction.html", "label": "plpython-subtransaction"}, {"url": "/docs/17/plpython-transactions.html", "label": "plpython-transactions"}, {"url": "/docs/17/plpython-trigger.html", "label": "plpython-trigger"}, {"url": "/docs/17/plpython-util.html", "label": "plpython-util"}], "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", "catalog_fingerprint": "4bbe3ac77becd618478f66aec420a533e9017be356c5c1d51a4b17f0fd497c07"}, "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/plpython.html", "path": "plpython.html", "label": "PostgreSQL 17 English manual", "sha256": "e4557b7b075b6480e6998241ad2a1234fc7c94e8a428faaf2725eccdf1aa64c3"}], "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';", "title": "Installation definition from the matching source archive", "paragraphs": ["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."]}], "signature": "", "attributes": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "comment": "PL/Python3U untrusted procedural language", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0", "module_pathname": "$libdir/plpython3"}, "description": ["PL/Python3U untrusted procedural language"], "manual_html": "<div class=\"chapter\" id=\"PLPYTHON\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">Chapter\u00a044.\u00a0PL/Python \u2014 Python Procedural Language</h2>\n</div>\n</div>\n</div>\n\n<p>The <span class=\"application\">PL/Python</span> procedural language allows <span class=\"productname\">PostgreSQL</span> functions and procedures to be written in the <a class=\"ulink\" href=\"https://www.python.org\">Python language</a>.</p>\n<p>To install PL/Python in a particular database, use <code class=\"literal\">CREATE EXTENSION plpython3u</code>.</p>\n<div class=\"tip\">\n<h3 class=\"title\">Tip</h3>\n<p>If a language is installed into <code class=\"literal\">template1</code>, all subsequently created databases will have the language installed automatically.</p>\n</div>\n<p>PL/Python is only available as an <span class=\"quote\">\u201c<span class=\"quote\">untrusted</span>\u201d</span> language, meaning it does not offer any way of restricting what users can do in it and is therefore named <code class=\"literal\">plpython3u</code>. A trusted variant <code class=\"literal\">plpython</code> 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 <code class=\"literal\">plpython3u</code>.</p>\n<div class=\"note\">\n<h3 class=\"title\">Note</h3>\n<p>Users 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.</p>\n</div>\n</div>", "manual_path": "/docs/17/plpython.html", "source_files": {"src/pl/plpython/plpython3u.control": "efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114", "src/pl/plpython/plpython3u--1.0.sql": "7c4588b4f1176b3bbec5f5b3fd851931fda88652ee3b3985cde4f88d75b11a65"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0"}, "comparison_hash": "5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd"}, "18": {"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"}], "tables": [], "aliases": [], "related": [{"url": "/docs/18/plpython-data.html", "label": "plpython-data"}, {"url": "/docs/18/plpython-database.html", "label": "plpython-database"}, {"url": "/docs/18/plpython-do.html", "label": "plpython-do"}, {"url": "/docs/18/plpython-envar.html", "label": "plpython-envar"}, {"url": "/docs/18/plpython-funcs.html", "label": "plpython-funcs"}, {"url": "/docs/18/plpython-python23.html", "label": "plpython-python23"}, {"url": "/docs/18/plpython-sharing.html", "label": "plpython-sharing"}, {"url": "/docs/18/plpython-subtransaction.html", "label": "plpython-subtransaction"}, {"url": "/docs/18/plpython-transactions.html", "label": "plpython-transactions"}, {"url": "/docs/18/plpython-trigger.html", "label": "plpython-trigger"}, {"url": "/docs/18/plpython-util.html", "label": "plpython-util"}], "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", "catalog_fingerprint": "65c93d6048ef30e61023a84f9680fa6a92b1c383b7eb226741170077eb078502"}, "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/plpython.html", "path": "plpython.html", "label": "PostgreSQL 18 English manual", "sha256": "71a8ee61599ffebaf8d3b7369b3722728367c00fb6a108f3f16e7a93124d5a90"}], "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';", "title": "Installation definition from the matching source archive", "paragraphs": ["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."]}], "signature": "", "attributes": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "comment": "PL/Python3U untrusted procedural language", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0", "module_pathname": "$libdir/plpython3"}, "description": ["PL/Python3U untrusted procedural language"], "manual_html": "<div class=\"chapter\" id=\"PLPYTHON\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">Chapter\u00a044.\u00a0PL/Python \u2014 Python Procedural Language</h2>\n</div>\n</div>\n</div>\n\n<p>The <span class=\"application\">PL/Python</span> procedural language allows <span class=\"productname\">PostgreSQL</span> functions and procedures to be written in the <a class=\"ulink\" href=\"https://www.python.org\">Python language</a>.</p>\n<p>To install PL/Python in a particular database, use <code class=\"literal\">CREATE EXTENSION plpython3u</code>.</p>\n<div class=\"tip\">\n<h3 class=\"title\">Tip</h3>\n<p>If a language is installed into <code class=\"literal\">template1</code>, all subsequently created databases will have the language installed automatically.</p>\n</div>\n<p>PL/Python is only available as an <span class=\"quote\">\u201c<span class=\"quote\">untrusted</span>\u201d</span> language, meaning it does not offer any way of restricting what users can do in it and is therefore named <code class=\"literal\">plpython3u</code>. A trusted variant <code class=\"literal\">plpython</code> 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 <code class=\"literal\">plpython3u</code>.</p>\n<div class=\"note\">\n<h3 class=\"title\">Note</h3>\n<p>Users 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.</p>\n</div>\n</div>", "manual_path": "/docs/18/plpython.html", "source_files": {"src/pl/plpython/plpython3u.control": "efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114", "src/pl/plpython/plpython3u--1.0.sql": "7c4588b4f1176b3bbec5f5b3fd851931fda88652ee3b3985cde4f88d75b11a65"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0"}, "comparison_hash": "5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd"}, "19": {"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"}], "tables": [], "aliases": [], "related": [{"url": "/docs/19/plpython-data.html", "label": "plpython-data"}, {"url": "/docs/19/plpython-database.html", "label": "plpython-database"}, {"url": "/docs/19/plpython-do.html", "label": "plpython-do"}, {"url": "/docs/19/plpython-envar.html", "label": "plpython-envar"}, {"url": "/docs/19/plpython-event-trigger.html", "label": "plpython-event-trigger"}, {"url": "/docs/19/plpython-funcs.html", "label": "plpython-funcs"}, {"url": "/docs/19/plpython-python23.html", "label": "plpython-python23"}, {"url": "/docs/19/plpython-sharing.html", "label": "plpython-sharing"}, {"url": "/docs/19/plpython-subtransaction.html", "label": "plpython-subtransaction"}, {"url": "/docs/19/plpython-transactions.html", "label": "plpython-transactions"}, {"url": "/docs/19/plpython-trigger.html", "label": "plpython-trigger"}, {"url": "/docs/19/plpython-util.html", "label": "plpython-util"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "label": "19beta4", "major": "19", "channel": "preview", "revision": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86", "source_sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86", "catalog_fingerprint": "62fbf1a3689dbe8bf7e6b3372cfe6fbf867581427b3858a94c8419b77a4d2d1d"}, "sources": [{"url": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, {"url": "/docs/19/plpython.html", "path": "plpython.html", "label": "PostgreSQL 19 English manual", "sha256": "164a014046e3c9955a97cc083e6ed2e398f3588b222624a81f74a1e9b295e3c5"}], "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';", "title": "Installation definition from the matching source archive", "paragraphs": ["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."]}], "signature": "", "attributes": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "comment": "PL/Python3U untrusted procedural language", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0", "module_pathname": "$libdir/plpython3"}, "description": ["PL/Python3U untrusted procedural language"], "manual_html": "<div class=\"chapter\" id=\"PLPYTHON\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">Chapter\u00a044.\u00a0PL/Python \u2014 Python Procedural Language</h2>\n</div>\n</div>\n</div>\n\n<p>The <span class=\"application\">PL/Python</span> procedural language allows <span class=\"productname\">PostgreSQL</span> functions and procedures to be written in the <a class=\"ulink\" href=\"https://www.python.org\">Python language</a>.</p>\n<p>To install PL/Python in a particular database, use <code class=\"literal\">CREATE EXTENSION plpython3u</code>.</p>\n<div class=\"tip\">\n<h3 class=\"title\">Tip</h3>\n<p>If a language is installed into <code class=\"literal\">template1</code>, all subsequently created databases will have the language installed automatically.</p>\n</div>\n<p>PL/Python is only available as an <span class=\"quote\">\u201c<span class=\"quote\">untrusted</span>\u201d</span> language, meaning it does not offer any way of restricting what users can do in it and is therefore named <code class=\"literal\">plpython3u</code>. A trusted variant <code class=\"literal\">plpython</code> 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 <code class=\"literal\">plpython3u</code>.</p>\n<div class=\"note\">\n<h3 class=\"title\">Note</h3>\n<p>Users 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.</p>\n</div>\n</div>", "manual_path": "/docs/19/plpython.html", "source_files": {"src/pl/plpython/plpython3u.control": "efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114", "src/pl/plpython/plpython3u--1.0.sql": "7c4588b4f1176b3bbec5f5b3fd851931fda88652ee3b3985cde4f88d75b11a65"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0"}, "comparison_hash": "5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd"}, "20": {"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"}], "tables": [], "aliases": [], "related": [{"url": "/docs/devel/plpython-data.html", "label": "plpython-data"}, {"url": "/docs/devel/plpython-database.html", "label": "plpython-database"}, {"url": "/docs/devel/plpython-do.html", "label": "plpython-do"}, {"url": "/docs/devel/plpython-envar.html", "label": "plpython-envar"}, {"url": "/docs/devel/plpython-event-trigger.html", "label": "plpython-event-trigger"}, {"url": "/docs/devel/plpython-funcs.html", "label": "plpython-funcs"}, {"url": "/docs/devel/plpython-python23.html", "label": "plpython-python23"}, {"url": "/docs/devel/plpython-sharing.html", "label": "plpython-sharing"}, {"url": "/docs/devel/plpython-subtransaction.html", "label": "plpython-subtransaction"}, {"url": "/docs/devel/plpython-transactions.html", "label": "plpython-transactions"}, {"url": "/docs/devel/plpython-trigger.html", "label": "plpython-trigger"}, {"url": "/docs/devel/plpython-util.html", "label": "plpython-util"}], "release": {"ref": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "20devel", "major": "20", "channel": "devel", "revision": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41", "source_sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41", "catalog_fingerprint": "398fbb9f262264053c02fbf79f88be0a6770c1473faa6ecd5931d6ec41b8258b", "source_snapshot_utc": "26-Sep-2026 20:22"}, "sources": [{"url": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "Matching PostgreSQL source archive", "sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}, {"url": "/docs/devel/plpython.html", "path": "plpython.html", "label": "PostgreSQL 20 English manual", "sha256": "fc014555f7a9ba9053b5ae1a669f11ec30ab51638b8ef1406f8006518d98d493"}], "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';", "title": "Installation definition from the matching source archive", "paragraphs": ["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."]}], "signature": "", "attributes": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "comment": "PL/Python3U untrusted procedural language", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0", "module_pathname": "$libdir/plpython3"}, "description": ["PL/Python3U untrusted procedural language"], "manual_html": "<div class=\"chapter\" id=\"PLPYTHON\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">Chapter\u00a044.\u00a0PL/Python \u2014 Python Procedural Language</h2>\n</div>\n</div>\n</div>\n\n<p>The <span class=\"application\">PL/Python</span> procedural language allows <span class=\"productname\">PostgreSQL</span> functions and procedures to be written in the <a class=\"ulink\" href=\"https://www.python.org\">Python language</a>.</p>\n<p>To install PL/Python in a particular database, use <code class=\"literal\">CREATE EXTENSION plpython3u</code>.</p>\n<div class=\"tip\">\n<h3 class=\"title\">Tip</h3>\n<p>If a language is installed into <code class=\"literal\">template1</code>, all subsequently created databases will have the language installed automatically.</p>\n</div>\n<p>PL/Python is only available as an <span class=\"quote\">\u201c<span class=\"quote\">untrusted</span>\u201d</span> language, meaning it does not offer any way of restricting what users can do in it and is therefore named <code class=\"literal\">plpython3u</code>. A trusted variant <code class=\"literal\">plpython</code> 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 <code class=\"literal\">plpython3u</code>.</p>\n<div class=\"note\">\n<h3 class=\"title\">Note</h3>\n<p>Users 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.</p>\n</div>\n</div>", "manual_path": "/docs/devel/plpython.html", "source_files": {"src/pl/plpython/plpython3u.control": "efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114", "src/pl/plpython/plpython3u--1.0.sql": "7c4588b4f1176b3bbec5f5b3fd851931fda88652ee3b3985cde4f88d75b11a65"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0"}, "comparison_hash": "5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd"}}}, "snapshot": {"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"}], "tables": [], "aliases": [], "related": [{"url": "/docs/18/plpython-data.html", "label": "plpython-data"}, {"url": "/docs/18/plpython-database.html", "label": "plpython-database"}, {"url": "/docs/18/plpython-do.html", "label": "plpython-do"}, {"url": "/docs/18/plpython-envar.html", "label": "plpython-envar"}, {"url": "/docs/18/plpython-funcs.html", "label": "plpython-funcs"}, {"url": "/docs/18/plpython-python23.html", "label": "plpython-python23"}, {"url": "/docs/18/plpython-sharing.html", "label": "plpython-sharing"}, {"url": "/docs/18/plpython-subtransaction.html", "label": "plpython-subtransaction"}, {"url": "/docs/18/plpython-transactions.html", "label": "plpython-transactions"}, {"url": "/docs/18/plpython-trigger.html", "label": "plpython-trigger"}, {"url": "/docs/18/plpython-util.html", "label": "plpython-util"}], "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", "catalog_fingerprint": "65c93d6048ef30e61023a84f9680fa6a92b1c383b7eb226741170077eb078502"}, "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/plpython.html", "path": "plpython.html", "label": "PostgreSQL 18 English manual", "sha256": "71a8ee61599ffebaf8d3b7369b3722728367c00fb6a108f3f16e7a93124d5a90"}], "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';", "title": "Installation definition from the matching source archive", "paragraphs": ["This extension is shipped with the source. Its presence does not establish that the language or external runtime is installed."]}], "signature": "", "attributes": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "comment": "PL/Python3U untrusted procedural language", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0", "module_pathname": "$libdir/plpython3"}, "description": ["PL/Python3U untrusted procedural language"], "manual_html": "<div class=\"chapter\" id=\"PLPYTHON\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">Chapter\u00a044.\u00a0PL/Python \u2014 Python Procedural Language</h2>\n</div>\n</div>\n</div>\n\n<p>The <span class=\"application\">PL/Python</span> procedural language allows <span class=\"productname\">PostgreSQL</span> functions and procedures to be written in the <a class=\"ulink\" href=\"https://www.python.org\">Python language</a>.</p>\n<p>To install PL/Python in a particular database, use <code class=\"literal\">CREATE EXTENSION plpython3u</code>.</p>\n<div class=\"tip\">\n<h3 class=\"title\">Tip</h3>\n<p>If a language is installed into <code class=\"literal\">template1</code>, all subsequently created databases will have the language installed automatically.</p>\n</div>\n<p>PL/Python is only available as an <span class=\"quote\">\u201c<span class=\"quote\">untrusted</span>\u201d</span> language, meaning it does not offer any way of restricting what users can do in it and is therefore named <code class=\"literal\">plpython3u</code>. A trusted variant <code class=\"literal\">plpython</code> 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 <code class=\"literal\">plpython3u</code>.</p>\n<div class=\"note\">\n<h3 class=\"title\">Note</h3>\n<p>Users 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.</p>\n</div>\n</div>", "manual_path": "/docs/18/plpython.html", "source_files": {"src/pl/plpython/plpython3u.control": "efdfc8503fb9e88e0ecf3c8352ea2fd187ef698e10d67f152b37c7855b9a6114", "src/pl/plpython/plpython3u--1.0.sql": "7c4588b4f1176b3bbec5f5b3fd851931fda88652ee3b3985cde4f88d75b11a65"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Python", "handler": "plpython3_call_handler", "library": "$libdir/plpython3", "trusted": "f", "validator": "plpython3_validator", "inline_handler": "plpython3_inline_handler", "default_version": "1.0"}, "comparison_hash": "5e975c2ecc8e375e26a1703928d39bd29f0cfaafa37f8e98a462e947107f78cd"}, "comparison": {"left": "17", "right": "18", "status": "unchanged", "diff": ""}}