From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Parsing config files in a directory |
Date: | 2009-10-28 04:56:18 |
Message-ID: | 407d949e0910272156t6d7f0af9veb64cd2a68f9431@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Oct 27, 2009 at 8:40 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> You're hearing from the people who are working on tools: requiring that
> any tool parse a hand-written config file is a non-starter.
It can be done, pgadmin actually does it currently. But I totally
agree it's a bad idea.
But the difficulty of parsing the handwritten stuff is not the only
reason it's a bad idea. Any time you have multiple pieces of software,
to say nothing of humans, editing the same file you're going to have
headaches. They need to agree on everything and be able to handle
anything any other program generates. Such a file would be a kind of
API itself.
It's much simpler and more reliable to have each program generate a
separate file. Each program can just do its calculations and dump out
a file with those variables. It doesn't have to worry about the
ordering, indentation, or precise formatting. It can put whatever
comments it wants to explain how they're calculated or to warn that
it's an auto-generated file and any changes will be replaced the next
time it's generated. It doesn't have to worry about anything else
parsing or making sense of the file except the database server itself.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2009-10-28 05:02:09 | Re: operator exclusion constraints |
Previous Message | Greg Smith | 2009-10-28 04:30:21 | Re: Parsing config files in a directory |