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
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to