You need to duplicate whatever method you use to load your UDFs in your 
application - which in the end boils down to calling sqlite3_create_function() 
with appropriate arguments that cause "glue code" to be executed- into the CLI.

Then make that code available as an extension or a new ".perlfunc" command in 
your copy of the shell code.

We have shell scripts and lua packages that implement virtual tables here.

-----Urspr√ľngliche Nachricht-----
Von: sqlite-users [] Im 
Auftrag von
Gesendet: Mittwoch, 29. November 2017 11:10
An: SQLite mailing list <>
Betreff: Re: [sqlite] [EXTERNAL] Ignore missing UDFs for command-line EXPLAIN?

On Wed Nov 29, 2017 at 09:21:47AM +0000, Hick Gunter wrote:
> What about loading your UDF in the CLI?

Do you mean with a .so/.dll? Most of my UDFs are written in Perl, as is much of 
the rest of my code, and are not standalone compiled objects.

It would be sufficent if there was a way to write stub UDFs that didn't 
actually do anything. For example:

    sqlite> select create_udf_stub('my_udf', 1)
    sqlite> explain select my_udf('arg');   # OK
    sqlite> select my_udf('arg');           # Errors out..

Mark Lawrence
sqlite-users mailing list

 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
sqlite-users mailing list

Reply via email to