Re: Solaris getopt_long and PostgreSQL - Mailing list pgsql-hackers

From Chuck McDevitt
Subject Re: Solaris getopt_long and PostgreSQL
Date
Msg-id 2106D8DC89010842BABA5CD03FEA4061B249C983@EXVMBX018-10.exch018.msoutlookonline.net
Whole thread Raw
In response to Re: Solaris getopt_long and PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Solaris getopt_long and PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
What about the idea of updating our getopt and getopt_long to a more modern version by porting over netBSD getopt?

The current situation is confusing for users, as "psql databasename -p port" type of calls works on almost all
platforms,but not on those using the internal getopt/getopt_long.  For those, you get "-p" is not a valid user. 
This is because MAC, BSD and GNU getopt_long permutes the arguments, and our getopt_long does not.

> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Tuesday, March 17, 2009 11:02 AM
> To: Zdenek Kotala
> Cc: Chuck McDevitt; pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] Solaris getopt_long and PostgreSQL
>
> Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:
> > [ use Solaris' version of getopt_long ]
>
> The reason not to do that was discussed in this thread:
>
> http://archives.postgresql.org//pgsql-patches/2008-02/msg00075.php
>
> While Chuck is certainly free to build his local copy however he wants,
> I don't think we're going to revert this change in the community
> sources.
>
>             regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Solaris getopt_long and PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: Solaris getopt_long and PostgreSQL