Skip site navigation (1) Skip section navigation (2)

Re: pg_dump.options.diff

From: "Serguei Mokhov" <mokhov(at)cs(dot)concordia(dot)ca>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>,"Peter Eisentraut" <peter_e(at)gmx(dot)net>
Subject: Re: pg_dump.options.diff
Date: 2003-01-02 06:44:21
Message-ID: 003b01c2b22a$62be3b80$0301a8c0@gunnymede.lan (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
----- Original Message ----- 
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Sent: January 02, 2003 1:34 AM

> Perhaps it would work better to do something like
> 
> #ifdef HAVE_GETOPT_LONG
> char* f_option = _("-f, --file=FILENAME     ");
> ... etc ...
> #else /* not HAVE_GETOPT_LONG */
> char* f_option = _("-f FILENAME             ");
> ... etc ...
> #endif /* not HAVE_GETOPT_LONG */
> 
> printf(_("  %s output file name\n"), f_option);
> ... etc ...
> 
> That seems to reduce the amount of duplication without breaking things
> up into chunks that aren't independent concepts.

Thank you for your comment, Tom.

A slightly more readable version of the above could be:

> #ifdef HAVE_GETOPT_LONG
> char* data_only_option = _("-f, --file=FILENAME     ");
> char* blobs_option = _("-b, --blobs         ");
> ... etc ...
> #else /* not HAVE_GETOPT_LONG */
> char* data_only_option = _("-f FILENAME             ");
> char* blobs_option = _("-b                 ");
> ... etc ...
> #endif /* not HAVE_GETOPT_LONG */
> 
> printf(_("  %s output file name\n"), data_only_option);
> printf(_("  %s include large objects in dump\n"), blobs_option);
> ... etc ...

It loos like better than the current setup.
Either way, something has to be donw about this...

-s


In response to

Responses

pgsql-hackers by date

Next:From: Peter ChildsDate: 2003-01-02 08:17:11
Subject: Re: Cast your vote ...
Previous:From: Christopher Kings-LynneDate: 2003-01-02 06:43:15
Subject: Re: Cast your vote ...

pgsql-patches by date

Next:From: Serguei MokhovDate: 2003-01-02 08:41:57
Subject: more adequate usage msg: pg_controldata.diff
Previous:From: Tom LaneDate: 2003-01-02 06:34:23
Subject: Re: pg_dump.options.diff

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group