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

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Selena Deckelmann <selena(at)endpoint(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: postgresql.conf: patch to have ParseConfigFile report all parsing errors, then bail
Date: 2009-03-09 00:21:08
Message-ID: 20090309002108.GN3821@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-03-09 00:45:43 Re: small parallel restore optimization
Previous Message Tom Lane 2009-03-08 23:36:51 Re: Out parameters handling