Re: pg_dump.options.diff
От | Serguei Mokhov |
---|---|
Тема | Re: pg_dump.options.diff |
Дата | |
Msg-id | 003b01c2b22a$62be3b80$0301a8c0@gunnymede.lan обсуждение исходный текст |
Ответ на | pg_dump.options.diff ("Serguei Mokhov" <mokhov@cs.concordia.ca>) |
Ответы |
Re: pg_dump.options.diff
|
Список | pgsql-hackers |
----- Original Message ----- From: "Tom Lane" <tgl@sss.pgh.pa.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
В списке pgsql-hackers по дате отправления: