Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Deferred constraint question

Re: Deferred constraint question

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 23 Jun 1999 10:21:51 +0100
Message-ID: <930130821.14033.1.nnrp-03.9e984b29@news.demon.co.uk>


There doesn't seem to be, even in 8.1.5. I would have expected to find it in dbms_transaction, but get grep'ed my way through everything in $ORACLE_HOME/rdbms/admin looking for it.

An oversight to be raised with Oracle support perhaps. In the meantime I guess you'll have to write it using dbms_sql - somthing like:

    n := dbms_sql.open_cursor;
    dbms_sql.parse(

        c =>n,
        statement =>'set constraint ' || i_constraint || ' deferred' ,
        language_flag => dbms_sql.v7

    );
    v_junk := dbms_sql.execute (n);

--

Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk

Jim Jenkinson wrote in message ...
>In Oracle 8.0.5.1, I have defined a table with a foreign key constraint
>which is DEFERRABLE INITIALLY IMMEDIATE.
>From within SQL*Plus, I can use the "set constraint" statement to make the
>constraint deferred for the length of a transaction. This works just as
>described in the Oracle documentation (i.e. the constraint is not enforced
>until a commit is issued). I can't figure out how to make the constraint
>deferred from within PL/SQL, however. Is there a supplied package which
sets
>a constraint to deferrable, just like the "set constraint" statement does?
>
Received on Wed Jun 23 1999 - 04:21:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US