Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] allowed user/db variables

From: Aizaz Ahmed <aahmed(at)redhat(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org,Fernando Nasser <fnasser(at)redhat(dot)com>, Aizaz Ahmed <aahmed(at)redhat(dot)com>
Subject: Re: [HACKERS] allowed user/db variables
Date: 2003-07-28 14:41:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
On Sun, 2003-07-27 at 01:29, Joe Conway wrote:
> Bruce Momjian wrote:
> > Patch applied.  Thanks.

>   /*
> !  * Used for pg_settings. Keep in sync with config_type enum in guc_tables.h
>    */
>   static char *config_type_name[] = 
>   {
> ***************
> *** 176,181 ****
> --- 176,182 ----
>   	"sighup",
>   	"backend",
>   	"super-user",
> + 	"userlimit",
>   	"user"
>   };

looks like there's some duplication between this array and the 
static const char *const GucContext_names[] array in

Is there some way we could have them both use the same array? (it
doesn't matter for help_config whether the names are upper- or

Also, as a side note, I don't think Tom is a big fan of using comments
to indicate what needs to be kept in sync with what, if I can take the
liberty to quote him the last time a situation like this arose:

Re: [PATCHES] fix for new SUSET GUC variables
Mon, 14 Jul 2003 16:33:14 -0400

> We don't normally try to enumerate in comments all the places you'd 
> need to change when adding to an enum or other widely-used
> definition.  You're supposed to find them by searching the source code
> for references to the existing values.  Depending on comments for that
> sort of thing is far too error-prone --- you can just about guarantee 
> that the comment will fail to track new uses.


In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2003-07-28 14:49:13
Subject: Re: Error code mixup?
Previous:From: Tom LaneDate: 2003-07-28 14:28:25
Subject: Re: "is_superuser" parameter creates inconsistencies

pgsql-patches by date

Next:From: Tom LaneDate: 2003-07-28 14:57:28
Subject: Re: [HACKERS] allowed user/db variables
Previous:From: Steven VajdicDate: 2003-07-28 04:06:14
Subject: Sorry/spam - how do you unsubscribe?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group