Thanks for the information and document link. At a high level, is it correct that the SQL function in my little example would be a method defined in a module, and which must be written in C? And there is no equivalent in the SQLite Tcl API? I suppose one could write it in C and invoke it from Tcl as needed, and the method in my case is pretty simple. I readily admit that much of what I read is very new to me and I'd need to study and experiment for a couple weeks, likely, just to get a basic grasp of it; and I wanted first to make sure I understand where exactly this is to be done. Thanks again.