improve pg_restore warning on text dump input
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2012-01-03T18:43:04Z
Lists: pgsql-hackers
Attachments
- resstorewarn.patch (text/x-patch) patch
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. cheers andrew