On 19 Mar 2011, at 7:52am, Paul van Helden wrote:

> It actually makes sense to never drop any automatic index (!). My question
> should have been how to reliably determine whether an index is automatic or
> not. Unless someone can come up with a compelling reason not to test for
> "sqlite_autoindex_" in pragma index_list, I'd prefer to stick to that.
> 
> Now I'm wondering if in future a situation could arise where the SQL will be
> provided for automatic indexes... Eg. to aid in exporting DDL

I'm not sure why you'd want it.  You can't do anything with automatic indexes 
anyway: they can't be dropped.  The only indexes you can DROP are the ones 
which have their own listing in the sqlite_master table.

If you're trying to figure out the TABLE's contraints, you can't use indexes 
anyway.  You have to do it by looking at the column definition and the foreign 
keys, and these have their own entries in sqlite_master.

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

Reply via email to