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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: detect custom-format dumps in psql and emit a useful error
Date: 2014-10-24 10:18:55
Message-ID: 20141024101855.GL1791@alvin.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-10-24 10:23:14 Re: detect custom-format dumps in psql and emit a useful error
Previous Message Craig Ringer 2014-10-24 09:55:52 TODO: Helpful hint from psql on createdb