Re: [HACKERS] postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail

2009-03-27 Thread Tom Lane
Selena Deckelmann sel...@endpoint.com writes: ParseConfigFile currently exits on the first parsing error. Changed guc_file.l to report all parsing errors before exiting: This seems like basically a good idea, but consider what happens if you make a really major-league screwup in your

Re: [HACKERS] postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail

2009-03-10 Thread Simon Riggs
On Sun, 2009-03-08 at 16:27 -0700, Selena Deckelmann wrote: ParseConfigFile currently exits on the first parsing error. Changed guc_file.l to report all parsing errors before exiting: * Moved parse_error: block inside while() loop * Removed cleanup_exit: and associated 'goto' * Added

Re: [HACKERS] postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail

2009-03-10 Thread Selena Deckelmann
Hi! Simon Riggs wrote: On Sun, 2009-03-08 at 16:27 -0700, Selena Deckelmann wrote: ParseConfigFile currently exits on the first parsing error. Changed guc_file.l to report all parsing errors before exiting: * Moved parse_error: block inside while() loop * Removed cleanup_exit: and associated

Re: [HACKERS] postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail

2009-03-10 Thread Simon Riggs
On Tue, 2009-03-10 at 07:30 -0700, Selena Deckelmann wrote: Is it possible to check for parameters that have been changed, yet will not be applied at reload? This was already implemented! :) For example: LOG: attempted change of parameter shared_buffers ignored DETAIL: This

Re: [HACKERS] postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail

2009-03-10 Thread Selena Deckelmann
Simon Riggs wrote: On Tue, 2009-03-10 at 07:30 -0700, Selena Deckelmann wrote: A thing that could be added, however, is reporting of all invalid (as opposed to valid, but requires a restart to apply) parameters before exiting. This change requires refactoring ProcessConfigFile() more

[HACKERS] postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail

2009-03-08 Thread Selena Deckelmann
ParseConfigFile currently exits on the first parsing error. Changed guc_file.l to report all parsing errors before exiting: * Moved parse_error: block inside while() loop * Removed cleanup_exit: and associated 'goto' * Added ereport if ParseConfigFile() returns false * changed OK to ok ;) *

Re: [HACKERS] postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail

2009-03-08 Thread Alvaro Herrera
Selena Deckelmann wrote: ! parse_error: ! if (token == GUC_EOL || token == 0) ! ereport(elevel, ! (errcode(ERRCODE_SYNTAX_ERROR), !

Re: [HACKERS] postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail

2009-03-08 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Not that this has anything to do with the patch at hand, but I remember thinking about this sort of error message in the past. Would it be appropriate to move the file name and line number to an errcontext() field? I think the message is fine