Re: postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail
Date
Msg-id 20090309002108.GN3821@alvh.no-ip.org
Whole thread Raw
In response to postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail  (Selena Deckelmann <selena@endpoint.com>)
Responses Re: postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Selena Deckelmann wrote:

> !         parse_error:
> !             if (token == GUC_EOL || token == 0)
> !                 ereport(elevel,
> !                         (errcode(ERRCODE_SYNTAX_ERROR),
> !                          errmsg("syntax error in file \"%s\" line %u, near end of line",
> !                                 config_file, ConfigFileLineno - 1)));

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 know somebody is going to say "but errcontext is not shown when
verbosity is set to terse", to which I say that we should fix that too.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Out parameters handling
Next
From: Andrew Dunstan
Date:
Subject: Re: small parallel restore optimization