Re: The problems of PQhost() - Mailing list pgsql-hackers

From Noah Misch
Subject Re: The problems of PQhost()
Date
Msg-id 20141128141731.GC1215506@tornado.leadboat.com
Whole thread Raw
In response to Re: The problems of PQhost()  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On Fri, Nov 28, 2014 at 07:55:29PM +0900, Fujii Masao wrote:
> On Fri, Nov 28, 2014 at 3:43 AM, Noah Misch <noah@leadboat.com> wrote:
> > On Fri, Nov 28, 2014 at 03:11:06AM +0900, Fujii Masao wrote:
> >> On Thu, Nov 27, 2014 at 12:38 PM, Noah Misch <noah@leadboat.com> wrote:
> >> > Sure.  I'll first issue "git revert 9f80f48", then apply the attached patch.
> >> > Since libpq ignores a hostaddr parameter equal to the empty string, this
> >> > implementation does likewise.  Apart from that, I anticipate behavior
> >> > identical to today's code.
> >>
> >> +                fprintf(stderr, _("out of memory\n"));
> >>
> >> psql_error() should be used instead of fprintf()?
> >
> > I copied what pg_malloc() would do.  Either way seems reasonable.
> 
> psql_error() seems better for the case where psql executes the
> specified input file.
> In this case, psql_error reports the message in the format like
> "psql:filename:lineno: message".

Fair enough.  Will do it that way.



pgsql-hackers by date:

Previous
From: Palle Girgensohn
Date:
Subject: Re: [pgsql-packagers] Palle Girgensohn's ICU patch
Next
From: Tom Lane
Date:
Subject: Re: Marginal performance improvement: replace bms_first_member loops