{"kind": "language", "major": "18", "item": {"slug": "pltclu", "name": "pltclu", "name_zh": "", "category": "PL/Tcl", "summary": "PL/TclU untrusted procedural language", "aliases": [], "content_hash": "978d6468963c6b1f279806e037135a9949da86234aa52b54dc3d6db189fc31ab", "versions": {"10": {"facts": [{"label": "Kind", "value": "Bundled procedural-language variant"}, {"label": "Family", "value": "PL/Tcl"}, {"label": "Trusted", "value": "f"}, {"label": "Handler", "value": "pltclu_call_handler"}, {"label": "Library", "value": "$libdir/pltcl"}, {"label": "Default version", "value": "1.0"}, {"label": "Module pathname", "value": "$libdir/pltcl"}, {"label": "Comment", "value": "PL/TclU untrusted procedural language"}], "tables": [], "aliases": [], "related": [{"url": "/docs/10/pltcl-config.html", "label": "pltcl-config"}, {"url": "/docs/10/pltcl-data.html", "label": "pltcl-data"}, {"url": "/docs/10/pltcl-dbaccess.html", "label": "pltcl-dbaccess"}, {"url": "/docs/10/pltcl-error-handling.html", "label": "pltcl-error-handling"}, {"url": "/docs/10/pltcl-event-trigger.html", "label": "pltcl-event-trigger"}, {"url": "/docs/10/pltcl-functions.html", "label": "pltcl-functions"}, {"url": "/docs/10/pltcl-global.html", "label": "pltcl-global"}, {"url": "/docs/10/pltcl-overview.html", "label": "pltcl-overview"}, {"url": "/docs/10/pltcl-procnames.html", "label": "pltcl-procnames"}, {"url": "/docs/10/pltcl-subtransactions.html", "label": "pltcl-subtransactions"}, {"url": "/docs/10/pltcl-trigger.html", "label": "pltcl-trigger"}], "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/pltcl-overview.html", "path": "pltcl-overview.html", "label": "PostgreSQL 10 English manual", "sha256": "2df6e5d2ee2a445d19335fe73df55bcd9f135eedd9f243c8f6ec2cade7d0bff0"}], "sections": [{"code": "/* src/pl/tcl/pltclu--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 pltclu;\n\nCOMMENT ON PROCEDURAL LANGUAGE pltclu IS 'PL/TclU 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/Tcl", "comment": "PL/TclU untrusted procedural language", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0", "module_pathname": "$libdir/pltcl"}, "description": ["PL/TclU untrusted procedural language"], "manual_html": "<div class=\"sect1\" id=\"PLTCL-OVERVIEW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">43.1.\u00a0Overview</h2>\n</div>\n</div>\n</div>\n<p>PL/Tcl offers most of the capabilities a function writer has in the C language, with a few restrictions, and with the addition of the powerful string processing libraries that are available for Tcl.</p>\n<p>One compelling <span class=\"emphasis\"><em>good</em></span> restriction is that everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via SPI and to raise messages via <code class=\"function\">elog()</code>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <span class=\"productname\">PostgreSQL</span> server process, as a C function can do. Thus, unprivileged database users can be trusted to use this language; it does not give them unlimited authority.</p>\n<p>The other notable implementation restriction is that Tcl functions cannot be used to create input/output functions for new data types.</p>\n<p>Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends email. To handle these cases, there is a variant of <span class=\"application\">PL/Tcl</span> called <code class=\"literal\">PL/TclU</code> (for untrusted Tcl). This is exactly the same language except that a full Tcl interpreter is used. <span class=\"emphasis\"><em>If <span class=\"application\">PL/TclU</span> is used, it must be installed as an untrusted procedural language</em></span> so that only database superusers can create functions in it. The writer of a <span class=\"application\">PL/TclU</span> function 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.</p>\n<p>The shared object code for the <span class=\"application\">PL/Tcl</span> and <span class=\"application\">PL/TclU</span> call handlers is automatically built and installed in the <span class=\"productname\">PostgreSQL</span> library directory if Tcl support is specified in the configuration step of the installation procedure. To install <span class=\"application\">PL/Tcl</span> and/or <span class=\"application\">PL/TclU</span> in a particular database, use the <code class=\"command\">CREATE EXTENSION</code> command, for example <code class=\"literal\">CREATE EXTENSION pltcl</code> or <code class=\"literal\">CREATE EXTENSION pltclu</code>.</p>\n</div>", "manual_path": "/docs/10/pltcl-overview.html", "source_files": {"src/pl/tcl/pltclu.control": "f8b2f8f3b14be8d14326913047eb320227f6891f6d303eecf300f0231ac853d4", "src/pl/tcl/pltclu--1.0.sql": "b7c8527b81a5f6eb6b04ed1ad0d41b1f8a44eec84a754c5289969ece93996ef1"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Tcl", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0"}, "comparison_hash": "f76f2eec7aa9560ce301885f25a023a15137ef259d3f0536f267d92fdb9f3ffe"}, "11": {"facts": [{"label": "Kind", "value": "Bundled procedural-language variant"}, {"label": "Family", "value": "PL/Tcl"}, {"label": "Trusted", "value": "f"}, {"label": "Handler", "value": "pltclu_call_handler"}, {"label": "Library", "value": "$libdir/pltcl"}, {"label": "Default version", "value": "1.0"}, {"label": "Module pathname", "value": "$libdir/pltcl"}, {"label": "Comment", "value": "PL/TclU untrusted procedural language"}], "tables": [], "aliases": [], "related": [{"url": "/docs/11/pltcl-config.html", "label": "pltcl-config"}, {"url": "/docs/11/pltcl-data.html", "label": "pltcl-data"}, {"url": "/docs/11/pltcl-dbaccess.html", "label": "pltcl-dbaccess"}, {"url": "/docs/11/pltcl-error-handling.html", "label": "pltcl-error-handling"}, {"url": "/docs/11/pltcl-event-trigger.html", "label": "pltcl-event-trigger"}, {"url": "/docs/11/pltcl-functions.html", "label": "pltcl-functions"}, {"url": "/docs/11/pltcl-global.html", "label": "pltcl-global"}, {"url": "/docs/11/pltcl-overview.html", "label": "pltcl-overview"}, {"url": "/docs/11/pltcl-procnames.html", "label": "pltcl-procnames"}, {"url": "/docs/11/pltcl-subtransactions.html", "label": "pltcl-subtransactions"}, {"url": "/docs/11/pltcl-transactions.html", "label": "pltcl-transactions"}, {"url": "/docs/11/pltcl-trigger.html", "label": "pltcl-trigger"}], "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/pltcl-overview.html", "path": "pltcl-overview.html", "label": "PostgreSQL 11 English manual", "sha256": "23152ba386b19fe4e6e11d2b20933742b23ee8474c9300b9d8abc3cfd32ed400"}], "sections": [{"code": "/* src/pl/tcl/pltclu--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 pltclu;\n\nCOMMENT ON PROCEDURAL LANGUAGE pltclu IS 'PL/TclU 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/Tcl", "comment": "PL/TclU untrusted procedural language", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0", "module_pathname": "$libdir/pltcl"}, "description": ["PL/TclU untrusted procedural language"], "manual_html": "<div class=\"sect1\" id=\"PLTCL-OVERVIEW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">44.1.\u00a0Overview</h2>\n</div>\n</div>\n</div>\n<p>PL/Tcl offers most of the capabilities a function writer has in the C language, with a few restrictions, and with the addition of the powerful string processing libraries that are available for Tcl.</p>\n<p>One compelling <span class=\"emphasis\"><em>good</em></span> restriction is that everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via SPI and to raise messages via <code class=\"function\">elog()</code>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <span class=\"productname\">PostgreSQL</span> server process, as a C function can do. Thus, unprivileged database users can be trusted to use this language; it does not give them unlimited authority.</p>\n<p>The other notable implementation restriction is that Tcl functions cannot be used to create input/output functions for new data types.</p>\n<p>Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends email. To handle these cases, there is a variant of <span class=\"application\">PL/Tcl</span> called <code class=\"literal\">PL/TclU</code> (for untrusted Tcl). This is exactly the same language except that a full Tcl interpreter is used. <span class=\"emphasis\"><em>If <span class=\"application\">PL/TclU</span> is used, it must be installed as an untrusted procedural language</em></span> so that only database superusers can create functions in it. The writer of a <span class=\"application\">PL/TclU</span> function 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.</p>\n<p>The shared object code for the <span class=\"application\">PL/Tcl</span> and <span class=\"application\">PL/TclU</span> call handlers is automatically built and installed in the <span class=\"productname\">PostgreSQL</span> library directory if Tcl support is specified in the configuration step of the installation procedure. To install <span class=\"application\">PL/Tcl</span> and/or <span class=\"application\">PL/TclU</span> in a particular database, use the <code class=\"command\">CREATE EXTENSION</code> command, for example <code class=\"literal\">CREATE EXTENSION pltcl</code> or <code class=\"literal\">CREATE EXTENSION pltclu</code>.</p>\n</div>", "manual_path": "/docs/11/pltcl-overview.html", "source_files": {"src/pl/tcl/pltclu.control": "f8b2f8f3b14be8d14326913047eb320227f6891f6d303eecf300f0231ac853d4", "src/pl/tcl/pltclu--1.0.sql": "b7c8527b81a5f6eb6b04ed1ad0d41b1f8a44eec84a754c5289969ece93996ef1"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Tcl", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0"}, "comparison_hash": "f76f2eec7aa9560ce301885f25a023a15137ef259d3f0536f267d92fdb9f3ffe"}, "12": {"facts": [{"label": "Kind", "value": "Bundled procedural-language variant"}, {"label": "Family", "value": "PL/Tcl"}, {"label": "Trusted", "value": "f"}, {"label": "Handler", "value": "pltclu_call_handler"}, {"label": "Library", "value": "$libdir/pltcl"}, {"label": "Default version", "value": "1.0"}, {"label": "Module pathname", "value": "$libdir/pltcl"}, {"label": "Comment", "value": "PL/TclU untrusted procedural language"}], "tables": [], "aliases": [], "related": [{"url": "/docs/12/pltcl-config.html", "label": "pltcl-config"}, {"url": "/docs/12/pltcl-data.html", "label": "pltcl-data"}, {"url": "/docs/12/pltcl-dbaccess.html", "label": "pltcl-dbaccess"}, {"url": "/docs/12/pltcl-error-handling.html", "label": "pltcl-error-handling"}, {"url": "/docs/12/pltcl-event-trigger.html", "label": "pltcl-event-trigger"}, {"url": "/docs/12/pltcl-functions.html", "label": "pltcl-functions"}, {"url": "/docs/12/pltcl-global.html", "label": "pltcl-global"}, {"url": "/docs/12/pltcl-overview.html", "label": "pltcl-overview"}, {"url": "/docs/12/pltcl-procnames.html", "label": "pltcl-procnames"}, {"url": "/docs/12/pltcl-subtransactions.html", "label": "pltcl-subtransactions"}, {"url": "/docs/12/pltcl-transactions.html", "label": "pltcl-transactions"}, {"url": "/docs/12/pltcl-trigger.html", "label": "pltcl-trigger"}], "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/pltcl-overview.html", "path": "pltcl-overview.html", "label": "PostgreSQL 12 English manual", "sha256": "7b095ed70fc9f919b487d6d1c0db5cc886c3d2df0d24a546a51705e1efe03eb1"}], "sections": [{"code": "/* src/pl/tcl/pltclu--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 pltclu;\n\nCOMMENT ON LANGUAGE pltclu IS 'PL/TclU 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/Tcl", "comment": "PL/TclU untrusted procedural language", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0", "module_pathname": "$libdir/pltcl"}, "description": ["PL/TclU untrusted procedural language"], "manual_html": "<div class=\"sect1\" id=\"PLTCL-OVERVIEW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">43.1.\u00a0Overview</h2>\n</div>\n</div>\n</div>\n<p>PL/Tcl offers most of the capabilities a function writer has in the C language, with a few restrictions, and with the addition of the powerful string processing libraries that are available for Tcl.</p>\n<p>One compelling <span class=\"emphasis\"><em>good</em></span> restriction is that everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via SPI and to raise messages via <code class=\"function\">elog()</code>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <span class=\"productname\">PostgreSQL</span> server process, as a C function can do. Thus, unprivileged database users can be trusted to use this language; it does not give them unlimited authority.</p>\n<p>The other notable implementation restriction is that Tcl functions cannot be used to create input/output functions for new data types.</p>\n<p>Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends email. To handle these cases, there is a variant of <span class=\"application\">PL/Tcl</span> called <code class=\"literal\">PL/TclU</code> (for untrusted Tcl). This is exactly the same language except that a full Tcl interpreter is used. <span class=\"emphasis\"><em>If <span class=\"application\">PL/TclU</span> is used, it must be installed as an untrusted procedural language</em></span> so that only database superusers can create functions in it. The writer of a <span class=\"application\">PL/TclU</span> function 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.</p>\n<p>The shared object code for the <span class=\"application\">PL/Tcl</span> and <span class=\"application\">PL/TclU</span> call handlers is automatically built and installed in the <span class=\"productname\">PostgreSQL</span> library directory if Tcl support is specified in the configuration step of the installation procedure. To install <span class=\"application\">PL/Tcl</span> and/or <span class=\"application\">PL/TclU</span> in a particular database, use the <code class=\"command\">CREATE EXTENSION</code> command, for example <code class=\"literal\">CREATE EXTENSION pltcl</code> or <code class=\"literal\">CREATE EXTENSION pltclu</code>.</p>\n</div>", "manual_path": "/docs/12/pltcl-overview.html", "source_files": {"src/pl/tcl/pltclu.control": "f8b2f8f3b14be8d14326913047eb320227f6891f6d303eecf300f0231ac853d4", "src/pl/tcl/pltclu--1.0.sql": "1de536836eae7f15e28a8773f18835663fb793c469518c53136e6d59520c32bd"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Tcl", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0"}, "comparison_hash": "f76f2eec7aa9560ce301885f25a023a15137ef259d3f0536f267d92fdb9f3ffe"}, "13": {"facts": [{"label": "Kind", "value": "Bundled procedural-language variant"}, {"label": "Family", "value": "PL/Tcl"}, {"label": "Trusted", "value": "f"}, {"label": "Handler", "value": "pltclu_call_handler"}, {"label": "Library", "value": "$libdir/pltcl"}, {"label": "Default version", "value": "1.0"}, {"label": "Module pathname", "value": "$libdir/pltcl"}, {"label": "Comment", "value": "PL/TclU untrusted procedural language"}], "tables": [], "aliases": [], "related": [{"url": "/docs/13/pltcl-config.html", "label": "pltcl-config"}, {"url": "/docs/13/pltcl-data.html", "label": "pltcl-data"}, {"url": "/docs/13/pltcl-dbaccess.html", "label": "pltcl-dbaccess"}, {"url": "/docs/13/pltcl-error-handling.html", "label": "pltcl-error-handling"}, {"url": "/docs/13/pltcl-event-trigger.html", "label": "pltcl-event-trigger"}, {"url": "/docs/13/pltcl-functions.html", "label": "pltcl-functions"}, {"url": "/docs/13/pltcl-global.html", "label": "pltcl-global"}, {"url": "/docs/13/pltcl-overview.html", "label": "pltcl-overview"}, {"url": "/docs/13/pltcl-procnames.html", "label": "pltcl-procnames"}, {"url": "/docs/13/pltcl-subtransactions.html", "label": "pltcl-subtransactions"}, {"url": "/docs/13/pltcl-transactions.html", "label": "pltcl-transactions"}, {"url": "/docs/13/pltcl-trigger.html", "label": "pltcl-trigger"}], "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/pltcl-overview.html", "path": "pltcl-overview.html", "label": "PostgreSQL 13 English manual", "sha256": "7bae4281b807e48ee328e686b45186fa1e4cb470291e7ae6a84122a901424925"}], "sections": [{"code": "/* src/pl/tcl/pltclu--1.0.sql */\n\nCREATE FUNCTION pltclu_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE pltclu\n  HANDLER pltclu_call_handler;\n\nCOMMENT ON LANGUAGE pltclu IS 'PL/TclU 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/Tcl", "comment": "PL/TclU untrusted procedural language", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0", "module_pathname": "$libdir/pltcl"}, "description": ["PL/TclU untrusted procedural language"], "manual_html": "<div class=\"sect1\" id=\"PLTCL-OVERVIEW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">43.1.\u00a0Overview</h2>\n</div>\n</div>\n</div>\n<p>PL/Tcl offers most of the capabilities a function writer has in the C language, with a few restrictions, and with the addition of the powerful string processing libraries that are available for Tcl.</p>\n<p>One compelling <span class=\"emphasis\"><em>good</em></span> restriction is that everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via SPI and to raise messages via <code class=\"function\">elog()</code>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <span class=\"productname\">PostgreSQL</span> server process, as a C function can do. Thus, unprivileged database users can be trusted to use this language; it does not give them unlimited authority.</p>\n<p>The other notable implementation restriction is that Tcl functions cannot be used to create input/output functions for new data types.</p>\n<p>Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends email. To handle these cases, there is a variant of <span class=\"application\">PL/Tcl</span> called <code class=\"literal\">PL/TclU</code> (for untrusted Tcl). This is exactly the same language except that a full Tcl interpreter is used. <span class=\"emphasis\"><em>If <span class=\"application\">PL/TclU</span> is used, it must be installed as an untrusted procedural language</em></span> so that only database superusers can create functions in it. The writer of a <span class=\"application\">PL/TclU</span> function 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.</p>\n<p>The shared object code for the <span class=\"application\">PL/Tcl</span> and <span class=\"application\">PL/TclU</span> call handlers is automatically built and installed in the <span class=\"productname\">PostgreSQL</span> library directory if Tcl support is specified in the configuration step of the installation procedure. To install <span class=\"application\">PL/Tcl</span> and/or <span class=\"application\">PL/TclU</span> in a particular database, use the <code class=\"command\">CREATE EXTENSION</code> command, for example <code class=\"literal\">CREATE EXTENSION pltcl</code> or <code class=\"literal\">CREATE EXTENSION pltclu</code>.</p>\n</div>", "manual_path": "/docs/13/pltcl-overview.html", "source_files": {"src/pl/tcl/pltclu.control": "f8b2f8f3b14be8d14326913047eb320227f6891f6d303eecf300f0231ac853d4", "src/pl/tcl/pltclu--1.0.sql": "81990a8e4dd323fd70a2669dcbd33a9d74d250bc7a965790dee9d96b3f823d0c"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Tcl", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0"}, "comparison_hash": "f76f2eec7aa9560ce301885f25a023a15137ef259d3f0536f267d92fdb9f3ffe"}, "14": {"facts": [{"label": "Kind", "value": "Bundled procedural-language variant"}, {"label": "Family", "value": "PL/Tcl"}, {"label": "Trusted", "value": "f"}, {"label": "Handler", "value": "pltclu_call_handler"}, {"label": "Library", "value": "$libdir/pltcl"}, {"label": "Default version", "value": "1.0"}, {"label": "Module pathname", "value": "$libdir/pltcl"}, {"label": "Comment", "value": "PL/TclU untrusted procedural language"}], "tables": [], "aliases": [], "related": [{"url": "/docs/14/pltcl-config.html", "label": "pltcl-config"}, {"url": "/docs/14/pltcl-data.html", "label": "pltcl-data"}, {"url": "/docs/14/pltcl-dbaccess.html", "label": "pltcl-dbaccess"}, {"url": "/docs/14/pltcl-error-handling.html", "label": "pltcl-error-handling"}, {"url": "/docs/14/pltcl-event-trigger.html", "label": "pltcl-event-trigger"}, {"url": "/docs/14/pltcl-functions.html", "label": "pltcl-functions"}, {"url": "/docs/14/pltcl-global.html", "label": "pltcl-global"}, {"url": "/docs/14/pltcl-overview.html", "label": "pltcl-overview"}, {"url": "/docs/14/pltcl-procnames.html", "label": "pltcl-procnames"}, {"url": "/docs/14/pltcl-subtransactions.html", "label": "pltcl-subtransactions"}, {"url": "/docs/14/pltcl-transactions.html", "label": "pltcl-transactions"}, {"url": "/docs/14/pltcl-trigger.html", "label": "pltcl-trigger"}], "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/pltcl-overview.html", "path": "pltcl-overview.html", "label": "PostgreSQL 14 English manual", "sha256": "746a3b05d82051248f2cfcab557cd47e8a9a206702a4c93f1bc1ececffb76e28"}], "sections": [{"code": "/* src/pl/tcl/pltclu--1.0.sql */\n\nCREATE FUNCTION pltclu_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE pltclu\n  HANDLER pltclu_call_handler;\n\nCOMMENT ON LANGUAGE pltclu IS 'PL/TclU 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/Tcl", "comment": "PL/TclU untrusted procedural language", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0", "module_pathname": "$libdir/pltcl"}, "description": ["PL/TclU untrusted procedural language"], "manual_html": "<div class=\"sect1\" id=\"PLTCL-OVERVIEW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">44.1.\u00a0Overview</h2>\n</div>\n</div>\n</div>\n<p>PL/Tcl offers most of the capabilities a function writer has in the C language, with a few restrictions, and with the addition of the powerful string processing libraries that are available for Tcl.</p>\n<p>One compelling <span class=\"emphasis\"><em>good</em></span> restriction is that everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via SPI and to raise messages via <code class=\"function\">elog()</code>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <span class=\"productname\">PostgreSQL</span> server process, as a C function can do. Thus, unprivileged database users can be trusted to use this language; it does not give them unlimited authority.</p>\n<p>The other notable implementation restriction is that Tcl functions cannot be used to create input/output functions for new data types.</p>\n<p>Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends email. To handle these cases, there is a variant of <span class=\"application\">PL/Tcl</span> called <code class=\"literal\">PL/TclU</code> (for untrusted Tcl). This is exactly the same language except that a full Tcl interpreter is used. <span class=\"emphasis\"><em>If <span class=\"application\">PL/TclU</span> is used, it must be installed as an untrusted procedural language</em></span> so that only database superusers can create functions in it. The writer of a <span class=\"application\">PL/TclU</span> function 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.</p>\n<p>The shared object code for the <span class=\"application\">PL/Tcl</span> and <span class=\"application\">PL/TclU</span> call handlers is automatically built and installed in the <span class=\"productname\">PostgreSQL</span> library directory if Tcl support is specified in the configuration step of the installation procedure. To install <span class=\"application\">PL/Tcl</span> and/or <span class=\"application\">PL/TclU</span> in a particular database, use the <code class=\"command\">CREATE EXTENSION</code> command, for example <code class=\"literal\">CREATE EXTENSION pltcl</code> or <code class=\"literal\">CREATE EXTENSION pltclu</code>.</p>\n</div>", "manual_path": "/docs/14/pltcl-overview.html", "source_files": {"src/pl/tcl/pltclu.control": "f8b2f8f3b14be8d14326913047eb320227f6891f6d303eecf300f0231ac853d4", "src/pl/tcl/pltclu--1.0.sql": "81990a8e4dd323fd70a2669dcbd33a9d74d250bc7a965790dee9d96b3f823d0c"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Tcl", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0"}, "comparison_hash": "f76f2eec7aa9560ce301885f25a023a15137ef259d3f0536f267d92fdb9f3ffe"}, "15": {"facts": [{"label": "Kind", "value": "Bundled procedural-language variant"}, {"label": "Family", "value": "PL/Tcl"}, {"label": "Trusted", "value": "f"}, {"label": "Handler", "value": "pltclu_call_handler"}, {"label": "Library", "value": "$libdir/pltcl"}, {"label": "Default version", "value": "1.0"}, {"label": "Module pathname", "value": "$libdir/pltcl"}, {"label": "Comment", "value": "PL/TclU untrusted procedural language"}], "tables": [], "aliases": [], "related": [{"url": "/docs/15/pltcl-config.html", "label": "pltcl-config"}, {"url": "/docs/15/pltcl-data.html", "label": "pltcl-data"}, {"url": "/docs/15/pltcl-dbaccess.html", "label": "pltcl-dbaccess"}, {"url": "/docs/15/pltcl-error-handling.html", "label": "pltcl-error-handling"}, {"url": "/docs/15/pltcl-event-trigger.html", "label": "pltcl-event-trigger"}, {"url": "/docs/15/pltcl-functions.html", "label": "pltcl-functions"}, {"url": "/docs/15/pltcl-global.html", "label": "pltcl-global"}, {"url": "/docs/15/pltcl-overview.html", "label": "pltcl-overview"}, {"url": "/docs/15/pltcl-procnames.html", "label": "pltcl-procnames"}, {"url": "/docs/15/pltcl-subtransactions.html", "label": "pltcl-subtransactions"}, {"url": "/docs/15/pltcl-transactions.html", "label": "pltcl-transactions"}, {"url": "/docs/15/pltcl-trigger.html", "label": "pltcl-trigger"}], "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/pltcl-overview.html", "path": "pltcl-overview.html", "label": "PostgreSQL 15 English manual", "sha256": "c69d50fe5d0c031be4253eee44279d07dc038040038b9c478348fa4b725280de"}], "sections": [{"code": "/* src/pl/tcl/pltclu--1.0.sql */\n\nCREATE FUNCTION pltclu_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE pltclu\n  HANDLER pltclu_call_handler;\n\nCOMMENT ON LANGUAGE pltclu IS 'PL/TclU 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/Tcl", "comment": "PL/TclU untrusted procedural language", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0", "module_pathname": "$libdir/pltcl"}, "description": ["PL/TclU untrusted procedural language"], "manual_html": "<div class=\"sect1\" id=\"PLTCL-OVERVIEW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">44.1.\u00a0Overview</h2>\n</div>\n</div>\n</div>\n<p>PL/Tcl offers most of the capabilities a function writer has in the C language, with a few restrictions, and with the addition of the powerful string processing libraries that are available for Tcl.</p>\n<p>One compelling <span class=\"emphasis\"><em>good</em></span> restriction is that everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via SPI and to raise messages via <code class=\"function\">elog()</code>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <span class=\"productname\">PostgreSQL</span> server process, as a C function can do. Thus, unprivileged database users can be trusted to use this language; it does not give them unlimited authority.</p>\n<p>The other notable implementation restriction is that Tcl functions cannot be used to create input/output functions for new data types.</p>\n<p>Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends email. To handle these cases, there is a variant of <span class=\"application\">PL/Tcl</span> called <code class=\"literal\">PL/TclU</code> (for untrusted Tcl). This is exactly the same language except that a full Tcl interpreter is used. <span class=\"emphasis\"><em>If <span class=\"application\">PL/TclU</span> is used, it must be installed as an untrusted procedural language</em></span> so that only database superusers can create functions in it. The writer of a <span class=\"application\">PL/TclU</span> function 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.</p>\n<p>The shared object code for the <span class=\"application\">PL/Tcl</span> and <span class=\"application\">PL/TclU</span> call handlers is automatically built and installed in the <span class=\"productname\">PostgreSQL</span> library directory if Tcl support is specified in the configuration step of the installation procedure. To install <span class=\"application\">PL/Tcl</span> and/or <span class=\"application\">PL/TclU</span> in a particular database, use the <code class=\"command\">CREATE EXTENSION</code> command, for example <code class=\"literal\">CREATE EXTENSION pltcl</code> or <code class=\"literal\">CREATE EXTENSION pltclu</code>.</p>\n</div>", "manual_path": "/docs/15/pltcl-overview.html", "source_files": {"src/pl/tcl/pltclu.control": "f8b2f8f3b14be8d14326913047eb320227f6891f6d303eecf300f0231ac853d4", "src/pl/tcl/pltclu--1.0.sql": "81990a8e4dd323fd70a2669dcbd33a9d74d250bc7a965790dee9d96b3f823d0c"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Tcl", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0"}, "comparison_hash": "f76f2eec7aa9560ce301885f25a023a15137ef259d3f0536f267d92fdb9f3ffe"}, "16": {"facts": [{"label": "Kind", "value": "Bundled procedural-language variant"}, {"label": "Family", "value": "PL/Tcl"}, {"label": "Trusted", "value": "f"}, {"label": "Handler", "value": "pltclu_call_handler"}, {"label": "Library", "value": "$libdir/pltcl"}, {"label": "Default version", "value": "1.0"}, {"label": "Module pathname", "value": "$libdir/pltcl"}, {"label": "Comment", "value": "PL/TclU untrusted procedural language"}], "tables": [], "aliases": [], "related": [{"url": "/docs/16/pltcl-config.html", "label": "pltcl-config"}, {"url": "/docs/16/pltcl-data.html", "label": "pltcl-data"}, {"url": "/docs/16/pltcl-dbaccess.html", "label": "pltcl-dbaccess"}, {"url": "/docs/16/pltcl-error-handling.html", "label": "pltcl-error-handling"}, {"url": "/docs/16/pltcl-event-trigger.html", "label": "pltcl-event-trigger"}, {"url": "/docs/16/pltcl-functions.html", "label": "pltcl-functions"}, {"url": "/docs/16/pltcl-global.html", "label": "pltcl-global"}, {"url": "/docs/16/pltcl-overview.html", "label": "pltcl-overview"}, {"url": "/docs/16/pltcl-procnames.html", "label": "pltcl-procnames"}, {"url": "/docs/16/pltcl-subtransactions.html", "label": "pltcl-subtransactions"}, {"url": "/docs/16/pltcl-transactions.html", "label": "pltcl-transactions"}, {"url": "/docs/16/pltcl-trigger.html", "label": "pltcl-trigger"}], "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/pltcl-overview.html", "path": "pltcl-overview.html", "label": "PostgreSQL 16 English manual", "sha256": "48c40b3b6117adb1bc045a1ddf6d531e53526ae733e9db3bf98f599964164549"}], "sections": [{"code": "/* src/pl/tcl/pltclu--1.0.sql */\n\nCREATE FUNCTION pltclu_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE pltclu\n  HANDLER pltclu_call_handler;\n\nCOMMENT ON LANGUAGE pltclu IS 'PL/TclU 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/Tcl", "comment": "PL/TclU untrusted procedural language", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0", "module_pathname": "$libdir/pltcl"}, "description": ["PL/TclU untrusted procedural language"], "manual_html": "<div class=\"sect1\" id=\"PLTCL-OVERVIEW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">44.1.\u00a0Overview </h2>\n</div>\n</div>\n</div>\n<p>PL/Tcl offers most of the capabilities a function writer has in the C language, with a few restrictions, and with the addition of the powerful string processing libraries that are available for Tcl.</p>\n<p>One compelling <span class=\"emphasis\"><em>good</em></span> restriction is that everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via SPI and to raise messages via <code class=\"function\">elog()</code>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <span class=\"productname\">PostgreSQL</span> server process, as a C function can do. Thus, unprivileged database users can be trusted to use this language; it does not give them unlimited authority.</p>\n<p>The other notable implementation restriction is that Tcl functions cannot be used to create input/output functions for new data types.</p>\n<p>Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends email. To handle these cases, there is a variant of <span class=\"application\">PL/Tcl</span> called <code class=\"literal\">PL/TclU</code> (for untrusted Tcl). This is exactly the same language except that a full Tcl interpreter is used. <span class=\"emphasis\"><em>If <span class=\"application\">PL/TclU</span> is used, it must be installed as an untrusted procedural language</em></span> so that only database superusers can create functions in it. The writer of a <span class=\"application\">PL/TclU</span> function 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.</p>\n<p>The shared object code for the <span class=\"application\">PL/Tcl</span> and <span class=\"application\">PL/TclU</span> call handlers is automatically built and installed in the <span class=\"productname\">PostgreSQL</span> library directory if Tcl support is specified in the configuration step of the installation procedure. To install <span class=\"application\">PL/Tcl</span> and/or <span class=\"application\">PL/TclU</span> in a particular database, use the <code class=\"command\">CREATE EXTENSION</code> command, for example <code class=\"literal\">CREATE EXTENSION pltcl</code> or <code class=\"literal\">CREATE EXTENSION pltclu</code>.</p>\n</div>", "manual_path": "/docs/16/pltcl-overview.html", "source_files": {"src/pl/tcl/pltclu.control": "f8b2f8f3b14be8d14326913047eb320227f6891f6d303eecf300f0231ac853d4", "src/pl/tcl/pltclu--1.0.sql": "81990a8e4dd323fd70a2669dcbd33a9d74d250bc7a965790dee9d96b3f823d0c"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Tcl", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0"}, "comparison_hash": "f76f2eec7aa9560ce301885f25a023a15137ef259d3f0536f267d92fdb9f3ffe"}, "17": {"facts": [{"label": "Kind", "value": "Bundled procedural-language variant"}, {"label": "Family", "value": "PL/Tcl"}, {"label": "Trusted", "value": "f"}, {"label": "Handler", "value": "pltclu_call_handler"}, {"label": "Library", "value": "$libdir/pltcl"}, {"label": "Default version", "value": "1.0"}, {"label": "Module pathname", "value": "$libdir/pltcl"}, {"label": "Comment", "value": "PL/TclU untrusted procedural language"}], "tables": [], "aliases": [], "related": [{"url": "/docs/17/pltcl-config.html", "label": "pltcl-config"}, {"url": "/docs/17/pltcl-data.html", "label": "pltcl-data"}, {"url": "/docs/17/pltcl-dbaccess.html", "label": "pltcl-dbaccess"}, {"url": "/docs/17/pltcl-error-handling.html", "label": "pltcl-error-handling"}, {"url": "/docs/17/pltcl-event-trigger.html", "label": "pltcl-event-trigger"}, {"url": "/docs/17/pltcl-functions.html", "label": "pltcl-functions"}, {"url": "/docs/17/pltcl-global.html", "label": "pltcl-global"}, {"url": "/docs/17/pltcl-overview.html", "label": "pltcl-overview"}, {"url": "/docs/17/pltcl-procnames.html", "label": "pltcl-procnames"}, {"url": "/docs/17/pltcl-subtransactions.html", "label": "pltcl-subtransactions"}, {"url": "/docs/17/pltcl-transactions.html", "label": "pltcl-transactions"}, {"url": "/docs/17/pltcl-trigger.html", "label": "pltcl-trigger"}], "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/pltcl-overview.html", "path": "pltcl-overview.html", "label": "PostgreSQL 17 English manual", "sha256": "4f4650b7f27c329d727c2038f1e27ef847e0f6baffc8dac538bbebf4b1b77b40"}], "sections": [{"code": "/* src/pl/tcl/pltclu--1.0.sql */\n\nCREATE FUNCTION pltclu_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE pltclu\n  HANDLER pltclu_call_handler;\n\nCOMMENT ON LANGUAGE pltclu IS 'PL/TclU 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/Tcl", "comment": "PL/TclU untrusted procedural language", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0", "module_pathname": "$libdir/pltcl"}, "description": ["PL/TclU untrusted procedural language"], "manual_html": "<div class=\"sect1\" id=\"PLTCL-OVERVIEW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">42.1.\u00a0Overview </h2>\n</div>\n</div>\n</div>\n<p>PL/Tcl offers most of the capabilities a function writer has in the C language, with a few restrictions, and with the addition of the powerful string processing libraries that are available for Tcl.</p>\n<p>One compelling <span class=\"emphasis\"><em>good</em></span> restriction is that everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via SPI and to raise messages via <code class=\"function\">elog()</code>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <span class=\"productname\">PostgreSQL</span> server process, as a C function can do. Thus, unprivileged database users can be trusted to use this language; it does not give them unlimited authority.</p>\n<p>The other notable implementation restriction is that Tcl functions cannot be used to create input/output functions for new data types.</p>\n<p>Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends email. To handle these cases, there is a variant of <span class=\"application\">PL/Tcl</span> called <code class=\"literal\">PL/TclU</code> (for untrusted Tcl). This is exactly the same language except that a full Tcl interpreter is used. <span class=\"emphasis\"><em>If <span class=\"application\">PL/TclU</span> is used, it must be installed as an untrusted procedural language</em></span> so that only database superusers can create functions in it. The writer of a <span class=\"application\">PL/TclU</span> function 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.</p>\n<p>The shared object code for the <span class=\"application\">PL/Tcl</span> and <span class=\"application\">PL/TclU</span> call handlers is automatically built and installed in the <span class=\"productname\">PostgreSQL</span> library directory if Tcl support is specified in the configuration step of the installation procedure. To install <span class=\"application\">PL/Tcl</span> and/or <span class=\"application\">PL/TclU</span> in a particular database, use the <code class=\"command\">CREATE EXTENSION</code> command, for example <code class=\"literal\">CREATE EXTENSION pltcl</code> or <code class=\"literal\">CREATE EXTENSION pltclu</code>.</p>\n</div>", "manual_path": "/docs/17/pltcl-overview.html", "source_files": {"src/pl/tcl/pltclu.control": "f8b2f8f3b14be8d14326913047eb320227f6891f6d303eecf300f0231ac853d4", "src/pl/tcl/pltclu--1.0.sql": "81990a8e4dd323fd70a2669dcbd33a9d74d250bc7a965790dee9d96b3f823d0c"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Tcl", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0"}, "comparison_hash": "f76f2eec7aa9560ce301885f25a023a15137ef259d3f0536f267d92fdb9f3ffe"}, "18": {"facts": [{"label": "Kind", "value": "Bundled procedural-language variant"}, {"label": "Family", "value": "PL/Tcl"}, {"label": "Trusted", "value": "f"}, {"label": "Handler", "value": "pltclu_call_handler"}, {"label": "Library", "value": "$libdir/pltcl"}, {"label": "Default version", "value": "1.0"}, {"label": "Module pathname", "value": "$libdir/pltcl"}, {"label": "Comment", "value": "PL/TclU untrusted procedural language"}], "tables": [], "aliases": [], "related": [{"url": "/docs/18/pltcl-config.html", "label": "pltcl-config"}, {"url": "/docs/18/pltcl-data.html", "label": "pltcl-data"}, {"url": "/docs/18/pltcl-dbaccess.html", "label": "pltcl-dbaccess"}, {"url": "/docs/18/pltcl-error-handling.html", "label": "pltcl-error-handling"}, {"url": "/docs/18/pltcl-event-trigger.html", "label": "pltcl-event-trigger"}, {"url": "/docs/18/pltcl-functions.html", "label": "pltcl-functions"}, {"url": "/docs/18/pltcl-global.html", "label": "pltcl-global"}, {"url": "/docs/18/pltcl-overview.html", "label": "pltcl-overview"}, {"url": "/docs/18/pltcl-procnames.html", "label": "pltcl-procnames"}, {"url": "/docs/18/pltcl-subtransactions.html", "label": "pltcl-subtransactions"}, {"url": "/docs/18/pltcl-transactions.html", "label": "pltcl-transactions"}, {"url": "/docs/18/pltcl-trigger.html", "label": "pltcl-trigger"}], "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/pltcl-overview.html", "path": "pltcl-overview.html", "label": "PostgreSQL 18 English manual", "sha256": "ed93c7e7682e446657a8c944dbabdabb0236e2d09c48db1c7e804270ce480044"}], "sections": [{"code": "/* src/pl/tcl/pltclu--1.0.sql */\n\nCREATE FUNCTION pltclu_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE pltclu\n  HANDLER pltclu_call_handler;\n\nCOMMENT ON LANGUAGE pltclu IS 'PL/TclU 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/Tcl", "comment": "PL/TclU untrusted procedural language", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0", "module_pathname": "$libdir/pltcl"}, "description": ["PL/TclU untrusted procedural language"], "manual_html": "<div class=\"sect1\" id=\"PLTCL-OVERVIEW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">42.1.\u00a0Overview </h2>\n</div>\n</div>\n</div>\n<p>PL/Tcl offers most of the capabilities a function writer has in the C language, with a few restrictions, and with the addition of the powerful string processing libraries that are available for Tcl.</p>\n<p>One compelling <span class=\"emphasis\"><em>good</em></span> restriction is that everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via SPI and to raise messages via <code class=\"function\">elog()</code>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <span class=\"productname\">PostgreSQL</span> server process, as a C function can do. Thus, unprivileged database users can be trusted to use this language; it does not give them unlimited authority.</p>\n<p>The other notable implementation restriction is that Tcl functions cannot be used to create input/output functions for new data types.</p>\n<p>Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends email. To handle these cases, there is a variant of <span class=\"application\">PL/Tcl</span> called <code class=\"literal\">PL/TclU</code> (for untrusted Tcl). This is exactly the same language except that a full Tcl interpreter is used. <span class=\"emphasis\"><em>If <span class=\"application\">PL/TclU</span> is used, it must be installed as an untrusted procedural language</em></span> so that only database superusers can create functions in it. The writer of a <span class=\"application\">PL/TclU</span> function 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.</p>\n<p>The shared object code for the <span class=\"application\">PL/Tcl</span> and <span class=\"application\">PL/TclU</span> call handlers is automatically built and installed in the <span class=\"productname\">PostgreSQL</span> library directory if Tcl support is specified in the configuration step of the installation procedure. To install <span class=\"application\">PL/Tcl</span> and/or <span class=\"application\">PL/TclU</span> in a particular database, use the <code class=\"command\">CREATE EXTENSION</code> command, for example <code class=\"literal\">CREATE EXTENSION pltcl</code> or <code class=\"literal\">CREATE EXTENSION pltclu</code>.</p>\n</div>", "manual_path": "/docs/18/pltcl-overview.html", "source_files": {"src/pl/tcl/pltclu.control": "f8b2f8f3b14be8d14326913047eb320227f6891f6d303eecf300f0231ac853d4", "src/pl/tcl/pltclu--1.0.sql": "81990a8e4dd323fd70a2669dcbd33a9d74d250bc7a965790dee9d96b3f823d0c"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Tcl", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0"}, "comparison_hash": "f76f2eec7aa9560ce301885f25a023a15137ef259d3f0536f267d92fdb9f3ffe"}, "19": {"facts": [{"label": "Kind", "value": "Bundled procedural-language variant"}, {"label": "Family", "value": "PL/Tcl"}, {"label": "Trusted", "value": "f"}, {"label": "Handler", "value": "pltclu_call_handler"}, {"label": "Library", "value": "$libdir/pltcl"}, {"label": "Default version", "value": "1.0"}, {"label": "Module pathname", "value": "$libdir/pltcl"}, {"label": "Comment", "value": "PL/TclU untrusted procedural language"}], "tables": [], "aliases": [], "related": [{"url": "/docs/19/pltcl-config.html", "label": "pltcl-config"}, {"url": "/docs/19/pltcl-data.html", "label": "pltcl-data"}, {"url": "/docs/19/pltcl-dbaccess.html", "label": "pltcl-dbaccess"}, {"url": "/docs/19/pltcl-error-handling.html", "label": "pltcl-error-handling"}, {"url": "/docs/19/pltcl-event-trigger.html", "label": "pltcl-event-trigger"}, {"url": "/docs/19/pltcl-functions.html", "label": "pltcl-functions"}, {"url": "/docs/19/pltcl-global.html", "label": "pltcl-global"}, {"url": "/docs/19/pltcl-overview.html", "label": "pltcl-overview"}, {"url": "/docs/19/pltcl-procnames.html", "label": "pltcl-procnames"}, {"url": "/docs/19/pltcl-subtransactions.html", "label": "pltcl-subtransactions"}, {"url": "/docs/19/pltcl-transactions.html", "label": "pltcl-transactions"}, {"url": "/docs/19/pltcl-trigger.html", "label": "pltcl-trigger"}], "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/pltcl-overview.html", "path": "pltcl-overview.html", "label": "PostgreSQL 19 English manual", "sha256": "af198c33d9d189020294c67972a26b28835479ea8fa39988a963a93e3fed7b4a"}], "sections": [{"code": "/* src/pl/tcl/pltclu--1.0.sql */\n\nCREATE FUNCTION pltclu_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE pltclu\n  HANDLER pltclu_call_handler;\n\nCOMMENT ON LANGUAGE pltclu IS 'PL/TclU 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/Tcl", "comment": "PL/TclU untrusted procedural language", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0", "module_pathname": "$libdir/pltcl"}, "description": ["PL/TclU untrusted procedural language"], "manual_html": "<div class=\"sect1\" id=\"PLTCL-OVERVIEW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">42.1.\u00a0Overview </h2>\n</div>\n</div>\n</div>\n<p>PL/Tcl offers most of the capabilities a function writer has in the C language, with a few restrictions, and with the addition of the powerful string processing libraries that are available for Tcl.</p>\n<p>One compelling <span class=\"emphasis\"><em>good</em></span> restriction is that everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via SPI and to raise messages via <code class=\"function\">elog()</code>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <span class=\"productname\">PostgreSQL</span> server process, as a C function can do. Thus, unprivileged database users can be trusted to use this language; it does not give them unlimited authority.</p>\n<p>The other notable implementation restriction is that Tcl functions cannot be used to create input/output functions for new data types.</p>\n<p>Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends email. To handle these cases, there is a variant of <span class=\"application\">PL/Tcl</span> called <code class=\"literal\">PL/TclU</code> (for untrusted Tcl). This is exactly the same language except that a full Tcl interpreter is used. <span class=\"emphasis\"><em>If <span class=\"application\">PL/TclU</span> is used, it must be installed as an untrusted procedural language</em></span> so that only database superusers can create functions in it. The writer of a <span class=\"application\">PL/TclU</span> function 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.</p>\n<p>The shared object code for the <span class=\"application\">PL/Tcl</span> and <span class=\"application\">PL/TclU</span> call handlers is automatically built and installed in the <span class=\"productname\">PostgreSQL</span> library directory if Tcl support is specified in the configuration step of the installation procedure. To install <span class=\"application\">PL/Tcl</span> and/or <span class=\"application\">PL/TclU</span> in a particular database, use the <code class=\"command\">CREATE EXTENSION</code> command, for example <code class=\"literal\">CREATE EXTENSION pltcl</code> or <code class=\"literal\">CREATE EXTENSION pltclu</code>.</p>\n</div>", "manual_path": "/docs/19/pltcl-overview.html", "source_files": {"src/pl/tcl/pltclu.control": "f8b2f8f3b14be8d14326913047eb320227f6891f6d303eecf300f0231ac853d4", "src/pl/tcl/pltclu--1.0.sql": "81990a8e4dd323fd70a2669dcbd33a9d74d250bc7a965790dee9d96b3f823d0c"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Tcl", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0"}, "comparison_hash": "f76f2eec7aa9560ce301885f25a023a15137ef259d3f0536f267d92fdb9f3ffe"}, "20": {"facts": [{"label": "Kind", "value": "Bundled procedural-language variant"}, {"label": "Family", "value": "PL/Tcl"}, {"label": "Trusted", "value": "f"}, {"label": "Handler", "value": "pltclu_call_handler"}, {"label": "Library", "value": "$libdir/pltcl"}, {"label": "Default version", "value": "1.0"}, {"label": "Module pathname", "value": "$libdir/pltcl"}, {"label": "Comment", "value": "PL/TclU untrusted procedural language"}], "tables": [], "aliases": [], "related": [{"url": "/docs/devel/pltcl-config.html", "label": "pltcl-config"}, {"url": "/docs/devel/pltcl-data.html", "label": "pltcl-data"}, {"url": "/docs/devel/pltcl-dbaccess.html", "label": "pltcl-dbaccess"}, {"url": "/docs/devel/pltcl-error-handling.html", "label": "pltcl-error-handling"}, {"url": "/docs/devel/pltcl-event-trigger.html", "label": "pltcl-event-trigger"}, {"url": "/docs/devel/pltcl-functions.html", "label": "pltcl-functions"}, {"url": "/docs/devel/pltcl-global.html", "label": "pltcl-global"}, {"url": "/docs/devel/pltcl-overview.html", "label": "pltcl-overview"}, {"url": "/docs/devel/pltcl-procnames.html", "label": "pltcl-procnames"}, {"url": "/docs/devel/pltcl-subtransactions.html", "label": "pltcl-subtransactions"}, {"url": "/docs/devel/pltcl-transactions.html", "label": "pltcl-transactions"}, {"url": "/docs/devel/pltcl-trigger.html", "label": "pltcl-trigger"}], "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/pltcl-overview.html", "path": "pltcl-overview.html", "label": "PostgreSQL 20 English manual", "sha256": "be4900cfa48ffd7364d446d8660cda81d3bed714764d1f195e1f2efd6e65c5f6"}], "sections": [{"code": "/* src/pl/tcl/pltclu--1.0.sql */\n\nCREATE FUNCTION pltclu_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE pltclu\n  HANDLER pltclu_call_handler;\n\nCOMMENT ON LANGUAGE pltclu IS 'PL/TclU 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/Tcl", "comment": "PL/TclU untrusted procedural language", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0", "module_pathname": "$libdir/pltcl"}, "description": ["PL/TclU untrusted procedural language"], "manual_html": "<div class=\"sect1\" id=\"PLTCL-OVERVIEW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">42.1.\u00a0Overview </h2>\n</div>\n</div>\n</div>\n<p>PL/Tcl offers most of the capabilities a function writer has in the C language, with a few restrictions, and with the addition of the powerful string processing libraries that are available for Tcl.</p>\n<p>One compelling <span class=\"emphasis\"><em>good</em></span> restriction is that everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via SPI and to raise messages via <code class=\"function\">elog()</code>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <span class=\"productname\">PostgreSQL</span> server process, as a C function can do. Thus, unprivileged database users can be trusted to use this language; it does not give them unlimited authority.</p>\n<p>The other notable implementation restriction is that Tcl functions cannot be used to create input/output functions for new data types.</p>\n<p>Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends email. To handle these cases, there is a variant of <span class=\"application\">PL/Tcl</span> called <code class=\"literal\">PL/TclU</code> (for untrusted Tcl). This is exactly the same language except that a full Tcl interpreter is used. <span class=\"emphasis\"><em>If <span class=\"application\">PL/TclU</span> is used, it must be installed as an untrusted procedural language</em></span> so that only database superusers can create functions in it. The writer of a <span class=\"application\">PL/TclU</span> function 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.</p>\n<p>The shared object code for the <span class=\"application\">PL/Tcl</span> and <span class=\"application\">PL/TclU</span> call handlers is automatically built and installed in the <span class=\"productname\">PostgreSQL</span> library directory if Tcl support is specified in the configuration step of the installation procedure. To install <span class=\"application\">PL/Tcl</span> and/or <span class=\"application\">PL/TclU</span> in a particular database, use the <code class=\"command\">CREATE EXTENSION</code> command, for example <code class=\"literal\">CREATE EXTENSION pltcl</code> or <code class=\"literal\">CREATE EXTENSION pltclu</code>.</p>\n</div>", "manual_path": "/docs/devel/pltcl-overview.html", "source_files": {"src/pl/tcl/pltclu.control": "f8b2f8f3b14be8d14326913047eb320227f6891f6d303eecf300f0231ac853d4", "src/pl/tcl/pltclu--1.0.sql": "81990a8e4dd323fd70a2669dcbd33a9d74d250bc7a965790dee9d96b3f823d0c"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Tcl", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0"}, "comparison_hash": "f76f2eec7aa9560ce301885f25a023a15137ef259d3f0536f267d92fdb9f3ffe"}}}, "snapshot": {"facts": [{"label": "Kind", "value": "Bundled procedural-language variant"}, {"label": "Family", "value": "PL/Tcl"}, {"label": "Trusted", "value": "f"}, {"label": "Handler", "value": "pltclu_call_handler"}, {"label": "Library", "value": "$libdir/pltcl"}, {"label": "Default version", "value": "1.0"}, {"label": "Module pathname", "value": "$libdir/pltcl"}, {"label": "Comment", "value": "PL/TclU untrusted procedural language"}], "tables": [], "aliases": [], "related": [{"url": "/docs/18/pltcl-config.html", "label": "pltcl-config"}, {"url": "/docs/18/pltcl-data.html", "label": "pltcl-data"}, {"url": "/docs/18/pltcl-dbaccess.html", "label": "pltcl-dbaccess"}, {"url": "/docs/18/pltcl-error-handling.html", "label": "pltcl-error-handling"}, {"url": "/docs/18/pltcl-event-trigger.html", "label": "pltcl-event-trigger"}, {"url": "/docs/18/pltcl-functions.html", "label": "pltcl-functions"}, {"url": "/docs/18/pltcl-global.html", "label": "pltcl-global"}, {"url": "/docs/18/pltcl-overview.html", "label": "pltcl-overview"}, {"url": "/docs/18/pltcl-procnames.html", "label": "pltcl-procnames"}, {"url": "/docs/18/pltcl-subtransactions.html", "label": "pltcl-subtransactions"}, {"url": "/docs/18/pltcl-transactions.html", "label": "pltcl-transactions"}, {"url": "/docs/18/pltcl-trigger.html", "label": "pltcl-trigger"}], "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/pltcl-overview.html", "path": "pltcl-overview.html", "label": "PostgreSQL 18 English manual", "sha256": "ed93c7e7682e446657a8c944dbabdabb0236e2d09c48db1c7e804270ce480044"}], "sections": [{"code": "/* src/pl/tcl/pltclu--1.0.sql */\n\nCREATE FUNCTION pltclu_call_handler() RETURNS language_handler\n  LANGUAGE c AS 'MODULE_PATHNAME';\n\nCREATE LANGUAGE pltclu\n  HANDLER pltclu_call_handler;\n\nCOMMENT ON LANGUAGE pltclu IS 'PL/TclU 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/Tcl", "comment": "PL/TclU untrusted procedural language", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0", "module_pathname": "$libdir/pltcl"}, "description": ["PL/TclU untrusted procedural language"], "manual_html": "<div class=\"sect1\" id=\"PLTCL-OVERVIEW\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">42.1.\u00a0Overview </h2>\n</div>\n</div>\n</div>\n<p>PL/Tcl offers most of the capabilities a function writer has in the C language, with a few restrictions, and with the addition of the powerful string processing libraries that are available for Tcl.</p>\n<p>One compelling <span class=\"emphasis\"><em>good</em></span> restriction is that everything is executed from within the safety of the context of a Tcl interpreter. In addition to the limited command set of safe Tcl, only a few commands are available to access the database via SPI and to raise messages via <code class=\"function\">elog()</code>. PL/Tcl provides no way to access internals of the database server or to gain OS-level access under the permissions of the <span class=\"productname\">PostgreSQL</span> server process, as a C function can do. Thus, unprivileged database users can be trusted to use this language; it does not give them unlimited authority.</p>\n<p>The other notable implementation restriction is that Tcl functions cannot be used to create input/output functions for new data types.</p>\n<p>Sometimes it is desirable to write Tcl functions that are not restricted to safe Tcl. For example, one might want a Tcl function that sends email. To handle these cases, there is a variant of <span class=\"application\">PL/Tcl</span> called <code class=\"literal\">PL/TclU</code> (for untrusted Tcl). This is exactly the same language except that a full Tcl interpreter is used. <span class=\"emphasis\"><em>If <span class=\"application\">PL/TclU</span> is used, it must be installed as an untrusted procedural language</em></span> so that only database superusers can create functions in it. The writer of a <span class=\"application\">PL/TclU</span> function 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.</p>\n<p>The shared object code for the <span class=\"application\">PL/Tcl</span> and <span class=\"application\">PL/TclU</span> call handlers is automatically built and installed in the <span class=\"productname\">PostgreSQL</span> library directory if Tcl support is specified in the configuration step of the installation procedure. To install <span class=\"application\">PL/Tcl</span> and/or <span class=\"application\">PL/TclU</span> in a particular database, use the <code class=\"command\">CREATE EXTENSION</code> command, for example <code class=\"literal\">CREATE EXTENSION pltcl</code> or <code class=\"literal\">CREATE EXTENSION pltclu</code>.</p>\n</div>", "manual_path": "/docs/18/pltcl-overview.html", "source_files": {"src/pl/tcl/pltclu.control": "f8b2f8f3b14be8d14326913047eb320227f6891f6d303eecf300f0231ac853d4", "src/pl/tcl/pltclu--1.0.sql": "81990a8e4dd323fd70a2669dcbd33a9d74d250bc7a965790dee9d96b3f823d0c"}, "comparison_data": {"kind": "Bundled procedural-language variant", "family": "PL/Tcl", "handler": "pltclu_call_handler", "library": "$libdir/pltcl", "trusted": "f", "validator": "", "inline_handler": "", "default_version": "1.0"}, "comparison_hash": "f76f2eec7aa9560ce301885f25a023a15137ef259d3f0536f267d92fdb9f3ffe"}, "comparison": {"left": "17", "right": "18", "status": "unchanged", "diff": ""}}