Re: getopt() and strdup()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Phil Sorber <phil(at)omniti(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: getopt() and strdup()
Date: 2012-10-13 19:14:09
Message-ID: 18243.1350155649@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Phil Sorber <phil(at)omniti(dot)com> writes:
> On Wed, Oct 10, 2012 at 7:54 PM, Bruce Momjian <bruce(at)momjian(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2012-10-13 19:14:55 Re: Adding comments for system table/column names
Previous Message Bruce Momjian 2012-10-13 19:12:58 Re: Adding comments for system table/column names