Identifying rowid aliases

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Identifying rowid aliases

J. King-3
I'm trying to ensure that something that looks like a rowid alias is in fact a rowid alias. I think I have the correct procedure, but I wanted to run it by the people here in case I missed anything. Is the following correct?

1. Check pragma_table_info() for a single-column PK
2. Check that the column's type is a case-insensitive match for "integer"
3. Check pragma_index_list() for the absence of an index with "pk" origin
4. If the table does not have all three concrete columns called _rowid_, rowid, and oid, perform a count on one of these to ensure no error occurs
5. If the table has all three concrete columns, examine the table's SQL as a last resort to confirm it is a rowid table
--
J. King
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users