Discovery of unique constraints using Catalog Methods

From: Todd Hepler (thepler_at_watson.wustl.edu)
Date: 02/08/05


Date: Tue, 08 Feb 2005 15:54:58 -0600
To: dbi-users@perl.org

Is there DBD independent way to find the unique constraints for a table?
None of the Catalog Methods seem to do the trick. foreign_key_info()
presumably could find one only if another table uses it as a constraint.

I'm using Oracle, and I can write my own query, like:

select * from all_constraints
where constraint_type = 'U'
and table_name = ?

but I was hoping for a database independent way.

Thanks,

Todd