Re: postgres --help-config

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Fernando Nasser <fnasser(at)redhat(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, 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 19:43:30
Message-ID: 200310151943.h9FJhUa08964@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fernando Nasser wrote:
> Bruce Momjian wrote:
> >
> (...)
> > I guess iff someone needs raw with headers in the future, I guess we
> > could add --help-config-raw-headers.
> >
>
> I don't mind if you make it always with the headers. We can easily
> strip the first line when reading the file and people can easily strip
> it piping the output through a filter before sorting it etc.

I think we are better off without headers. COPY doesn't have headers,
so if we are using COPY output format, headers don't make sense --- any
my guess is that you will have to check --version anyway for special
handling, so having the headings isn't going to be a huge help. If we
want headings, I suggest we have a special option that dumps out _only_
the headings. In fact, it might be nicer to have it dump out the CREATE
TABLE needed to load the raw output.

> I am thinking that the headers would allow a output formatting utility
> to do it in a way that is independent of the version, and avoid having
> to run "pg_config --version" as well. As the values are all strings it
> can blindly create a column for every header. The only fields that the
> program need to know about (like name and group) are not likely to change.

At this point, we should probably just do what is needed, and revisit
for 7.5 --- straight COPY output would probably do the trick.

Now, for a name. I wonder if --config-copy would be OK. It documents
it is in COPY output format, and it allows us to add a human-readable
version in the future if we ever want one. I didn't like --help-config
because it is too easily confused with --help, which documents
command-line flags --- this really doesn't do that.

--
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 Marc G. Fournier 2003-10-15 20:00:54 Second question on schemas and INDEX(es) ...
Previous Message Bruce Momjian 2003-10-15 19:36:43 Re: postgres --help-config