I am trying to restore a database from one schema to another schema in PostgreSQL using pgadmin backup and restore utility. The backup is successful for the database A but when I try to do the restore of this to another database B I get the following error:
pg_restore: creating TABLE "public.app_role" pg_restore: [archiver (db)] Error from TOC entry 227; 1259 197811 TABLE app_role schedule pg_restore: [archiver (db)] could not execute query: ERROR: role "schedule" does not exist Command was: ALTER TABLE public.app_role OWNER TO schedule;
I tried changing the restore options like do not save owner as yes, privileges yes etc but still there was no luck.
Does anyone know about this or have faced an issue like this before?