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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to