On Dec 8, 2010, at 2:44 PM, Richard Hipp wrote:

> On Wed, Dec 8, 2010 at 2:35 PM, Petite Abeille <petite.abei...@gmail.com 
> >wrote:
>
>> Hello,
>>
>> The pragma foreign_key_list appears to be deprecated in 3.7.4:
>>
>> http://www.sqlite.org/pragma.html#pragma_foreign_key_list
>>
>> Any reason for such deprecation?
>>
>
> Now that foreign key constraints are enforced natively, why would  
> you want
> to have a list of them?  Why should the foreign_key_list pragma  
> continue to
> consume code space and developer maintenance time?
>


Why would a developer NOT want to be able to query any part of the  
data dictionary
to see any aspect of the schema?   In addition to the info in  
sqlite_master, it would
be nice to be able to access column information as a query rather then  
a pragma.

For example, on Oracle you can get a list of foreign keys, like:
select  
owner 
,constraint_name,constraint_type,table_name,r_owner,r_constraint_name 2
from all_constraints where constraint_type in ('P','U')
Sybase provides the "sp_fkeys" system stored proc for the same purpose.

If the point is that SQLite is meant to be be small and embedable, maybe
the extra data dictionary querying capability can be provided by a  
separate,
laodable extension.

   -Chris

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

Reply via email to