On Fri, Mar 7, 2014 at 3:39 PM, Clemens Ladisch <clem...@ladisch.de> wrote: > Max Vlasov wrote: >> On Fri, Mar 7, 2014 at 12:49 PM, Dominique Devienne <ddevie...@gmail.com> >> wrote: >>> I think what SQLite lacks is a syntax to define custom function like >>> it does for virtual tables. Something like: >>> >>> create function rpad(x, y) using scripty_module as "return >>> PRINTF('%-*s',y,x)"; >> >> Nice suggestion. This probably falls into case when a small new part >> needed on sqlite side > > Actually, no change to SQLite itself would be needed. It's possible > to create an extension that provides a function that allows to register > another function that executes a custom SQL expression: > > SELECT register_simple_function('rpad', 2, 'SELECT printf(''%-*s'', ?, ?)');
I've already mentioned that Clemens. But also pointed about that then you don't have a standard way to register those dynamically generated functions. FWIW. --DD _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users