Re: getopt() and strdup() - Mailing list pgsql-hackers

From Phil Sorber
Subject Re: getopt() and strdup()
Date
Msg-id CADAkt-hTNFX9TekjiX7cbK-OLKd7dxJ34fUTZhHz4dfyBbCAqw@mail.gmail.com
Whole thread Raw
In response to Re: getopt() and strdup()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Oct 13, 2012 at 3:14 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Phil Sorber <phil@omniti.com> writes:
>> On Wed, Oct 10, 2012 at 7:54 PM, Bruce Momjian <bruce@momjian.us> wrote:
>>> Also, do we want to centralize the definition of pg_strdup() in /port,
>>> or leave each module to define it on its own?
>
>> +1 for a centralized definition.
>
> The difficulty with a centralized definition is that it's not clear that
> the error path is or should be *exactly* the same for all these usages.
> I see at least six variants right now.  While some are gratuitous,
> some of them are tied into local conventions of each program.
>
>                         regards, tom lane

Is it possible to at least standardize on one for the front-end and
one for the back-end? Then we can use those two going forward and sort
out all these other usages and get them to conform to one of the
aforementioned definitions over time.



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Adding comments for system table/column names
Next
From: Tom Lane
Date:
Subject: Re: Optimizer regression