Re: Is this a bug

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is this a bug
Date: 2014-03-13 15:53:08
Message-ID: 1394725988158-5795943.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

fabriziomello wrote
> On Thu, Mar 13, 2014 at 10:34 AM, Euler Taveira &lt;

> euler(at)(dot)com

> &gt;
> 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(at)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rajashree Mandaogane 2014-03-13 15:54:55 Proposal to join the hackers list
Previous Message Andres Freund 2014-03-13 15:42:42 Re: [PATCH] Store Extension Options