db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Remesh (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-551) Allow invoking java stored procedures from inside a trigger. Make CALL a valid statement in the trigger body.
Date Mon, 10 Jul 2006 17:11:32 GMT
     [ http://issues.apache.org/jira/browse/DERBY-551?page=all ]

Deepa Remesh updated DERBY-551:

    Attachment: derby-551-draft3.diff

Attaching a new draft patch "derby-551-draft3.diff" which uses Dan's first suggestion (use
the existing mechanism, which means a before trigger with a CALL procedure that is declared
MODIFIES SQL DATA statement would succeed but would fail at runtime when fired. )

In this patch, I removed the checks that I had added in the parser to check for type of procedure
allowed in a before trigger. Instead, the existing runtime check is used. This was slightly
modified to check that insert, update, delete on "any" table is not allowed in a before trigger.
The existing check was only looking for insert, update,delete on the "trigger table". If this
is acceptable as a first step, I plan to submit a patch for this. And then work on a follow-up
patch to move the check to compile time using Dan's second suggestion (use the existing compile
time mechansim that defines what is allowed in a context).  Please take a look at the new
patch. Thanks.

> Allow invoking java stored procedures from inside a trigger. Make CALL a valid statement
in the trigger body.
> -------------------------------------------------------------------------------------------------------------
>          Key: DERBY-551
>          URL: http://issues.apache.org/jira/browse/DERBY-551
>      Project: Derby
>         Type: New Feature

>   Components: SQL
>     Versions:
>  Environment: All platforms
>     Reporter: Satheesh Bandaram
>     Assignee: Deepa Remesh
>      Fix For:
>  Attachments: ProcedureInTrigger_Tests_v1.html, derby-551-draft1.diff, derby-551-draft1.status,
derby-551-draft2.status, derby-551-draft3.diff, derby-551-draft3.status, derby-551draft2.diff
> Derby currently doesn't allow CALL statement to be used in a trigger body. It would be
great to allow java stored procedure invocation inside a trigger. Since Derby doesn't have
SQL procedure language, triggers can only execute a single SQL statement. If we allow stored
procedures in triggers, it would be possible to write a trigger that involves more than just
one SQL statement. Functions are currently allowed, but they are read-only.
> I believe it is fairly easy to support this enhancement. Need good amount of testing

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message