ora2pg
ora2pg copied to clipboard
Conversion function matched incorrectly inside function name
If user function contains known conversion function name, it is converted even though it is part of another function name. The function parameter must match the conversion function's parameter.
Steps to reproduce: CREATE FUNCTION FOO_TO_NUMBER(str IN VARCHAR2) RETURN NUMBER IS BEGIN RETURN 1; END; / CREATE VIEW FOO AS SELECT FOO_TO_NUMBER('1') TMP FROM DUAL;
ora2pg -t VIEW returns: CREATE OR REPLACE VIEW foo (tmp) AS SELECT FOO_('1')::numeric TMP;
Work aroud: Rename function ;)
Thanks for the report, commit c3f1706 might fix it.