Re: [BUGS] BUG #14650: pg_dump -c fails when 'public' schema doesn't exist

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [BUGS] BUG #14650: pg_dump -c fails when 'public' schema doesn't exist
Дата
Msg-id CAB7nPqTYuKYS4R=GBqL7tCpN67DPDTNGuf6JcH-RH1_vpEEoLQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #14650: pg_dump -c fails when 'public' schema doesn't exist  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [BUGS] BUG #14650: pg_dump -c fails when 'public' schema doesn'texist  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-bugs
On Sat, May 13, 2017 at 3:22 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> tureba@gmail.com writes:
>> It seems that pg_dump -c fails when the database doesn't have a 'public'
>> schema. When using a clean database, then dropping (or renaming) the
>> 'public' schema, a subsequent pg_dump -c tells me:
>
>> $ pg_dump -c test
>> pg_dump: [archiver (db)] query failed: ERROR:  schema "public" does not exist
>> LINE 1: ...::regclass AND pip.objsubid = 0 AND pip.objoid <> 'public'::...
>>                                                              ^
>
>> This seems to have started in commit 330b84d8c4
>
> Yeah, this is not cool.  Stephen?

This is visibly an oversight of the recent commit 330b84d, which is
broken on its face because it does not check for the existence of this
schema. One simple fix would be to extend this query with a SELECT
CASE ... ELSE 0 FROM pg_namespace WHERE nspname = 'public' but that's
ugly.
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [BUGS] Postgres 9.6.3 pg_dump issue
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [BUGS] BUG #14530: Logical Decoding Slowness