Re: [PATCHES] pg_restore ignore error patch

2004-04-20 Thread Fabien COELHO
I looked over the patch and it seems to continue on pg_restore errors by default. That isn't good. By default, any error should make it exit loudly. I'm not sure of that. pg_dump is really designed and tested for the case of text dump to a psql script, and if there is an error

Re: [PATCHES] pg_restore ignore error patch

2004-04-20 Thread Bruce Momjian
Fabien COELHO wrote: I looked over the patch and it seems to continue on pg_restore errors by default. That isn't good. By default, any error should make it exit loudly. I'm not sure of that. pg_dump is really designed and tested for the case of text dump to a psql

Re: [PATCHES] pg_restore ignore error patch

2004-04-19 Thread Bruce Momjian
Fabien COELHO wrote: Dear patchers, please find a small patch submission so that pg_restore ignores some sql errors. The implementation seems quite reasonnable to me, but pg-gods may have a different opinion. Two fields are added to the ArchiveHandler to trigger the behavior. A count

Re: [PATCHES] pg_restore ignore error patch

2004-04-19 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: I looked over the patch and it seems to continue on pg_restore errors by default. That isn't good. By default, any error should make it exit loudly. I'm not sure of that. pg_dump is really designed and tested for the case of text dump to a psql

Re: [PATCHES] pg_restore ignore error patch v2

2004-04-19 Thread Bruce Momjian
[ Newest version.] Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches I will try to apply it within the next 48 hours. --- Fabien COELHO wrote:

Re: [PATCHES] pg_restore ignore error patch

2004-04-19 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: I looked over the patch and it seems to continue on pg_restore errors by default. That isn't good. By default, any error should make it exit loudly. I'm not sure of that. pg_dump is really designed and tested for the case of

Re: [PATCHES] pg_restore ignore error patch v2

2004-04-19 Thread Bruce Momjian
Ah, this v2 version has the proper exit code. Great. --- Fabien COELHO wrote: Dear patchers, please find attached a small patch so that pg_restore ignores some sql errors. This is the second submission, which

Re: [PATCHES] pg_restore ignore error patch

2004-04-12 Thread Fabien COELHO
Dear Andrew, I transfer some data from one server to the other. On such occasion, I use my laptop to connect with server X, I download the data, then I restore them to server Y. The versions on my laptop and both servers are likely to be different. My laptop is likely to have some

Re: [PATCHES] pg_restore ignore error patch

2004-04-10 Thread Fabien COELHO
My tests suggest that a feature of pg_restore is that it is only expected to work with its own server. Indeed, it generates some new syntax, such as $$ quoting, which is not compatible with older servers. This fact does not seem to appear in the documentation. Wrong. It does appear in

Re: [PATCHES] pg_restore ignore error patch

2004-04-10 Thread Fabien COELHO
please find a small patch submission so that pg_restore ignores some sql errors. Yeah, we've been talking about doing that for awhile. But please define some errors --- what do you ignore exactly? Connection errors are not ignored. The error is triggered directly by the execute sql

Re: [PATCHES] pg_restore ignore error patch

2004-04-10 Thread Andrew Dunstan
Fabien COELHO said: Well, it means that you must decide a dump time if you may have to restore in an older version. I can guess why it eased the implementation, but it does not look good. You want to be able to backup from version x to version y for some yx? We support upgrades, not

Re: [PATCHES] pg_restore ignore error patch

2004-04-10 Thread Fabien COELHO
Dear Andrew, Well, it means that you must decide a dump time if you may have to restore in an older version. I can guess why it eased the implementation, but it does not look good. You want to be able to backup from version x to version y for some yx? We support upgrades, not

[PATCHES] pg_restore ignore error patch v2

2004-04-10 Thread Fabien COELHO
Dear patchers, please find attached a small patch so that pg_restore ignores some sql errors. This is the second submission, which integrates Tom comments about localisation and exit code. I also added some comments about one sql command which is not ignored. I tested it. Have a nice day, --

Re: [PATCHES] pg_restore ignore error patch

2004-04-09 Thread Andrew Dunstan
Fabien COELHO said: My tests suggest that a feature of pg_restore is that it is only expected to work with its own server. Indeed, it generates some new syntax, such as $$ quoting, which is not compatible with older servers. This fact does not seem to appear in the documentation. Wrong. It

Re: [PATCHES] pg_restore ignore error patch

2004-04-09 Thread Tom Lane
Fabien COELHO [EMAIL PROTECTED] writes: please find a small patch submission so that pg_restore ignores some sql errors. Yeah, we've been talking about doing that for awhile. But please define some errors --- what do you ignore exactly? + if (AH-n_errors) + /* translator:

[PATCHES] pg_restore ignore error patch

2004-04-09 Thread Fabien COELHO
Dear patchers, please find a small patch submission so that pg_restore ignores some sql errors. The implementation seems quite reasonnable to me, but pg-gods may have a different opinion. Two fields are added to the ArchiveHandler to trigger the behavior. A count summary of ignored sql errors