Re: [PATCH] Fix missing argument handling in psql getopt - Mailing list pgsql-hackers

From Quentin Rameau
Subject Re: [PATCH] Fix missing argument handling in psql getopt
Date
Msg-id 20190825212136.04b56ac3@fifth.space
Whole thread Raw
In response to Re: [PATCH] Fix missing argument handling in psql getopt  (Quentin Rameau <quinq@fifth.space>)
List pgsql-hackers
> Another better way, I think, to fix this is to check for optopt
> instead, which would be set to the option which caused the error, which
> if empty means there isn't an error.
> 
> Patch attached.

Actually OpenBSD seems to set optopt to '?' by default, so the updated
attached patch ensure we start with an empty optopt.

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Outputting Standard SQL
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Fix missing argument handling in psql getopt