You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Mike Haberman <mi...@ncsa.uiuc.edu> on 2001/06/21 20:27:31 UTC

READY TO COMMIT

Got all the code done and it's tested.  Waiting for approval  :)

mike



On Thu, Jun 21, 2001 at 10:36:24AM -0500, Mike Haberman wrote:
> I would like to add the onDelete and onUpdate attributes to
> the foreign key in the dtd.
> 
> <!ELEMENT foreign-key (reference+)>
> <!ATTLIST foreign-key
>   foreignTable CDATA #REQUIRED
>   onUpdate (cascade|set null|restrict|none) "none"
>   onDelete (cascade|set null|restrict|none) "none"
> >
> 
> 
> Also, at least for postgres, I would like to generate the foreign key
> stuff in line (instead of generating it after the table).  It's much
> more elegant (and easier) to generate :
> 
>   colname type REFERENCES table(id) ON DELETE cascade,
> 
>   than
> 
> CREATE TRIGGER if_dist_exists
>     BEFORE INSERT OR UPDATE ON films FOR EACH ROW
>     EXECUTE PROCEDURE check_primary_key ('col', 'table', 'col');
>    
> CREATE TRIGGER if_film_exists 
>     BEFORE DELETE OR UPDATE ON distributors FOR EACH ROW
>     EXECUTE PROCEDURE check_foreign_key (1, 'CASCADE', 'col', 'table', 'col');
>    
> 
> mike
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org

-- 
-------------------------------------------------
I am Vinz, Vinz Clortho.  Keymaster of Gozer,
Volguus Zildrohar, Lord of the Sebouillia.
Are you the Gatekeeper?
-------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: READY TO COMMIT

Posted by John McNally <jm...@collab.net>.
The reason the fk's were moved to the end was prevent problems with
circular references and ordering issues in general.  What happens if
table(id) is defined after the proposed line?

john mcnally

Mike Haberman wrote:
> 
> Got all the code done and it's tested.  Waiting for approval  :)
> 
> mike
> 
> On Thu, Jun 21, 2001 at 10:36:24AM -0500, Mike Haberman wrote:
> > I would like to add the onDelete and onUpdate attributes to
> > the foreign key in the dtd.
> >
> > <!ELEMENT foreign-key (reference+)>
> > <!ATTLIST foreign-key
> >   foreignTable CDATA #REQUIRED
> >   onUpdate (cascade|set null|restrict|none) "none"
> >   onDelete (cascade|set null|restrict|none) "none"
> > >
> >
> >
> > Also, at least for postgres, I would like to generate the foreign key
> > stuff in line (instead of generating it after the table).  It's much
> > more elegant (and easier) to generate :
> >
> >   colname type REFERENCES table(id) ON DELETE cascade,
> >
> >   than
> >
> > CREATE TRIGGER if_dist_exists
> >     BEFORE INSERT OR UPDATE ON films FOR EACH ROW
> >     EXECUTE PROCEDURE check_primary_key ('col', 'table', 'col');
> >
> > CREATE TRIGGER if_film_exists
> >     BEFORE DELETE OR UPDATE ON distributors FOR EACH ROW
> >     EXECUTE PROCEDURE check_foreign_key (1, 'CASCADE', 'col', 'table', 'col');
> >
> >
> > mike
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
> 
> --
> -------------------------------------------------
> I am Vinz, Vinz Clortho.  Keymaster of Gozer,
> Volguus Zildrohar, Lord of the Sebouillia.
> Are you the Gatekeeper?
> -------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org