Re: Is this a bug - Mailing list pgsql-hackers

From David Johnston
Subject Re: Is this a bug
Date
Msg-id 1394725988158-5795943.post@n5.nabble.com
Whole thread Raw
In response to Re: Is this a bug?  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers
fabriziomello wrote
> On Thu, Mar 13, 2014 at 10:34 AM, Euler Taveira <

> euler@.com

> >
> wrote:
>>
>> On 13-03-2014 00:11, Fabrízio de Royes Mello wrote:
>> > Shouldn't the "ALTER" statements below raise an exception?
>> >
>> For consistency, yes. Who cares? I mean, there is no harm in resetting
>> an unrecognized parameter. Have in mind that tighten it up could break
>> scripts. In general, I'm in favor of validating things.
>>
>
> I know this could break scripts, but I think a consistent behavior should
> be raise an exception when an option doesn't exists.
>
>> euler@euler=# reset noname;
>> ERROR:  42704: unrecognized configuration parameter "noname"
>> LOCAL:  set_config_option, guc.c:5220
>>
>
> This is a consistent behavior.
>
> Regards,

Probably shouldn't back-patch but a fix and release comment in 9.4 is
warranted.

Scripts resetting invalid parameters are probably already broken, they just
haven't discovered their mistake yet.

Do we need an "IF EXISTS" feature on these as well? ;)

David J.







--
View this message in context: http://postgresql.1045698.n5.nabble.com/Is-this-a-bug-tp5795831p5795943.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [PATCH] Store Extension Options
Next
From: Andrew Dunstan
Date:
Subject: Re: Postgresql XML parsing