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

Fri, 09 Mar 2001 12:37:36 -0500
Boulat Khakimov <boulat@inet-interactif.com>
PQfinish(const PGconn *conn) question
Boulat Khakimov <boulat@inet-interactif.com> writes:
> I'm wondering how safe it is to pass an uninitialized conn to
> PQfinish....

You can pass a NULL pointer to PQfinish safely, if that's what you
meant.  Passing a pointer to uninitialized memory seems like a bad
idea.

			regards, tom lane

Fri, 09 Mar 2001 12:50:27 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: PQfinish(const PGconn *conn) question 