Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Informix to PostgreSQL: FUNCTION RETURNING unhandled #34

Open
strk opened this issue Jul 12, 2018 · 3 comments
Open

Informix to PostgreSQL: FUNCTION RETURNING unhandled #34

strk opened this issue Jul 12, 2018 · 3 comments

Comments

@strk
Copy link

strk commented Jul 12, 2018

This valid Informix function does not convert correctly to PostgreSQL:

CREATE FUNCTION test_returning()
RETURNING VARCHAR(3), VARCHAR(3) ;
   RETURN '0','1';
END FUNCTION

The output shows some memory issue too, as it has mungled text:

CREATE OR REPLACE FUNCTION test_returning()
RETURNING VARCHAR(3), VARCHAR(3) ; AS $$

BEGIN
   RETURN '0','1';
END; 
$$ LANGUAGE plpgsql;
AGE plpgsql;
GE plpgsql;
   
END CREATE FUNCTION;
LANGUAGE plpgsql;
@strk
Copy link
Author

strk commented Jul 12, 2018

Code to convert RETURNING to OUT parameter do exist, but it is evidently not triggered:

// For Informix replace RETURNING values with OUT parameters or table function
if(_source == SQL_INFORMIX)
InformixConvertReturning(create, procedure);

@strk
Copy link
Author

strk commented Jul 12, 2018

The InformixConvertReturning function is called, as debugging statements show:

XXX ParseInformixReturns enter, returns are 0x558871e2e230
XXX ParseInformixReturns found return datatype VARCHAR
XXX ParseInformixReturns found return datatype VARCHAR

But for some reason those parsed return values are not used/converted

@strk
Copy link
Author

strk commented Jul 12, 2018

Work in progress fix for this issue is in renesugar#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant