From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: run GUC check hooks on RESET |
Date: | 2012-02-15 18:23:59 |
Message-ID: | CA+TgmoYtbvE0STTCeU8UsKMaidVWaREFVCy90AC4y44Vhf5_jw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Feb 11, 2012 at 1:36 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> "Kevin Grittner" wrote:
> Tom Lane wrote:
>
>>> I agree it's a bug that you can do what Kevin's example shows.
>>
>> I'll look at it and see if I can pull together a patch.
>
> Attached.
>
> Basically, if a GUC has a check function, this patch causes it to be
> run on a RESET just like it is on a SET, to make sure that the
> resulting value is valid to set within the context. Some messages
> needed adjustment. While I was there, I made cod a little more
> consistent among related GUCs.
>
> I also added a little to the regression tests to cover this.
This patch makes me a little nervous, because the existing behavior
seems to have been coded for quite deliberately. Sadly, I don't see
any comments explaining why the RESET case was excluded originally.
On the other hand, I can't see what it would break, either. Have you
gone through all the check hooks and verified that we're not violating
any of their assumptions?
I assume that you're thinking we'd only fix this in master?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2012-02-15 18:45:29 | Re: [trivial patch] typo in doc/src/sgml/sepgsql.sgml |
Previous Message | Tom Lane | 2012-02-15 18:13:37 | Re: Different gettext domain needed for error context |