1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>42.12. Tcl Procedure Names</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="pltcl-config.html" title="42.11. PL/Tcl Configuration" /><link rel="next" href="plperl.html" title="Chapter 43. PL/Perl — Perl Procedural Language" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">42.12. Tcl Procedure Names</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="pltcl-config.html" title="42.11. PL/Tcl Configuration">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="pltcl.html" title="Chapter 42. PL/Tcl — Tcl Procedural Language">Up</a></td><th width="60%" align="center">Chapter 42. PL/Tcl — Tcl Procedural Language</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="plperl.html" title="Chapter 43. PL/Perl — Perl Procedural Language">Next</a></td></tr></table><hr /></div><div class="sect1" id="PLTCL-PROCNAMES"><div class="titlepage"><div><div><h2 class="title" style="clear: both">42.12. Tcl Procedure Names <a href="#PLTCL-PROCNAMES" class="id_link">#</a></h2></div></div></div><p>
3 In <span class="productname">PostgreSQL</span>, the same function name can be used for
4 different function definitions if the functions are placed in different
5 schemas, or if the number of arguments or their types
6 differ. Tcl, however, requires all procedure names to be distinct.
7 PL/Tcl deals with this by including the argument type names in the
8 internal Tcl procedure name, and then appending the function's object
9 ID (OID) to the internal Tcl procedure name if necessary to make it
10 different from the names of all previously-loaded functions in the
11 same Tcl interpreter. Thus,
12 <span class="productname">PostgreSQL</span> functions with the same name
13 and different argument types will be different Tcl procedures, too. This
14 is not normally a concern for a PL/Tcl programmer, but it might be visible
17 For this reason among others, a PL/Tcl function cannot call another one
18 directly (that is, within Tcl). If you need to do that, you must go
19 through SQL, using <code class="function">spi_exec</code> or a related command.
20 </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pltcl-config.html" title="42.11. PL/Tcl Configuration">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pltcl.html" title="Chapter 42. PL/Tcl — Tcl Procedural Language">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="plperl.html" title="Chapter 43. PL/Perl — Perl Procedural Language">Next</a></td></tr><tr><td width="40%" align="left" valign="top">42.11. PL/Tcl Configuration </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> Chapter 43. PL/Perl — Perl Procedural Language</td></tr></table></div></body></html>