You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we have a view in MYSQL, which contains a select on a function and no alias is provided for it, the function as defined in the view is considered as the alias which 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;
Works fine.
The text was updated successfully, but these errors were encountered:
If we have a view in MYSQL, which contains a
select
on a function and no alias is provided for it, the function as defined in the view is considered as the alias which 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.
The text was updated successfully, but these errors were encountered: