Subject Procedure as Function calling
Author fomin_maxim
Hello!

I have question. I have procedure, for example:

CREATE PROCEDURE SQR(X INTEGER) RETURNS(RESULT INTEGER) AS
begin
Result=:x*:x;
suspend;
end

I also have table or tables

CREATE TABLE T (
ID INTEGER,
VAL INTEGER
)

Is it possible to call my procedure as function (Informix supports
this syntax):

select sqr(T.Val) from T where ID=2;

An error was found in the application program input parameters for
the SQL statement.
Dynamic SQL Error.
SQL error code = -804.
Function unknown.
SQR.

Currently I use:

select (select * from sqr(T.Val)) from T where ID=2;

Is it the only way to do this? And what about future version?