Re: Invalid user-level setting = confusing error message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thom Brown <thom(at)linux(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Invalid user-level setting = confusing error message
Date: 2016-02-11 14:38:40
Message-ID: 21291.1455201520@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thom Brown <thom(at)linux(dot)com> writes:
> At the moment, if we try to set up a configuration parameter for a
> user which doesn't make sense in that context, we get an error message
> that doesn't really tell us that we're not allowed to set it for
> users:
> # ALTER ROLE moo SET log_line_prefix = '%s';
> ERROR: parameter "log_line_prefix" cannot be changed now
> Might I propose an alternative error message for user-level
> configuration changes that target parameters of level sighup and
> above?
> Perhaps something like:
> ERROR: parameter "log_line_prefix" cannot be set at the user level.

I don't object in principle to having multiple phrasings of that
error message, but I do not see that "at the user level" is any
clearer than what we've got now. What's a "user level"?

Something along the line of "cannot be changed within individual
sessions" might work better, or maybe not. Let the bikeshedding
begin ...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-02-11 14:48:39 Re: [COMMITTERS] pgsql: Add some isolation tests for deadlock detection and resolution.
Previous Message Robert Haas 2016-02-11 14:36:00 Re: [COMMITTERS] pgsql: Add some isolation tests for deadlock detection and resolution.