Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-551

Allow invoking java stored procedures from inside a trigger. Make CALL a valid statement in the trigger body.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.1.0
    • 10.2.1.6
    • SQL
    • None
    • All platforms

    Description

      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 though.

      Attachments

        1. derby-551-draft1.diff
          30 kB
          Deepa
        2. derby-551-draft1.status
          0.9 kB
          Deepa
        3. derby-551draft2.diff
          74 kB
          Deepa
        4. derby-551-draft2.status
          1 kB
          Deepa
        5. derby-551-draft3.diff
          70 kB
          Deepa
        6. derby-551-draft3.status
          1 kB
          Deepa
        7. derby-551-patch1-v1.diff
          68 kB
          Deepa
        8. derby-551-patch1-v1.status
          1 kB
          Deepa
        9. derby-551-patch2-v1.diff
          2 kB
          Deepa
        10. derby-551-patch3-v1.diff
          11 kB
          Deepa
        11. derby-551-patch3-v1.status
          0.7 kB
          Deepa
        12. derby-551-patch3-v2.diff
          12 kB
          Deepa
        13. derby-551-patch3-v2.status
          0.7 kB
          Deepa
        14. ProcedureInTrigger_Tests_v1.html
          10 kB
          Deepa

        Issue Links

          Activity

            People

              deepa Deepa
              bandaram Satheesh E. Bandaram
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: