Hi, How about the attached that adjusts errorcode for the error related to checking the flag bgw_flags in BackgroundWorkerInitializeConnection*() functions so that it matches the treatment in SanityCheckBackgroundWorker()?
s/ERRCODE_PROGRAM_LIMIT_EXCEEDED/ERRCODE_INVALID_PARAMETER_VALUE/g There is already a "/* XXX is this the right errcode? */" there. Thanks, Amit
diff --git a/catalog.c b/catalog.c index c9e1f2b..b6058e4 100644 --- a/catalog.c +++ b/catalog.c @@ -499,7 +499,7 @@ catalog_read_ini(const char *path) options[i++].var = &status; Assert(i == lengthof(options) - 1); - pgut_readopt(path, options, ERROR_CORRUPTED); + pgut_readopt(path, options, ERROR); if (backup_mode) { diff --git a/pg_rman.c b/pg_rman.c index 532806e..6dd4d9d 100644 --- a/pg_rman.c +++ b/pg_rman.c @@ -163,7 +163,7 @@ main(int argc, char *argv[]) } join_path_components(path, backup_path, PG_RMAN_INI_FILE); - pgut_readopt(path, options, ERROR_ARGS); + pgut_readopt(path, options, ERROR); } /* BACKUP_PATH is always required */ diff --git a/pgut/pgut.c b/pgut/pgut.c index ee8810c..467b278 100644 --- a/pgut/pgut.c +++ b/pgut/pgut.c @@ -698,7 +698,7 @@ pgut_readopt(const char *path, pgut_option options[], int elevel) } } // Reach here if the option read from configuration file is not found in options[] - if ( elevel == ERROR_ARGS && !options[j].type) + if (!options[j].type) elog(elevel, "invalid option \"%s\"", key); } }
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers