@claire Are you recreating your production schema every time? If not, I can see 2 issues with this approach.
- If you change the number of arguments your UDF receives, you will end up with 2 functions with the same name but different arguments (redshift supports method overloading). Not sure this is always the wanted result.
- If you change the returned type, I believe you will get an error when running the script.
Regards,
Zeev