1<!--$Id: program.so,v 11.16 2007/07/30 19:26:29 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB Reference Guide: Tcl API programming notes</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<a name="2"><!--meow--></a> 12<table width="100%"><tr valign=top> 13<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Tcl API</dl></b></td> 14<td align=right><a href="/tcl/using.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/tcl/error.html"><img src="/images/next.gif" alt="Next"></a> 15</td></tr></table> 16<p align=center><b>Tcl API programming notes</b></p> 17<p>The Berkeley DB Tcl API does not attempt to avoid evaluating input as Tcl 18commands. For this reason, it may be dangerous to pass unreviewed user 19input through the Berkeley DB Tcl API, as the input may subsequently be 20evaluated as a Tcl command. Additionally, the Berkeley DB Tcl API 21initialization routine resets process' effective user and group IDs to 22the real user and group IDs, to minimize the effectiveness of a Tcl 23injection attack.</p> 24<p>The Tcl API closely parallels the Berkeley DB programmatic interfaces. If you 25are already familiar with one of those interfaces, there will not be many 26surprises in the Tcl API.</p> 27<p>The Tcl API currently does not support multithreading although 28it could be made to do so. The Tcl shell itself is 29not multithreaded and the Berkeley DB extensions use global data unprotected 30from multiple threads.</p> 31<p>Several pieces of Berkeley DB functionality are not available in the Tcl API. 32Any of the functions that require a user-provided function are not 33supported via the Tcl API. For example, there is no equivalent to the 34<a href="/api_c/db_set_dup_compare.html">DB->set_dup_compare</a> or the <a href="/api_c/env_set_errcall.html">DB_ENV->set_errcall</a> 35methods.</p> 36<table width="100%"><tr><td><br></td><td align=right><a href="/tcl/using.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/tcl/error.html"><img src="/images/next.gif" alt="Next"></a> 37</td></tr></table> 38<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 39</body> 40</html> 41