Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

Is it possible to somehow emulate the self_recursion option in the Watcom-SQL dialect for a trigger?
I would like to completely eliminate the possibility of recursively calling a trigger ("Triggers firing themselves").

asked 05 Apr, 06:46

Ilia63's gravatar image

Ilia63
1.2k545982
accept rate: 44%

1

Well, the obious easy answer is to prevent recursive trigger calls by adding conditions that prevent further calls. ;)

If that option does not impact Watcom-SQL triggers, you might use the stack trace functions/procedures to rollback the trigger once a particular stack level has been reached. (I do not know how that does impact performance...)

(05 Apr, 07:03) Volker Barth
1

As a protective measure, SQLE_NESTING_TOO_DEEP is reported for unbounded recursive triggers (or procedures). This can be seen with a table with a DEFAULT TIMESTAMP column and an UPDATE trigger. Note: This impacts Windows after SP1 when microsecond TIMESTAMP support was added.

(05 Apr, 09:31) Chris Keating
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×248

question asked: 05 Apr, 06:46

question was seen: 313 times

last updated: 05 Apr, 09:31