On Mon, Mar 7, 2011 at 6:58 PM, Sam Carleton <scarle...@miltonstreet.com>wrote:

> Ok, a few weeks ago I posted an issue that I was having with the attach
> commend because the path has a single quote in it.  Someone suggested I use
> the sqlite_attach() function which allegedly can be parametrized.  Well, I
> finally got around to it this evening but I am missing something.  Here is
> what I have:
>
> When I call sqlite3_prepare_v2 on the statement "SELECT sqlite_attach(?1,
> ?2, NULL);" I get an error:
>
> no such function: sqlite_attach
>
> How exactly am I suppose to call sqlite_attach()?
>

You can't.

There really is such a function: sqlite_attach().  But we purposely leave it
out of the function table used by the expression evaluator.  The parser
hand-crafts the function call when it is generating the code for ATTACH
statements.

This is done to prevent miscreants from bypassing any
sqlite3_set_authorizer() restrictions on the use of ATTACH by calling
sqlite_attach() directly.



>
> Sam
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to