Re: debug a mess
От
Tom Lane
Тема
Re: debug a mess
Дата
Msg-id
13032.1046208448@sss.pgh.pa.us
Ответ на
Re: debug a mess (Wei Weng)
Список
Дерево обсуждения
Re: debug a mess Wei Weng <wweng@kencast.com>
Re: debug a mess Tom Lane <tgl@sss.pgh.pa.us>
Re: debug a mess Wei Weng <wweng@kencast.com>
Re: debug a mess Tom Lane <tgl@sss.pgh.pa.us>
Re: debug a mess Wei Weng <wweng@kencast.com>
Re: debug a mess Wei Weng <wweng@kencast.com>
Re: debug a mess "Jeroen T. Vermeulen" <jtv@xs4all.nl>
Wei Weng 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 doexport 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
В списке pgsql-interfaces по дате отправления