psql:schema.psql:81: ERROR: permission denied for schema public on the command `ALTER FUNCTION "public"."get_current_user"() OWNER TO "application_user";`
Question is how to handle schema dump (without manually changing dump) when we don't have access to superuser e.g. in cloud environments
If I add `GRANT CREATE ON SCHEMA public TO application_user` in source database, then it appears at the end of the dump and after ALTER FUNCTION.
When making a dump from PostgreSQL 14 and using it in PostgreSQL 15 with a user that has no superuser access (e.g. cloud environments), then we run into the following line from https://www.postgresql.org/docs/15/sql-alterfunction.html
> To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have CREATE privilege on the function's schema.