Darren, All, > All you would need is for the file parser to retain the > comments as metadata, include them in the relations that the SQL > commands see where the latter can also edit them as data, and then write > out the updated file with comments.
"All you need to do" in order to trisect and angle is to divide it into three equal parts using just a compass and straightedge. Given the number of different ways people can comment up pg.conf files, and the fact that they can have the same settings set multiple times in the file, both commented and uncommented, and that both the settings and the comments can be in any order, with user-created spacing, you've added a *huge* burden of parsing code to any .conf updater. One which would, in terms of LOC, exceed the updating code by more than 300%. > The fact that Postgres already > explicitly supports comment metadata in its system catalog means it must > already know something about this. We support what? The solution to this is simple, and was previously discussed on this list: (a) have a postgresql.conf.auto (b) add a default include for postgresql.conf.auto at the beginning of PostgreSQL.conf (c) SQL updates go to postgresql.conf.auto, which consists only of "setting = value" in alphabetical order. (d) We document that settings which are changed manually in postgresql.conf will override postgresql.conf.auto. (e) $$profit$$!! --Josh Berkus -- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers