Re: postgres --help-config

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Fernando Nasser <fnasser(at)redhat(dot)com>, Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgres --help-config
Date: 2003-10-15 13:00:37
Message-ID: 200310151300.h9FD0bi10060@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > ... Will Red Hat be upset if we
> > leave it unchanged for 7.4.X and rip this out and redo it in 7.5?
>
> It'd be better if we could get it right the first time, with the
> understanding that the output format is not very negotiable at this
> late hour. But as best I can tell, most of the unhappiness is with the
> design of the switch set, which is not something I want to defend in
> detail. There's a lot there that isn't needed for the RHDB tool as I
> understand it, and I think that altering the switches used to get the
> output that the tool does need would still be a feasible change from the
> tool's point of view.
>
> I would be in favor of simplifying the supported switch set to the
> minimum needed by Red Hat's tool (the equivalent of -G -M if I
> understood Fernando correctly), and re-adding complexity in future
> when and if it's shown to be needed. But we need to make a decision
> about this now. Preferably yesterday.

I understand we want to get something that _isn't_ going to change after
7.4. That's why I proposed a simple --help-config in user-readable
format (might be improved in the future), and a --help-config-raw in tab
format, without headers. Seems the tool can use the tab format to do
whatever it wants, including loading it into a C structure and running
the existing help_config.c code over it. I also can't imagine the raw
format every changing, because of course, it is "raw". I think everyone
agrees we need a user-readable and machine-readable output for this. As
I mentioned earlier, SRA has a tool that does this too, so it must be a
pretty common need.

My guess is that every tool is going to want to get at the data in a
different way, so we are better off just passing the data in a neutral
format and letting the tool manipulate the data, rather than trying to
guess what features the tool will need.

One thing that seems very strange about the current API are flags that
have meaning only when --help-config becomes before it, as with -G and
-M. I have never seen that before, and I don't know how we would even
document that. We do have pg_ctl that has different flags for different
modes, but a word is required at the beginning, not a flag.

I guess iff someone needs raw with headers in the future, I guess we
could add --help-config-raw-headers.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-10-15 13:06:33 Re: postgres --help-config
Previous Message Andrew Dunstan 2003-10-15 11:56:41 Re: fix for strict-alias warnings