| От | Tom Lane |
|---|---|
| Тема | Re: pg_restore: error: schema "public" already exists |
| Дата | |
| Msg-id | 1219519.1603852109@sss.pgh.pa.us обсуждение |
| Ответ на | pg_restore: error: schema "public" already exists (raf <raf@raf.org>) |
| Список | pgsql-general |
raf <raf@raf.org> writes:
> A colleague is getting this error when trying to load a
> database dump:
> pg_restore: error: could not execute query: ERROR: schema "public" already exists
> I'm wondering if anyone can explain it.
The public schema is a bit of a strange beast, and pg_dump has to
special-case it in some ways. We've moved those special cases around
from time to time, too. So one likely explanation here has to do
with version discrepancies between the pg_dump that made the dump
file and the pg_restore that's restoring it.
Also, I do not think that you're telling us the whole truth about
how your colleague is running pg_dump and/or pg_restore. There
shouldn't be any "CREATE SCHEMA public" issued if you didn't say -c.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера