Re: PQsetdbLogin bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PQsetdbLogin bug?
Date: 2001-05-25 14:26:11
Message-ID: 5041.990800771@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> writes:
> 2) check if the status of handle returned PQsetdbLogin is
> CONNECTION_BAD closePGconn. if so, do not call pqPuts (and
> pqFlush)

I like this approach. The other way, you'd have to be sure that all
failure paths close the socket before returning; even if you get it
right today, somebody will break it again in future. The sending of
the final 'X' is really quite optional anyhow, so I'd say it's fine
not to do it when there's any question about whether it's safe.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2001-05-25 14:42:58 Re: GiST index on data types that require compression
Previous Message Tom Lane 2001-05-25 14:23:01 Re: Bug#98643: plpgsql SELECT INTO causes trouble when assignment impossible (fwd)