Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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.2k525782
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:

×246

question asked: 05 Apr, 06:46

question was seen: 174 times

last updated: 05 Apr, 09:31