Re: [PATCH] Fix missing argument handling in psql getopt

From: Quentin Rameau <quinq(at)fifth(dot)space>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Fix missing argument handling in psql getopt
Date: 2019-08-25 16:01:25
Message-ID: 20190825180125.6b7d245f@fifth.space
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > Um ... so how would control get there with optind too large?

Sorry, I missed the simple explanation for that:

As option 'h' is missing an argument, getopt(_long) returns the
character '?' which is switched on through variable c, and the program
jumps to the '?' case handling.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2019-08-25 16:40:44 The serial pseudotypes
Previous Message Quentin Rameau 2019-08-25 15:53:38 Re: [PATCH] Fix missing argument handling in psql getopt