Re: The problems of PQhost()

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, MauMau <maumau307(at)gmail(dot)com>
Subject: Re: The problems of PQhost()
Date: 2014-11-28 10:55:29
Message-ID: CAHGQGwG87-rmxQVbG1WWoMDuQpZKj8O+b1HDFug6iL=FqzWsGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 28, 2014 at 3:43 AM, Noah Misch <noah(at)leadboat(dot)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(at)leadboat(dot)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".

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2014-11-28 12:07:41 Re: Function to know last log write timestamp
Previous Message David Rowley 2014-11-28 09:52:42 Re: Marginal performance improvement: replace bms_first_member loops