Re: [RFC] Extend namespace of valid guc names

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [RFC] Extend namespace of valid guc names
Date: 2013-09-18 09:02:50
Message-ID: 20130918090250.GA13925@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-09-18 11:55:24 +0530, Amit Kapila wrote:

> > I think that ship has long since sailed. postgresql.conf has allowed
> > foo.bar style GUCs via custom_variable_classes for a long time, and
> > these days we don't even require that but allow them generally. Also,
> > SET, postgres -c, and SELECT set_config() already don't have the
> > restriction to one dot in the variable name.
>
> It's even explained in document that a two-part name is allowed for
> Customized Options at link:
> http://www.postgresql.org/docs/devel/static/runtime-config-custom.html

Oh I somehow missed that. I'll need to patch that as well.

> Apart from this, quite a few negative tests (setting invalid names)
> also works fine (select pg_reload_conf() shows error on server).

> On a side note, although it doesn't have any relation with your patch,
> I found some minor problems in setting of configuration during test of
> this patch, so I am mentioning it here. I will look into these in
> detail later:

Most of those have been discussed in another subthread. While I still am
not sure that I agree, the concensus was that we shouldn't do anything
about that for now.

>
> Test-1
> postgres=# select set_config('a.b.1.c','c',false);
> set_config
> ------------
> c
> (1 row)
>
> postgres=# show a.b.1.c;
> ERROR: syntax error at or near ".1"
> LINE 1: show a.b.1.c;

You can show it with a.b."1".c, but those can't be set via guc-file.l.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-09-18 09:06:31 Re: System catalog bloat removing safety
Previous Message mohsen soodkhah mohammadi 2013-09-18 08:51:47 when construct new tuple for update?