Ora2Pg is a free tool used to migrate an Oracle database to a PostgreSQL compatible schema. It connects your Oracle database, scan it automatically and extracts its structure or data, it then generates SQL scripts that you can load into PostgreSQL.
Hi Team,
If we have a view in MYSQL and it involves a function without any alias provided for it, we export it as is for the alias which in turn is an invalid syntax for PG. It'll be clearer with an example:
Sample view definition:
CREATE OR REPLACE VIEW v1 as select foo(id) from bar;
where foo() is any function which returns something.
This is exported as:
CREATE OR REPLACE VIEW v1 AS select foo(bar.id) AS foo(id) FROM bar;
This is an invalid syntax which throws an error:
ERROR: syntax error at or near "("
LINE 1: ...TE OR REPLACE VIEW v1 AS select foo(bar.id) AS foo(id) FROM ...
The same view defined with alias as :
CREATE OR REPLACE VIEW v1 AS select foo(bar.id) AS p_name FROM bar;
Hi Team, If we have a view in MYSQL and it involves a function without any alias provided for it, we export it as is for the alias which in turn is an invalid syntax for PG. It'll be clearer with an example:
Sample view definition:
where foo() is any function which returns something.
This is exported as:
This is an invalid syntax which throws an error:
The same view defined with alias as :
Works fine.
Thank You for your help.