Re: Should we get rid of custom_variable_classes altogether?

From: Alex Shulgin <alex(dot)shulgin(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Alex Shulgin <ash(at)commandprompt(dot)com>, alvherre(at)commandprompt(dot)com
Subject: Re: Should we get rid of custom_variable_classes altogether?
Date: 2011-10-10 19:27:21
Message-ID: CAM-UEKQ_f5gnbcSkxqtg9ZhZfR8UCzrZxWkXC15dm0fEtRUeew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 3, 2011 at 00:05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> So at this point I'd vote for just dropping it and always allowing
> custom (that is, qualified) GUC names to be set, whether the prefix
> corresponds to any loaded module or not.
>
> Comments, other proposals?

While working on E.164 telephone numbers datatype contrib module
(https://github.com/commandprompt/e164/commits/guc) I've stumbled
across this problem: how do I add regression tests involving the
module-defined GUC option?

Trying to hack postgresql.conf to include e164 in the
custom_variable_classes then send it a HUP doesn't seem to be an
option. But it seems that you cannot (re)set it otherwise. See:

$ psql -d contrib_regression
psql (9.1.0)
Type "help" for help.

contrib_regression=# SET e164.area_codes_format='';
ERROR: unrecognized configuration parameter "e164.area_codes_format"
contrib_regression=# SET custom_variable_classes='e164';
ERROR: parameter "custom_variable_classes" cannot be changed now

I wonder how/if other contrib modules ever do regression tests on
their GUC options?

At this rate, removing the custom_variable_classes option altogether
is pretty much going to solve my problem.

--
Regards,
Alex

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2011-10-10 19:30:35 Re: Overhead cost of Serializable Snapshot Isolation
Previous Message Magnus Hagander 2011-10-10 19:25:31 Re: Bug in walsender when calling out to do_pg_stop_backup (and others?)