Re: detect custom-format dumps in psql and emit a useful error

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: detect custom-format dumps in psql and emit a useful error
Дата
Msg-id 20141024102314.GH5790@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: detect custom-format dumps in psql and emit a useful error  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: detect custom-format dumps in psql and emit a useful error  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 2014-10-24 07:18:55 -0300, Alvaro Herrera wrote:
> Jeevan Chalke wrote:
> 
> > Regarding Directory Error:
> > ===
> > I strongly against the proposal. This patch changing error message to
> > something like this:
> > "psql:blah:0: Input path is a directory. Use pg_restore to restore
> > directory-format database dumps."
> > 
> > So even though I accidentally provide a directory instead of a sql script
> > file when I have NO intention of restoring a dump, above message looks
> > weired. Instead current message looks perfectly fine here. i.e.
> > "could not read from input file: Is a directory"
> > 
> > psql always expect a file and NOT directory. Also it is not necessarily
> > working on restoring a dump.
> 
> Yeah, this patch is a lot more debatable than the other one.  I have
> pushed the first one without changing the error message.

We could just test for toc.dat and then emit the warning...

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: detect custom-format dumps in psql and emit a useful error
Следующее
От:
Дата:
Сообщение: Re: pg_receivexlog --status-interval add fsync feedback