Re: Fix help option of contrib/oid2name

From: Tatsuro Yamada <yamada(dot)tatsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fix help option of contrib/oid2name
Date: 2018-08-24 04:32:47
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2018/08/21 12:57, Tatsuro Yamada wrote:
> On 2018/08/21 12:40, Michael Paquier wrote:
>> On Tue, Aug 21, 2018 at 12:26:15PM +0900, Tatsuro Yamada wrote:
>>> BTW, can I add the patch to the Commitfest September?
>> You should.
> Thanks, I'll do that.
> I'll send 2 patches in this week, probably.

(I resend this email because I forgot to mark CC on my previous email. Sorry.)

I revised the patch and created new tap tests.

bug fix
- Remove "-P password" option from the document
- Divide "Options section" into "Options" and "Connection Options" sections in
the help message (--help)
- Add long options
- Add "-H host" and "-h host" options to the help message and the document
- Add environment variable (PGHOST, PGPORT and PGUSER) to the document

- Add long options
- Add environment variable (PGHOST, PGPORT and PGUSER) to the document

Regarding to Long options,
I read the following both codes and I understand meanings of short options, so I
leave all long options in patches not only for connection options.

/* these are the opts structures for command line params */
struct options
eary *tables;
eary *oids;
eary *filenodes;

bool quiet;
bool systables;
bool indexes;
bool nodb;
bool extended;
bool tablespaces;

char *dbname;
char *hostname;
char *port;
char *username;
const char *progname;

struct _param
char *pg_user;
enum trivalue pg_prompt;
char *pg_port;
char *pg_host;
const char *progname;
int verbose;
int dry_run;
long transaction_limit;

Following TAP tests is for checking command-line options but I coudn't add some
test cases such as it is required argument and mixed varaiety of options.
I'm not sure about naming rule of tap test, so I added 300 and 301 to names as
temporarily. Please rename these files to more suitable names.

Please find attached files.

Tatsuro Yamada

Attachment Content-Type Size
fix_oid2name_wip3.patch text/x-patch 11.5 KB application/x-perl 1.6 KB application/x-perl 737 bytes
fix_vacuumlo_wip3.patch text/x-patch 7.9 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Iwata, Aya 2018-08-24 04:38:22 libpq debug log
Previous Message Amit Langote 2018-08-24 04:29:32 document that MergeAppend can now prune