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
Jira Link: DB-13435
Running Voyager to migrate a set of stored procedures from MySQL (MariaDB 10.5) and identified a syntax issue when original uses the unknown function LAST_INSERT_ID:
This syntax translates exactly but there is no LAST_INSERT_ID in Postgres which causes an error.
In the original MySQL code it is being used to return the ID of the row inserted. This likely needs to translate to a Postgres FUNCTION and use a RETURNING clause on the INSERT statement, e.g.
INSERT INTO ...
VALUES ..
RETURNING
result_id INTO l_id;
RETURN l_id;
The text was updated successfully, but these errors were encountered:
Jira Link: DB-13435
Running Voyager to migrate a set of stored procedures from MySQL (MariaDB 10.5) and identified a syntax issue when original uses the unknown function LAST_INSERT_ID:
Original:
Results:
This syntax translates exactly but there is no
LAST_INSERT_ID
in Postgres which causes an error.In the original MySQL code it is being used to return the ID of the row inserted. This likely needs to translate to a Postgres FUNCTION and use a RETURNING clause on the INSERT statement, e.g.
The text was updated successfully, but these errors were encountered: