Am 03.03.2013 11:30, schrieb Peter Bex: > On Sun, Mar 03, 2013 at 12:05:34AM +0100, Herr wrote: > Yeah, this looks fishy. Changing the predicate won't help though; it > just checks that the object is a connection structure, which is still > true after a disconnection. The test is bogus and I've removed it (but > I haven't tagged a new release yet).
>> In the second test the return value is from reset-connection, which is >> problably >> void. > > This test is not verifying the return value, but it's checking that an > error is raised after resetting a nonexistent connection; test-error > does this and ignores the return value. Ops. > Like I said, it just checks the object type, not whether the connection > is still alive. libpq offers no way to check this. I could check whether > the connection-pointer is NULL, but it being not-NULL is no guarantee > that the underlying connection is still alive. I see a PQstatus function in the PG 9.1 docs, chapter 31.2, and it takes of course a conn pointer as parameter. Might be a candidate. > Thanks for pointing out the bogus test! My pleasure. I am not through checking it all yet ;-) I have been using postgresql a lot in Tcl and PHP, but scheme is new to me. /Str. _______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
