Barry Lind wrote:
>> 1. The DatabaseMetaData.supportsIntegrityEnhancement method returns
>> false for me using the pg73jdbc2ee.jar driver. Perhaps I just don't
>> fully understand what this method actually means, but I would have
>> expected it to return true, since PostgreSQL (the database) supports
>> referential integrity constraints? Or am I confused about two
>> different things.
>
>
> If IntegrityEnhancementFacility = integrity constraints then yes the
> driver should return true. But I really don't know what
> IntegretyEnhancementFacility means. It isn't discussed in either the
> jdbc javadoc or the jdbc specs. It is entirely possible that it implies
> a lot more than just plain integrity constraints in which case returning
> false for this method may be the correct thing to do.
The most authoritative thing I could find was this document:
<http://www.itl.nist.gov/div897/ctg/dm/sql_info.html>
<snip>
The SQL Integrity Enhancement facility offers additional tools for
referential integrity, CHECK constraint clauses, and DEFAULT clauses.
Referential integrity allows specification of primary and foreign keys
with the requirement that no foreign key row may be inserted or updated
unless a matching primary key row exists. Check clauses allow
specification of inter-column constraints to be maintained by the
database system. Default clauses provide optional default values for
missing data.
</snip>
This is a little ambiguous. Does Sun offer a guide for writing JDBC
drivers, which might explain how a driver should respond when the
various DatabaseMetaData methods are called?
Erik