From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wei Weng <wweng@kencast.com>
Cc: Matthew Vanecek <mevanecek@yahoo.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: debug a mess
Date: Tue, 25 Feb 2003 16:27:28 -0500
Message-ID: <13032.1046208448@sss.pgh.pa.us> (raw)
In-Reply-To: <20030225155820.B24120@example.com>
References: <20030225155820.B24120@example.com>
Wei Weng <wweng@kencast.com> writes:
> The entire code from PQconnect until PQfinish goes like this:
That sure looks harmless. I wonder if there is something failing in the
PQconnect() step (like the queries that libpq sends on its own)?
I'd suggest enabling query logging --- see postgresql.conf, or just do
export PGOPTIONS="--log_statement=1"
before starting your program. (Check Admin Guide first, as this
parameter got renamed recently.) Then look in the postmaster log to get
a better idea of what's really going on.
BTW, I'm pretty sure that PQclear, and most other libpq functions,
behave sanely when handed a null pointer. So the test in
> if (res)
> PQclear(res);
is unnecessary.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, wweng@kencast.com, mevanecek@yahoo.com
Subject: Re: debug a mess
In-Reply-To: <13032.1046208448@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox