on-internet
← Community

Changing schema name within functions

Stack Overflow ·

I have schema1 in database1. I want to move all the functions of schema1 to schema2 which is present in database2. I have restored backup file of database1 into database2. And changed the schema name. The schema name for function call automatically got changed. But within function definition the schema name is not changed. for ex: CREATE OR REPLACE FUNCTION schema2.execute(..) BEGIN select schema1."VALIDATE_SESSION"(....) end How can I change "schema1" to "schema2" automatically? I have tried to store current schema name in variable and append it to table. But calling current_schema() returns

Comments

Sign in or sign up to comment and upvote.

No comments yet.