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 17:36:24 UTC
PROPOSAL: change dtd for foreign keys + inline FOREIGN KEYS
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
Re: PROPOSAL: change dtd for foreign keys + inline FOREIGN KEYS
Posted by Leandro Saad <le...@ibnetwork.com.br>.
>
> 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"
>
I don't vote, but +1
>
> 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 :
I don't vote, but +1
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org