Re: pgsql: Add new psql help topics, accessible to both --help and \?.

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add new psql help topics, accessible to both --help and \?.
Date: 2014-09-10 14:05:24
Message-ID: 20140910140524.GR24649@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 2014-09-10 10:49:37 -0300, Alvaro Herrera wrote:
> Michael Paquier wrote:
> > On Wed, Sep 10, 2014 at 10:04 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> > > The best plan after that seems to be to add optional_argument support to
> > > getopt_long.c - looks easy enough. Do we need a configure test for
> > > optional_argument? I don't think so, but I could see somebody arguing
> > > the other way round.
> > Adding support for optional_argument in src/port would be the best
> > solution for long-term purposes. So +1 for it or we'll be limited in
> > the future as well. Here is for example attached a proof-of-concept
> > patch that it is not that complicated to add support for optional
> > arguments... Interestingly, the current implementation dates of 2003
> > in 939a59f and has not been majorly touched since. The patch has been
> > tested with MSVC.
>
> Hmm, IIRC (didn't check) we only use our getopt_long if the platform
> doesn't have one. But what if the platform has one and it doesn't
> support optional_argument? I think we'd need additional configure black
> magic to ensure that our version is chosen in these cases.

Yea, I was wondering about that too. But getopt_long() is a gnu
extension, and afaics had optional_argument since basically forever. A
quick search shows that it's been added to glibc before the historic
import into git (reaching back to 1995). So I think we don't need check
against it until we actually find some obscure situation where it
actually breaks.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2014-09-10 15:06:46 Re: pgsql: Add new psql help topics, accessible to both --help and \?.
Previous Message Alvaro Herrera 2014-09-10 13:55:07 Re: pgsql: Add new psql help topics, accessible to both --help and \?.