Improve Stored Procedures features
We are trying to increase the usage of SP in our system environment.
Migrating business code from 4GL to the database.
But this process becomes very painful for our developers since the support for SPL is limited.
Mainly the inexistence of a native tool to control versions, explore, build, test and deploy Stored Procedures.
Here is our list of feature requests about STORED PROCEDURES in Informix Database v12.10 :
A tool to allow debug step by step.
The IBM Optim tool and Visual Studio Plugin are old and they have a dependency of DRDA where as far I know is deprecated.
(I tried to use the VS Plugin, but they need the VS 2017 which isn't available to download at Microsft website and the plugin doesn't recognize the last version of the VS community edition).
Our suggestion is to create or adapt the VS plugin for Eclipse IDE, which is an opensource and popular dev tool or implement this debug in dbaccess, where is a great improvement (no need to install anything to the developer desktop).
As debug we mean: step by step (step out/step in) with trace/display of local,globals and internal variables;
I have a CASE open to get information about how to use the existent tools : TS001906462
Allow to REPLACE a SPL without drop it , "CREATE OR REPLACE" syntax.
This already addressed at RFE : https://ibmanalytics.ideas.aha.io/ideas/INFX-I-232
As DBA, usually need to update SPLs used in triggers, even when the DROP/CREATE run instantaneous, a lot of process abort with an error in our system saying the SPL doesn't exist.
In a REPLACE situation, Internally the engine should first check the syntax and if ok, lock the SPL, replate it, release the lock.
Concurrents process which needs to access the SPL should stop in lock wait until the new SPL is released.
Add support to RECORD data type, just like 4GL
or better support to the ROW data type to allow use it just like a RECORD type and automatic casts.
Add global record variable SQLCA, like 4GL.
Make easily to write/read a code, instead use the dbinfo('') function.
In the compiling process, if get any syntax error, showing which line and if possible part of the code in the message.
Isn't everybody who use the dbaccess to write SPs (where show the line with error).
When using other tools like Squirrel SQL and Dbeaver they don't interpret the structure of the error messages
(AFAIK the line with error incoming inside of SQLCA structure).
So, if they display as message, already help a lot the developer to identify the error.
Allow use FOREACH with dynamic statements (PREPARE + DECLARE)
Today, PREPARE+DECLARE works only with OPEN/FETCH/CLOSE/FREE or EXECUTE IMMEDIATE.
The suggestion is use PREPARE + DECLARE + FOREACH for statements with multiple rows as result.
Add support to INITIALIZE command, like 4GL.
This way in a single line initialize all variables needed.
Since the SPL give an error at runtime when access variables not initialized.
Improve the support to CURRENT function, to return the date/time correctly.
Today needed to workaround using the sysshmvals which is a very poor and ugly way to work.
Add option to define PDQPRIORITY in the CREATE PROCEDURE syntax line, overriding the session SET PDQPRIORITY.
CREATE PROCEDURE xpto() returning ... PDQPRIORITY 0 ;
Improve the control of the resources allocated/used by a running SP.
We get a situation here where a recursive SP was able to crash our production instance (stack overflow).
Considering this SP is 100% Informix SPL (not C language) we never expected that behave. What we expected is an error with stack overflow message.
This occurred over code with a defect (our developer code), but this is something what everyone and every environment is susceptible to happen.
This issue was worked in the CASE TS001886521 support, where wasn't accept as product defect (the engine allow a SP crash the engine) .
So, here is a feature request.
Add support to "LET ... =+" operator to concat automatically strings.
This is useful where need to be used in dynamic sqls where the SQL is break in parts
| 196 if pagrupar = 'S' then
| 197 let l_sql = trim(l_sql) || " and b.chr_codigo_faixa = d.chr_codigo_faixa ";
| 198 end if
| 196 if pagrupar = 'S' then
| 197 let l_sql =+ " and b.chr_codigo_faixa = d.chr_codigo_faixa ";
| 198 end if
NOTICE TO EU RESIDENTS: per EU Data Protection Policy, if you wish to remove your personal information from the IBM ideas portal, please login to the ideas portal using your previously registered information then change your email to "firstname.lastname@example.org" and first name to "anonymous" and last name to "anonymous". This will ensure that IBM will not send any emails to you about all idea submissions