Re: connecting using libpq breaks printf

From: David Wilson <david(dot)t(dot)wilson(at)gmail(dot)com>
To: Joey Morris <rjmorris12(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: connecting using libpq breaks printf
Date: 2009-02-18 16:36:44
Message-ID: e7f9235d0902180836j193777fan33b88d45c5dc15ac@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Feb 18, 2009 at 9:47 AM, Joey Morris <rjmorris12(at)gmail(dot)com> wrote:

> I expected this program to print "connecting", but in fact I get no output
> whatsoever. If I comment out the PQconnectdb and PQfinish lines, I see
> "connecting" as expected. What could be going on here?

Try adding "fflush(stderr);" after your fprintf() call. If the
connection is hanging and output hasn't been flushed, you wouldn't see
much.

--
- David T. Wilson
david(dot)t(dot)wilson(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marko Kreen 2009-02-18 17:00:17 Re: [Plproxy-users] Two-phase commmit, plpgsql and plproxy
Previous Message Aurimas Černius 2009-02-18 16:35:38 Re: connecting using libpq breaks printf