pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Quentin Rameau <quinq@fifth.space>
To: pgsql-hackers@lists.postgresql.org
Subject: Re: [PATCH] Fix missing argument handling in psql getopt
Date: Sun, 25 Aug 2019 18:01:25 +0200
Message-ID: <20190825180125.6b7d245f@fifth.space> (raw)
In-Reply-To: <20190825175338.74ed0f0e@fifth.space>
References: <20190825100617.GA6087@fifth.space>
	<14042.1566745352@sss.pgh.pa.us>
	<20190825175338.74ed0f0e@fifth.space>

> > 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.





view thread (9+ messages)  latest in thread

Message-ID: <20190825180125.6b7d245f@fifth.space>
Permalink:  ../20190825180125.6b7d245f@fifth.space/
Also on:    postgresql.org/message-id/20190825180125.6b7d245f@fifth.space

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: quinq@fifth.space, pgsql-hackers@lists.postgresql.org
  Subject: Re: [PATCH] Fix missing argument handling in psql getopt
  In-Reply-To: <20190825180125.6b7d245f@fifth.space>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox