Re: improve pg_restore warning on text dump input

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: improve pg_restore warning on text dump input
Date: 2012-01-03 18:55:29
Message-ID: 23743.1325616929@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> From time to time there are complaints because people mistakenly feed a
> text format dump to pg_restore and get back a somewhat cryptic message
> about the file not being a valid archive. It's been suggested that we
> should have pg_restore run the file through psql, but that would involve
> more work than I at least care to give the problem. However, I think we
> should give a nicer message, suggesting the user try feeding the file to
> psql instead. The attached small patch does that.

It would probably be better if you put this test before the one that
insists the file is at least 512 bytes.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-01-03 19:04:28 Re: ALTER TABLE lock strength reduction patch is unsafe
Previous Message Andrew Dunstan 2012-01-03 18:43:04 improve pg_restore warning on text dump input