Re: Overhauling GUCS - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Overhauling GUCS
Date
Msg-id 3F927D52-A0FD-4575-8D24-F0F70C459235@kineticode.com
Whole thread Raw
In response to Re: Overhauling GUCS  (Greg Smith <gsmith@gregsmith.com>)
Responses Re: Overhauling GUCS  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Overhauling GUCS  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Re: Overhauling GUCS  (Andreas Pflug <pgadmin@pse-consulting.de>)
List pgsql-hackers
On Jun 5, 2008, at 14:47, Greg Smith wrote:

> This is why there's the emphasis on preserving comments as they pass  
> into the GUC structure and back to an output file.  This is one of  
> the implementation details I haven't fully made up my mind on:  how  
> to clearly label user comments in the postgresql.conf to distinguish  
> them from verbose ones added to the file.  I have no intention of  
> letting manual user edits go away; what I'm trying to do here (and  
> this part is much more me than Josh) is make them more uniform such  
> that they can co-exist with machine edits without either stomping on  
> the other.  Right now doing that is difficult, because it's  
> impossible to tell the default comments from the ones the users  
> added and the current comment structure bleeds onto the same lines  
> as the settings.

How about a simple rule, such as that machine-generated comments start  
with "##", while user comments start with just "#"? I think that I've  
seen such a rule used before. At any rate, I think that, unless you  
have some sort of line marker for machine-generated comments, there  
will be no way to tell them apart from user comments.

Other possibilities for machine-comments:

## Machine comment
### Machine comment
#! Machine comment
#@ Machine comment
#$ Machine comment
#^ Machine comment
# Machine comment

I actually kinda like "#!". It's distinctive and unlikely to appear in  
a user comment. Anyway, just food for thought.

Best,

David


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: "ERROR: operator is not unique" with Custom Data Type
Next
From: Alvaro Herrera
Date:
Subject: Re: Overhauling GUCS