Re: libpq connection status and closed fd

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq connection status and closed fd
Date: 2014-09-22 07:45:34
Message-ID: CAAfz9KPxTPbx8u-PbtmcPN3JiG2nt=Rs7n3y00qS+ME-LdFKgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-09-22 11:35 GMT+04:00 Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>:

> On Mon, Sep 22, 2014 at 8:17 AM, Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
> wrote:
> >
> > 2014-09-22 10:42 GMT+04:00 Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com
> >:
>
> >> [2] https://gist.github.com/dvarrazzo/065f343c95f8ea67cf8f
> >
> > Why are you using close() instead of PQfinish()?
>
> Because I'm testing for an error, please read my message and the
> original bug report.
>
I read it. You are testing for an error, but use libpq in a wrong way in
your test case. You must use PQfinish() to close the connection
and PQstatus() will works for you.

> -- Daniele
>

--
// Dmitriy.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Tiikkaja 2014-09-22 08:36:26 Re: libpq connection status and closed fd
Previous Message Daniele Varrazzo 2014-09-22 07:35:14 Re: libpq connection status and closed fd