Re: [DDL-Oracle-users] ENABLING/DISABLING constraints in Oracle 7.3.3
Brought to you by:
rvsutherland
|
From: Richard S. <rvs...@ya...> - 2001-03-29 14:46:33
|
Remke,
Thanks again. You have been extremely helpful in shaking down
DDL::Oracle for Oracle7, and I really appreciate it. I may get a new
version out this weekend. There was another bug reported, plus some new
features are under construction.
Again, THANKS.
Richard
--- Remke Rutgers <Rem...@br...> wrote:
> Hello list-users (Richard)?
>
> This issue concerns version 1.06 of ddl-oracle, containing Oracle.pm
> version 1.40.
>
> Lines 613-616 of Oracle.pm say:
> if ( $oracle_major < 8 )
> {
> $sql .= "$enable\n";
> }
>
> $enable has the value of ENABLE or DISABLE, depending on the state of
> the constraint.
>
> However, in Oracle 7.3.3, in an ALTER TABLE ... ADD CONSTRAINT
> statement you only need to use DISABLE if the constraint must not be
> enforced. Default is enabled and that does not need a keyword.
>
> Eg, the code generated is:
> ALTER TABLE myuser.exm_result_category ADD CONSTRAINT
> fk_exm_result__exm_result FOREIGN KEY
> (
> resultid
> )
> REFERENCES myuser.exm_result
> (
> resultid
> )
> ON DELETE CASCADE
> ENABLE
> ;
>
> The line ENABLE should be omitted, or it should read: ENABLE CONSTRAINT
> constraintname
>
> I changed line 613-616 in Oracle.pm to:
> if ( $oracle_major < 8 )
> {
> if ( $enable ne 'ENABLE' )
> {
> $sql .= "$enable\n";
> }
> }
> That seems to work fine.
> However, I do not know if this is valid for all older Oracle versions.
>
> Remke Rutgers - Rem...@br...
> Technisch Consultant
>
> Bright Alley - Media Park
> Sumatralaan 45 / Postbus 10
> 1200 JB Hilversum
> web www.brightalley.com
> tel +31 35 6774000 / fax +31 35 6774355
>
> _______________________________________________
> DDL-Oracle-users mailing list
> DDL...@li...
> http://lists.sourceforge.net/lists/listinfo/ddl-oracle-users
=====
Richard Sutherland
rvs...@ya...
Rights? You want rights?
I'll give you so many rights you'll beg for a left.
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text
|