On Tue, Jun 26, 2012 at 02:52:43PM +0200, Ralf Junker scratched on the wall:
> On 26.06.2012 14:33, Vivien Malerba wrote:
> 
> > The code is some SQL entered by the user, I have no control over it. There
> > is effectively the possibility to parse the SQL entered, detect the CREATE
> > table statement and act accordingly, but I would like to see if SQLite has
> > some kind of builtin feature I could use first.
> 
> Two options, both not intended for it, but could work well:
> 
> - http://sqlite.org/c3ref/set_authorizer.html
> - http://sqlite.org/c3ref/c_config_getmalloc.html#sqliteconfiglog


  You might also be able to define an ON INSERT trigger on sqlite_master
  that calls an application defined function.  If you can do it, it will
  likely require enabling writable schemas, which is somewhat dangerous
  for anything that allows user-interaction.  Even then, it might not
  work... I have no idea if things are "inserted" into sqlite_master in
  the standard way.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to