Stored Procedure problem
Posted in 1999
Topics: Stored Procedures & SPL, Triggers, Constraints & Referential Integrity, Platform-Specific Issues
Hello everyone,
I have the following question regarding stored procedures:
A trigger for an INSERT-Statement calls a stored procedure. This procedure
does some referential integrity checks. The procedure gets as an argument
data with complex structure:
CREATE ROW TYPE ComplexType
(
attribute1 basictype1;
attribute2 basictype2;
attribute3 basictype3;
);
The procedures signature looks like this:
[code fragment]
CREATE PROCEDURE anyname
(
foo SET(ComplexType not null)
);[/code fragment]
In the procedure the data is decomposed to access the single attribute
values of the elements stored inside the set:
[code fragment]
FOREACH
SELECT * INTO <VariableOfTypeComplexType>
FROM TABLE(foo)
...
END FOREACH;[/code fragment]
If the total length of the argument <foo> passed to the procedure exceeds
114 Bytes the above FOREACH-loop is skipped, because it seems to be empty
(but it really isn't). If the length is less than 114 everything works fine.
(BTW the max length of the basic attributes is not exceeded !)
Can anybody explain what I'm doing wrong ? Is there something like a
do-not-pass-more-than-x-bytes-to-a-procedure rule ? The handbooks are not
a big help ... so is there anybody out there you knows the answer ?
I am using INFORMIX Universal Server (9.1) which runs on Solaris.
Thanks a lot
Patrick