The GitHub/GitLab for database DevSecOps. World's most advanced database DevSecOps solution for Developer, Security, DBA and Platform Engineering teams.
When we try to synchronize schemas between PostgreSQL14 databases the procedures are recognized as functions in the generated DDL statement.
Example:
We have created the procedure process.create_data(boolean,varchar) but the “Generated DDL statement” tab shows:
DROP FUNCTION “process”. “create_data"(boolean, varchar);
CREATE PROCEDURE process.create_data(IN p_full boolean, IN p_data character).
Then we get the following error:
failed to execute context in a transaction: ERROR: process.create_data(boolean,varchar) is not a function (SQLSTATE 42809)
Indeed, it is not a function, but the DDL is wrong, we can fix it manually by writing “DROP PROCEDURE” instead of “DROP FUNCTION”.
Steps to reproduce
Create a procedure in PostgreSQL database
Sync Schema with another PostgreSQL database
Produced DDL statement is wrong and the procedure is recognized as a function
Expected behavior
Produced DDL statement is correct and procedures are recognized as procedures.
Provide the Bytebase version you are using
2.23.0
Describe the bug
When we try to synchronize schemas between PostgreSQL14 databases the procedures are recognized as functions in the generated DDL statement. Example: We have created the procedure process.create_data(boolean,varchar) but the “Generated DDL statement” tab shows: DROP FUNCTION “process”. “create_data"(boolean, varchar);
CREATE PROCEDURE process.create_data(IN p_full boolean, IN p_data character).
Then we get the following error: failed to execute context in a transaction: ERROR: process.create_data(boolean,varchar) is not a function (SQLSTATE 42809)
Indeed, it is not a function, but the DDL is wrong, we can fix it manually by writing “DROP PROCEDURE” instead of “DROP FUNCTION”.
Steps to reproduce
Create a procedure in PostgreSQL database Sync Schema with another PostgreSQL database Produced DDL statement is wrong and the procedure is recognized as a function
Expected behavior
Produced DDL statement is correct and procedures are recognized as procedures.
Provide the database you are using
PostgreSQL 14
Provide the version control system you are using
No response
Additional context
No response