Thread: DBMD supportsIntegrityEnhancementFacility() - should this return true?

DBMD supportsIntegrityEnhancementFacility() - should this return true?

From
Alex Winawer
Date:
Hi,

My first question is does anyone know exactly what the "Integrity Enhancement
Facility" is? I can only find references to the description of method in the
JDBC Javadoc which isn't helpful ("Retrieves whether this database supports
the SQL Integrity Enhancement Facility.").

I am working on a project in which supportsIntegrityEnhancementFacility() is
being used to determine if the database supports ON DELETE CASCADE. Is this
the appropriate method for this and if so, should the PostgreSQL version be
changed to return true.

Current Implementation in AbstractJdbc1DatabaseMetaData.java is
/*
 * Is the SQL Integrity Enhancement Facility supported?
 * I haven't seen this mentioned anywhere, so I guess not
 *
 * @return true if so
 * @exception SQLException if a database access error occurs
 */
public boolean supportsIntegrityEnhancementFacility() throws SQLException
{
        if (Driver.logDebug)
                Driver.debug("supportsIntegrityEnhancementFacility false ");
        return false;
}

TIA
Alex Winawer


Re: DBMD supportsIntegrityEnhancementFacility() - should this

From
Fernando Nasser
Date:
This is an item in the SQL spec.  It probably menas that the DBMS has a
few things more than plain RI checking.  I don't have the spec with me
right now but it probably has something to do with implementing ON
DELETE CASCADE as you say.

Is ON DELETE CASCADE available on 7.3.3 backends or is it only on 7.4
that it is implemented?

I guess the driver should say true if the backend version has it.  There
is a method to check for the minimum backend version that could be used
to provide the return value.

Fernando

Alex Winawer wrote:
> Hi,
>
> My first question is does anyone know exactly what the "Integrity Enhancement
> Facility" is? I can only find references to the description of method in the
> JDBC Javadoc which isn't helpful ("Retrieves whether this database supports
> the SQL Integrity Enhancement Facility.").
>
> I am working on a project in which supportsIntegrityEnhancementFacility() is
> being used to determine if the database supports ON DELETE CASCADE. Is this
> the appropriate method for this and if so, should the PostgreSQL version be
> changed to return true.
>
> Current Implementation in AbstractJdbc1DatabaseMetaData.java is
> /*
>  * Is the SQL Integrity Enhancement Facility supported?
>  * I haven't seen this mentioned anywhere, so I guess not
>  *
>  * @return true if so
>  * @exception SQLException if a database access error occurs
>  */
> public boolean supportsIntegrityEnhancementFacility() throws SQLException
> {
>         if (Driver.logDebug)
>                 Driver.debug("supportsIntegrityEnhancementFacility false ");
>         return false;
> }
>
> TIA
> Alex Winawer
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>


--
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9