バージョンごとのドキュメント一覧

44.12. Tclプロシージャ名 #

<title>Tcl Procedure Names</title>

In <productname>PostgreSQL</productname>, the same function name can be used for different function definitions as long as the number of arguments or their types differ. Tcl, however, requires all procedure names to be distinct. PL/Tcl deals with this by making the internal Tcl procedure names contain the object ID of the function from the system table <structname>pg_proc</structname> as part of their name. Thus, <productname>PostgreSQL</productname> functions with the same name and different argument types will be different Tcl procedures, too. This is not normally a concern for a PL/Tcl programmer, but it might be visible when debugging. PostgreSQLでは、その関数の引数の数または引数の型が異なっていれば、同じ関数名を異なる関数定義に使用することが可能です。 しかし、Tclではプロシージャ名の重複は許されません。 PL/Tclでは、プロシージャ名の一部にpg_procシステムテーブルにあるその関数のオブジェクトIDを持たせた内部的なTclプロシージャ名を作成することでこれに対応しています。 したがって、こういった異なる引数の型を持つ同じ名前のPostgreSQL関数は、異なるTclプロシージャになります。 PL/Tclプログラマから見ますと、通常は問題にはなりませんが、デバッグの際に表面に現れます。