Re: [PATCH] Add use of asprintf() - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] Add use of asprintf()
Date
Msg-id 1379823874.24014.6.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: [PATCH] Add use of asprintf()  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Mon, 2013-09-16 at 17:31 -0300, Alvaro Herrera wrote:
> Looks good to me, except that pg_asprintf seems to be checking ret
> instead of rc.

Ah, good catch!

> Is there a reason for the API discrepancy of pg_asprintf vs. psprintf?
> I don't see that we use the integer return value anywhere.  Callers
> interested in the return value can use asprintf directly (and you have
> already inserted callers that do nonstandard things using direct
> asprintf).

I wanted to keep pg_asprintf the same as asprintf.  I think there is
some value in that, but it's not supremely important.




pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: VMs for Reviewers Available
Next
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] Add use of asprintf()