bgcolor # mtime type status subsystem title _comments #c8c8c8 bc5ff8352f 2010-09-03 18:10:19 Code_Defect Closed not_specified Get rid of tcl_findLibrary dgp informs me that tcl_findLibrary should be considered obsolete. The current thinking on how to structure a module is that both the C code for the module and any Tcl scripts required should be loaded from pkgIndex.tcl, and the 'tcl_findLibrary' hack should never be needed. (It appears that there are some order-of-initialization issues to resolve with the recommended approach, but these can be tackled if necessary by adding commands in the C code to be called at the appropriate point in the Tcl code, so that the sequence will be load DLL - source Tcl library - Tcl library calls initialisation in DLL in whatever order is needed.
TDBCIt should rather be:
TDBCwhere
This change would make it possible for a 'try' call to catch a particular sort of SQL error, for instance 'data exception':
TDBC DATAEXCEPTION ...or more specifically 'division by zero':
TDBC DATAEXCEPTION 22012 ...#c8c8c8 f916ff78a1 2009-01-08 03:35:43 Build_Problem Closed makefile.vc patch When $(SCRIPT_INSTALL_DIR) has spaces in the name, the install-libraries target fails on the $(CPY) operation. Index: makefile.vc =================================================================== RCS file: /cvsroot/tcl/tdbc/win/makefile.vc,v retrieving revision 1.3 diff -c -r1.3 makefile.vc *** makefile.vc 22 Dec 2008 00:42:03 -0000 1.3 --- makefile.vc 7 Jan 2009 20:59:23 -0000 *************** *** 466,472 **** @echo Installing libraries to '$(SCRIPT_INSTALL_DIR)' @if exist $(LIBDIR) $(CPY) $(LIBDIR)\*.tcl "$(SCRIPT_INSTALL_DIR)" @echo Installing package index in '$(SCRIPT_INSTALL_DIR)' ! @$(CPY) $(OUT_DIR)\pkgIndex.tcl $(SCRIPT_INSTALL_DIR) install-docs: @echo Installing documentation files to '$(DOC_INSTALL_DIR)' --- 466,472 ---- @echo Installing libraries to '$(SCRIPT_INSTALL_DIR)' @if exist $(LIBDIR) $(CPY) $(LIBDIR)\*.tcl "$(SCRIPT_INSTALL_DIR)" @echo Installing package index in '$(SCRIPT_INSTALL_DIR)' ! @$(CPY) $(OUT_DIR)\pkgIndex.tcl "$(SCRIPT_INSTALL_DIR)" install-docs: @echo Installing documentation files to '$(DOC_INSTALL_DIR)'
--- tcl8.6-8.6.0~b1.orig/pkgs/tdbc1.0b1/Makefile.in +++ tcl8.6-8.6.0~b1/pkgs/tdbc1.0b1/Makefile.in @@ -167,7 +167,7 @@ LIBS = @PKG_LIBS@ @LIBS@ AR = @AR@ CFLAGS = @CFLAGS@ -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(SHLIB_CFLAGS) #======================================================================== # Start of user-definable TARGETS section
set statement [$db_name prepare {select PATH_ID from PATHS where PATH=:path and parent_id is null}]
::oo::Obj943372::Stmt::10
(bin) 71 % $statement getSql
select PATH_ID from PATHS where PATH=:path and parent_id is null
(bin) 72 %
package require tdbc::sqlite3
tdbc::sqlite3::connection create db phonebook.sqlite3
set statement [db prepare {
select phone_num from directory where first_name = :firstname and last_name = :lastname
}]
set firstname Fred
set lastname Flintstone
$statement getSql gives:
select phone_num from directory where first_name = :firstname and last_name = :lastname
set rs [$statement execute]
Request:
$rs getSql would give:
select phone_num from directory where first_name = 'Fred' and last_name = 'Flintstone'
Motivation: this feature would be very helpfull in debugging..
colObj = Tcl_SubstObj(interp, toSubst, TCL_SUBST_BACKSLASHES);
Since the hex formatted data is in the form \x68656c6c6f2c20776f726c64 (for "hello, world"), Tcl_SubstObj converts this to "d" Workarounds are to change the default in postgres.conf db allrows {set bytea_output = 'escape'}
Ideal would be teach ResultSetNextrowMethod about the hex format though, as this is the preferred format going forward. Code to reproduce: