PQfinish(const PGconn *conn) question

From: Boulat Khakimov <boulat(at)inet-interactif(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: PQfinish(const PGconn *conn) question
Date: 2001-03-09 17:37:36
Message-ID: 3AA914E0.8E8A184E@inet-interactif.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I'm wondering how safe it is to pass an uninitialized conn to
PQfinish....

I have set a SIGALRM handler that terminates my daemon and closes
connection
to Postgres if time-out happens. However, Im setting the alarm few times
before the connection to Postgres was established... which means that
conn pointer in not initialized yet and it will be passed to PQfinish in
my
SIGALRM handler. Im not sure how Postgres will handle that.... so far
that
doesnt seem to be causing any errors but Im not sure what's actually
happening
behind the scenes...

Any input would be appreciated.

Regards,
Boulat Khakimov

--
Nothing Like the Sun

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2001-03-09 17:41:15 AW: AW: WAL does not recover gracefully from out-of-dis k-sp ace
Previous Message Tom Lane 2001-03-09 17:34:40 Re: Query not using index, please explain.