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
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [PATCH] Fix missing argument handling in psql getopt
Date: 2019-08-25 19:21:36
Message-ID: 20190825212136.04b56ac3@fifth.space
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
0001-Fix-handling-of-option.patch text/x-patch 1.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-08-25 19:28:12 Re: [PATCH] Fix missing argument handling in psql getopt
Previous Message Tom Lane 2019-08-25 19:14:46 Re: Outputting Standard SQL