Re: Reasons not to like asprintf - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Reasons not to like asprintf
Date
Msg-id 5269645A.9050609@gmx.net
Whole thread Raw
In response to Re: Reasons not to like asprintf  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Reasons not to like asprintf
Re: Reasons not to like asprintf
List pgsql-hackers
On 10/22/13, 3:40 PM, Tom Lane wrote:
> In order to avoid having to clutter stuff like that with #ifdef FRONTENDs,
> I'm now thinking we should use exactly the same names for the frontend and
> backend versions, ie psprintf() and pvsprintf().  The main reason for
> considering a pg_ prefix for the frontend versions was to avoid cluttering
> application namespace; but it's already the case that we don't expect
> libpgcommon to be namespace clean.

While this is attractive, the same logic would suggest that we rename
pg_malloc() to palloc(), and that sounds wrong.  The frontend and
backend functions do have different freeing semantics.




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Patch for fail-back without fresh backup
Next
From: Tom Lane
Date:
Subject: Re: Reasons not to like asprintf